﻿body { 
    font-family: 'Poppins', sans-serif; 
    background-color: #f8fafc; /* slate-50 */ 
}

:root {
    --brand-yellow: #FFC400;
    --brand-yellow-soft: #FFF4C2;
    --brand-yellow-light: #FFC400;
    --brand-yellow-dark: #FFC400;
    --brand-ink: #111827;
    --brand-muted: #6B7280;
    --brand-line: #E5E7EB;
    --brand-surface: #FFFFFF;
    --brand-canvas: #F7F7F8;
    --brand-success: #22C55E;
}

.checkout-page {
    color: var(--brand-ink);
    background: var(--brand-canvas);
}

.checkout-header {
    border-bottom: 1px solid #FFC400;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12);
}

.checkout-header > div {
    min-height: 72px;
}

.checkout-brand {
    letter-spacing: 0;
}

.checkout-brand > span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.checkout-brand strong {
    font-size: 1rem;
}

.checkout-brand small {
    margin-top: 0.2rem;
    color: #4B3A00;
    font-size: 0.72rem;
    font-weight: 500;
}

.checkout-logo {
    width: 54px !important;
    height: 54px !important;
    object-fit: contain;
}

.checkout-notice {
    letter-spacing: 0;
}

.checkout-assurances {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    max-width: 36rem;
    margin: 0.65rem auto 0;
    padding: 0 1rem;
    color: #4B5563;
    font-size: 0.72rem;
    font-weight: 600;
}

.checkout-assurances span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.checkout-assurances span::before {
    content: '';
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: var(--brand-success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.checkout-page main {
    padding-top: 1.25rem;
}

.checkout-page section,
.checkout-page #pixContainer > div,
.checkout-page main > div.bg-white {
    border-color: var(--brand-line) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.055);
}

.checkout-page #summarySection {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.045);
}

.checkout-page h1,
.checkout-page h2,
.checkout-page h3,
.checkout-page h4 {
    letter-spacing: 0;
}

.checkout-page h2 {
    color: var(--brand-ink);
}

.section-intro {
    margin: -0.85rem 0 1.25rem;
    color: var(--brand-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.checkout-page input[type="text"],
.checkout-page input[type="tel"],
.checkout-page input[type="email"] {
    min-height: 44px;
    border-color: #D1D5DB;
    border-radius: 0.625rem !important;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035) !important;
}

.checkout-page input[readonly] {
    background: #F3F4F6 !important;
    color: #4B5563;
}

.checkout-page input:focus {
    border-color: var(--brand-yellow) !important;
    box-shadow: 0 0 0 3px rgba(253, 194, 4, 0.2) !important;
}

.checkout-page button.bg-theme-primary {
    border: 1px solid #FFC400;
    border-radius: 0.625rem !important;
    box-shadow: 0 4px 10px rgba(253, 194, 4, 0.2) !important;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.checkout-page button.bg-theme-primary:hover {
    background: #FFC400;
    box-shadow: 0 6px 14px rgba(253, 194, 4, 0.28) !important;
}

.checkout-page button.bg-theme-primary:active {
    transform: translateY(1px);
}

.checkout-page button:focus-visible,
.checkout-page a:focus-visible {
    outline: 3px solid rgba(253, 194, 4, 0.38);
    outline-offset: 2px;
}

.action-note {
    margin-top: 0.65rem;
    color: var(--brand-muted);
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.checkout-page .payment-option {
    border-color: var(--brand-line);
    border-radius: 0.625rem !important;
    overflow: hidden;
}

.checkout-page .payment-option.cursor-not-allowed {
    display: none;
}

.checkout-page #pixOption {
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 2px rgba(253, 194, 4, 0.12);
}

.checkout-page #pixOption .payment-option-content > div {
    border: 0;
    border-top: 1px solid var(--brand-line);
    border-radius: 0;
    background: #FFFFFF;
}

.checkout-page .receipt-style {
    border: 1px solid var(--brand-line);
    border-radius: 0.625rem;
    background: #FAFAFA;
}

.checkout-page footer {
    background: #FFFFFF;
    border-color: var(--brand-line);
}

.checkout-page .bg-slate-900 {
    border: 1px solid #FFC400 !important;
    background: var(--brand-yellow) !important;
    color: var(--brand-ink) !important;
    box-shadow: 0 4px 10px rgba(253, 194, 4, 0.2) !important;
}

.checkout-page .bg-slate-900:hover {
    background: #FFC400 !important;
}

.checkout-page main .rounded-3xl {
    border-radius: 0.75rem !important;
}

.checkout-page .text-blue-500 {
    color: var(--brand-yellow-dark) !important;
}

@media (prefers-reduced-motion: reduce) {
    .checkout-page *,
    .checkout-page *::before,
    .checkout-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 640px) {
    .checkout-header > div {
        min-height: 64px;
    }

    .checkout-logo {
        width: 46px !important;
        height: 46px !important;
    }

    .checkout-assurances {
        justify-content: flex-start;
        gap: 0.45rem 0.8rem;
    }

    .checkout-page main {
        padding: 0.9rem 0.75rem 2rem;
    }

    .checkout-page section[class*="p-6"],
    .checkout-page section > div[class*="p-6"],
    .checkout-page #pixContainer > div {
        padding: 1.15rem !important;
    }

    .checkout-page h2.text-xl,
    .checkout-page h2.text-2xl {
        font-size: 1.12rem !important;
        line-height: 1.4;
    }
}

