/**
 * CHECKOUT PROFISSIONAL - ESTILOS
 * Design moderno com bottom sheets e animações suaves
 */

/* ===========================================
   BOTTOM SHEET BASE
   =========================================== */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.bottom-sheet-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 24px 24px 0 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.bottom-sheet-overlay.active .bottom-sheet-content {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.bottom-sheet-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.bottom-sheet-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bottom-sheet-title i {
    color: #2563eb;
    font-size: 1.3rem;
}

.bottom-sheet-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 1.2rem;
}

.bottom-sheet-back:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.1);
}

.bottom-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.bottom-sheet-body::-webkit-scrollbar {
    width: 4px;
}

.bottom-sheet-body::-webkit-scrollbar-track {
    background: transparent;
}

.bottom-sheet-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* ===========================================
   DELIVERY OPTIONS
   =========================================== */
.delivery-options-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.delivery-option-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.delivery-option-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.delivery-option-card:active {
    transform: scale(0.98);
}

.delivery-option-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.delivery-icon {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.pickup-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.delivery-option-content {
    flex: 1;
}

.delivery-option-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.delivery-option-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 8px 0;
}

.delivery-option-price {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
}

.delivery-option-arrow {
    color: #ccc;
    font-size: 1.2rem;
}

/* ===========================================
   FORM STYLES
   =========================================== */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #2563eb;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    color: #1a1a1a;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.form-helper {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: -4px;
}

.form-row {
    display: flex;
    gap: 12px;
}

/* ===========================================
   ADDRESS SEARCH OPTIONS
   =========================================== */
.address-search-options {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.address-search-btn {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.address-search-btn:hover {
    border-color: #2563eb;
    background: white;
}

.address-search-btn:active {
    transform: scale(0.96);
}

.address-search-btn i {
    font-size: 1.4rem;
    color: #2563eb;
}

.address-sheet {
    max-height: 95vh !important;
}

.delivery-fee-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #60a5fa;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.delivery-fee-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-fee-content i {
    color: #2563eb;
    margin-right: 8px;
}

.delivery-fee-content span {
    color: #1e40af;
    font-weight: 600;
}

.delivery-fee-content strong {
    color: #1e3a8a;
    font-size: 1.2rem;
}

/* ===========================================
   PAYMENT STYLES
   =========================================== */
.order-summary-box {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.order-summary-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #4b5563;
}

.summary-line strong {
    color: #1a1a1a;
    font-weight: 600;
}

.summary-total {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    font-size: 1.1rem;
}

.summary-total strong {
    color: #2563eb;
    font-size: 1.4rem;
    font-weight: 700;
}

.delivery-info-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.delivery-info-box i {
    font-size: 1.6rem;
    color: #2563eb;
    margin-top: 4px;
}

.delivery-info-box strong {
    display: block;
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.delivery-info-box p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 2px 0;
}

.payment-moment-options {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-moment-btn {
    flex: 1;
    padding: 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-moment-btn:hover {
    border-color: #2563eb;
}

.payment-moment-btn.active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.payment-moment-btn i {
    font-size: 1.8rem;
    color: #2563eb;
}

.payment-moment-btn span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.payment-method-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.payment-method-card:hover {
    border-color: #2563eb;
}

.payment-method-card.active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.payment-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.money-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.card-icon {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #7c3aed;
}

.pix-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.payment-method-content h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.payment-method-content p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

/* ===========================================
   PIX PAYMENT
   =========================================== */
.pix-payment-body {
    text-align: center;
}

.pix-instructions {
    margin-bottom: 24px;
}

.pix-instructions h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.pix-instructions p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.pix-qrcode-container {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin: 0 auto 24px;
    max-width: 280px;
}

.pix-qrcode-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.pix-value {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pix-value span {
    color: #1e40af;
    font-weight: 600;
}

.pix-value strong {
    color: #1e3a8a;
    font-size: 1.4rem;
    font-weight: 700;
}

.pix-copy-paste {
    margin-bottom: 24px;
}

.pix-copy-paste p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.pix-code-box {
    display: flex;
    gap: 8px;
}

.pix-code-box input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1a1a1a;
    background: #f9fafb;
}

.pix-copy-btn {
    padding: 12px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pix-copy-btn:active {
    transform: scale(0.96);
    background: #1d4ed8;
}

.pix-status {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
}

.pix-status-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #d97706;
    font-weight: 600;
}

.pix-status-waiting i {
    font-size: 1.4rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pix-status-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #059669;
    font-weight: 600;
    font-size: 1.1rem;
}

.pix-status-success i {
    font-size: 1.6rem;
    animation: checkmark 0.5s ease;
}

.pix-status-checking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #2563eb;
    font-weight: 600;
}

.pix-status-checking i {
    font-size: 1.4rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pix-status-timeout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #dc2626;
    font-weight: 600;
}

.pix-status-timeout i {
    font-size: 1.4rem;
}

/* ===========================================
   SUCCESS SHEET
   =========================================== */
.success-sheet .bottom-sheet-body {
    text-align: center;
    padding: 40px 20px;
}

.success-animation {
    margin-bottom: 24px;
}

.success-animation i {
    font-size: 5rem;
    color: #10b981;
    animation: successPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 32px 0;
}

.success-info {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.success-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.success-info-item:last-child {
    border-bottom: none;
}

.success-info-item span {
    font-size: 0.95rem;
    color: #6b7280;
}

.success-info-item strong {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.success-message {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-message i {
    color: #2563eb;
    font-size: 1.4rem;
}

.success-message p {
    color: #1e40af;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn-primary,
.btn-secondary {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #1a1a1a;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-full {
    width: 100%;
}

/* ===========================================
   ALERTS
   =========================================== */
.bottom-alert {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    max-width: 90%;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.bottom-alert.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.bottom-alert i {
    font-size: 1.3rem;
}

.bottom-alert.success i {
    color: #10b981;
}

.bottom-alert.error i {
    color: #ef4444;
}

.bottom-alert.warning i {
    color: #f59e0b;
}

.bottom-alert.info i {
    color: #3b82f6;
}

.bottom-alert span {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

/* ===========================================
   LOADING OVERLAY
   =========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 16px;
}

.loading-content p {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 480px) {
    .bottom-sheet-content {
        border-radius: 20px 20px 0 0;
    }

    .bottom-sheet-header {
        padding: 20px 16px 16px;
    }

    .bottom-sheet-title {
        font-size: 1.2rem;
    }

    .bottom-sheet-body {
        padding: 16px;
    }

    .delivery-option-card {
        padding: 16px;
    }

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }
}

/* ===========================================
   PAGAMENTOS ONLINE DESABILITADOS
   =========================================== */
.payment-method-disabled {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    color: #6c757d;
}

.payment-method-disabled i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffc107;
}

.payment-method-disabled h5 {
    margin: 0 0 0.5rem 0;
    color: #495057;
}

.payment-method-disabled p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.payment-method-disabled small {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ===========================================
   RESUMO DE PAGAMENTO COM CARTÃO
   =========================================== */
.card-payment-summary {
    margin-top: 1rem;
}

.payment-summary-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
}

.payment-summary-box h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #495057;
    font-weight: 600;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.summary-line span:first-child {
    color: #6c757d;
}

.summary-line span:last-child {
    font-weight: 500;
}

.tax-line {
    color: #dc3545;
}

.tax-line span:first-child {
    color: #dc3545;
}

.summary-divider {
    height: 1px;
    background: #dee2e6;
    margin: 0.75rem 0;
}

.total-line {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

.installment-line {
    color: #28a745;
    font-weight: 600;
}

.installment-line span:first-child {
    color: #28a745;
}
}
