/* Container Principal (sem caixa) */
#bsc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 600px;
    margin: 2rem auto;
}

/* Formulário */
#bsc-form {
    display: flex;
    flex-direction: column; /* Botão abaixo do campo */
    gap: 10px;
}

#bsc-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#bsc-form input[type="email"]:focus {
    outline: none;
    border-color: #d61625;
    box-shadow: 0 0 0 2px rgba(214, 22, 37, 0.2);
}

#bsc-form button {
    padding: 12px 25px;
    border: none;
    background-color: #d61625; /* Nova cor */
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

#bsc-form button:hover {
    background-color: #b0121f; /* Tom mais escuro para hover */
}

#bsc-form button:disabled {
    background-color: #9e9e9e;
    cursor: wait;
}

/* Container de Feedback (para erros antes do popup) */
#bsc-results-container {
    margin-top: 1rem;
}

.bsc-feedback {
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estilos do Popup */
#bsc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

#bsc-popup-content {
    background: white;
    padding: 25px 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

#bsc-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 5px;
}

/* Estilos do conteúdo dentro do Popup */
.bsc-order-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.bsc-order-header {
    background-color: #f7f7f7;
    padding: 10px 15px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.bsc-order-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

.bsc-product-list .product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    margin-bottom: 10px;
}

.bsc-product-list img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
}

.bsc-serial-list h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.bsc-serial-item {
    background-color: #f1f1f1;
    border: 1px dashed #ccc;
    padding: 10px 15px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    user-select: all;
    text-align: center;
    word-break: break-all;
}

.bsc-serial-item strong {
    font-family: sans-serif;
    font-weight: normal;
    color: #555;
}

.bsc-serial-item:hover {
    background-color: #e7e7e7;
}

.bsc-serial-item.copied {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    font-weight: bold;
}

/* --- Responsividade para Dispositivos Móveis --- */
@media (max-width: 768px) {
    #bsc-wrapper {
        margin: 1rem;
        padding: 0;
    }

    #bsc-popup-content {
        padding: 20px 15px;
        max-height: 85vh; /* Leve ajuste para dar mais espaço */
    }

    .bsc-order-body {
        grid-template-columns: 1fr; /* Coluna única */
        gap: 20px;
    }

    .bsc-serial-list {
        margin-top: 1rem; /* Adiciona um espaço quando os itens empilham */
    }

    #bsc-form input[type="email"],
    #bsc-form button {
        font-size: 15px; /* Leve ajuste na fonte */
    }
}