html { 
    scroll-behavior: smooth; 
}

@keyframes spin { 
    to { 
        transform: rotate(360deg); 
    } 
}

@keyframes pulse-dot {
    0% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(253, 194, 4, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(253, 194, 4, 0); }
    100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(253, 194, 4, 0); }
}

.pulsing-dot {
    animation: pulse-dot 2s infinite;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 16px; 
    height: 16px;
    border-radius: 50%; 
    border: 2px solid #FFC400;
    border-top-color: transparent; 
    animation: spin 0.8s linear infinite;
}

.input-loading::after {
    content: ''; 
    position: absolute; 
    right: 12px; 
    top: 50%;
    transform: translateY(-50%); 
    width: 16px; 
    height: 16px;
    border-radius: 50%; 
    border: 2px solid #ccc;
    border-top-color: #FFC400; /* amber-500 */
    animation: spin 0.8s linear infinite;
}

/* Custom input styles */
input[type="text"], input[type="tel"], input[type="email"] {
    transition: all 0.2s ease-in-out;
}

input:focus {
    box-shadow: 0 0 0 2px #FFC400;
    border-color: #FFC400; /* amber-500 */
    outline: none;
}

/* Collapsible section transition */
.collapsible-content {
    transition: max-height 0.5s ease-in-out, padding-top 0.3s ease-in-out, padding-bottom 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
}

.collapsible-content.expanded {
    max-height: 1000px; /* Adjust as needed */
    padding-top: 1.25rem; /* pt-5 */
    padding-bottom: 1.5rem; /* pb-6 */
}

/* Custom classes for payment block */
.bg-theme-primary { background-color: #FFC400; }
.hover\:bg-theme-primary-dark:hover { background-color: #FFC400; }
.text-theme-primary { color: #FFC400; }
.ring-theme-primary { --tw-ring-color: #FFC400; }
.bg-theme-light { background-color: #FFF4C2; }
.stroke-theme-primary { stroke: #FFC400; }
.fill-theme-primary { fill: #FFC400; }

/* Animation for live dot */
@keyframes pulse-live {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #FFC400;
    border-radius: 50%;
    animation: pulse-live 1.5s infinite;
}

.step-dot {
    border-radius: 9999px;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

.step-active { font-weight: 600; color: #FFC400; }
.step-inactive { color: #64748b; }
.step-complete { color: #16a34a; }

/* Estilo da Placa Mercosul */
.mercosul-plate {
    background-color: white;
    border: 1px solid #a0aec0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    overflow: hidden;
    width: 120px;
}
.mercosul-header {
    background-color: #0033a0;
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 2px;
}
.mercosul-plate span {
    display: block;
    text-align: center;
    font-size: 20px;
    letter-spacing: 2px;
    padding: 4px 0;
    color: #1a202c;
}
/* Leaflet map container style */
#mapContainer {
    z-index: 1; /* Ensures map is clickable */
}

/* Credit Card Visual */
.credit-card-visual {
    width: 320px;
    height: 200px;
    perspective: 1000px;
    margin: 0 auto 1.5rem;
}
.credit-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.credit-card-visual.flipped .credit-card-inner {
    transform: rotateY(180deg);
}
.credit-card-front, .credit-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    background: #FFC400;
    color: white;
    padding: 1.25rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Courier New', Courier, monospace;
}
.credit-card-back {
    transform: rotateY(180deg);
    background: #FFC400;
}
.card-black-strip {
    background: black;
    height: 40px;
    margin: 1rem -1.25rem 0;
}
.card-cvv-box {
    background: white;
    height: 30px;
    width: 100%;
    margin-top: 1rem;
    text-align: right;
    padding: 0.25rem 0.5rem;
    color: black;
    font-style: italic;
}
.payment-option-content {
    display: none;
}

/* Estilo de Nota Fiscal */
.receipt-style {
    font-family: 'Courier New', Courier, monospace;
    border: 2px dashed #9ca3af; /* gray-400 */
    padding: 1.5rem;
    background-color: #f8fafc; /* slate-50 */
    border-radius: 0.5rem;
}
.receipt-header {
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 1px dashed #9ca3af;
    padding-bottom: 1rem;
}
.receipt-items table {
    width: 100%;
    font-size: 0.875rem; /* text-sm */
}
.receipt-items th {
    text-align: left;
    border-bottom: 1px solid #e5e7eb; /* gray-200 */
    padding-bottom: 0.5rem;
    font-weight: 600;
}
.receipt-items td.item-name {
    word-break: break-word;
}
.receipt-totals {
    border-top: 1px dashed #9ca3af;
    margin-top: 1rem;
    padding-top: 1rem;
    font-weight: 600;
}
.receipt-totals div {
    display: flex;
    justify-content: space-between;
}

