/* Estilos adicionais para o checkout */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.item-entrada {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-saida {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.contador-carrinho {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn-continuar-comprando {
    background: transparent;
    border: 2px solid var(--cor-primaria);
    color: var(--cor-primaria);
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-continuar-comprando:hover {
    background: var(--cor-primaria);
    color: white;
    transform: translateY(-2px);
}

.cupom-desconto {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-cupom {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
}

.input-cupom:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.btn-aplicar-cupom {
    background: var(--cor-primaria);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-aplicar-cupom:hover {
    background: #218838;
    transform: translateY(-1px);
}

.info-entrega {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-entrega i {
    color: var(--cor-primaria);
    margin-right: 8px;
}

.tempo-entrega {
    font-weight: bold;
    color: var(--cor-primaria);
}

.formas-pagamento {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.forma-pagamento {
    width: 40px;
    height: 25px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
}

.visa { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 16"><rect fill="%231A1F71" width="24" height="16" rx="2"/><text x="12" y="10" text-anchor="middle" fill="white" font-size="6" font-weight="bold">VISA</text></svg>'); }
.mastercard { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 16"><rect fill="%23EB001B" width="24" height="16" rx="2"/><text x="12" y="10" text-anchor="middle" fill="white" font-size="5" font-weight="bold">MC</text></svg>'); }
.pix { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 16"><rect fill="%234BB8A9" width="24" height="16" rx="2"/><text x="12" y="10" text-anchor="middle" fill="white" font-size="5" font-weight="bold">PIX</text></svg>'); }

/* Formulário de Endereço */
.endereco-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.endereco-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.endereco-form .form-control:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.endereco-form .form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

#btn-buscar-cep:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #6c757d;
}

#btn-buscar-cep:not(:disabled) {
    background-color: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: white;
}

#btn-buscar-cep:not(:disabled):hover {
    background-color: #218838;
    border-color: #1e7e34;
}

#btn-buscar-cep {
    transition: all 0.3s ease;
}

/* Transições suaves para os dados de endereço */
#dados-endereco {
    transition: all 0.3s ease;
}

/* Informações de entrega confirmada */
#info-entrega-confirmada {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #c3e6cb;
}

.endereco-resumo {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animações */
.endereco-form, #info-entrega-confirmada {
    transition: all 0.3s ease;
}

.endereco-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Estados de validação */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* Loading no botão de buscar CEP */
#btn-buscar-cep .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Adicionais - badges em linha única */
.adicionais-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge-adicional {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    display: inline-block;
    width: fit-content;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .resumo-pedido {
        position: static;
        margin-top: 20px;
    }
    
    .quantidade-controles {
        flex-direction: column;
        gap: 5px;
    }
    
    .quantidade-controles button {
        width: 100%;
        border-radius: 6px;
    }
    
    .quantidade-input {
        width: 100%;
        text-align: center;
    }
    
    .endereco-form {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    #info-entrega-confirmada {
        padding: 1rem;
    }
} 