/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #111827;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
    background-color: #4A04A5;
    padding: 0.625rem 0;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0.75rem;
    display: flex;
    justify-content: flex-end;
}

/* Header Loading Line (Mobile only) */
.header-loading-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.15);
    overflow: hidden;
    display: none;
}

.header-loading-line-fill {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 30%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.4) 70%, 
        transparent 100%);
    animation: headerLoadingLine 1.5s ease-in-out infinite;
    transform: translateX(-100%);
}

@keyframes headerLoadingLine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(calc(100vw + 100%));
    }
}

@media (min-width: 768px) {
    .header-loading-line {
        display: none !important;
    }
}

@media (min-width: 640px) {
    .header {
        padding: 0.875rem 0;
    }
    
    .header-container {
        padding: 0 1rem;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 1rem 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .header-container {
        padding: 0 1.25rem;
    }
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.header-badge .icon {
    width: 0.875rem;
    height: 0.875rem;
}

/* Loading State */
.loading-container,
.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.loading-content,
.error-content {
    text-align: center;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 2px solid #e5e7eb;
    border-top-color: #4A04A5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    color: #4b5563;
}

.error-text {
    color: #dc2626;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem;
}

@media (min-width: 640px) {
    .container {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 1.5rem 1.25rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 2.5rem 1.25rem;
    }
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* Column */
.column {
    max-width: 100%;
    margin: 0 auto;
}

.column.main-column {
    max-width: 100%;
}

@media (min-width: 1024px) {
    .column {
        max-width: none;
    }
}

/* Card */
.card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.payment-card {
    padding: 1rem;
}

@media (min-width: 640px) {
    .card {
        padding: 1.25rem;
        border-radius: 1rem;
    }
    
    .payment-card {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .card {
        padding: 1.5rem;
        border-radius: 1.25rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .payment-card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .card {
        padding: 2.5rem;
        border-radius: 1.5rem;
    }
    
    .payment-card {
        padding: 2.5rem;
    }
}

/* Loading Bar (removed - using header loading line instead) */

/* Order Info Top (Mobile) */
.order-info-top {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.order-id-top {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #111827;
    margin-bottom: 0.25rem;
}

.order-amount-top {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.4;
}

.order-amount-top strong {
    color: #4A04A5;
    font-weight: 700;
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .order-info-top {
        display: none;
    }
}

/* Payment Title Section (Mobile only) */
.payment-title-section {
    margin-bottom: 1rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .payment-title-section {
        display: none;
    }
}

.payment-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.payment-subtitle {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
}

@media (min-width: 640px) {
    .payment-title {
        font-size: 1.5rem;
    }
    
    .payment-subtitle {
        font-size: 0.9375rem;
    }
}

@media (min-width: 768px) {
    .payment-title-section {
        margin-bottom: 1.5rem;
    }
    
    .payment-title {
        font-size: 1.75rem;
    }
    
    .payment-subtitle {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .payment-title-section {
        text-align: left;
        margin-bottom: 2rem;
    }
    
    .payment-title {
        font-size: 2rem;
    }
}

/* Card Header */
.card-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
}

@media (min-width: 1024px) {
    .card-header {
        display: flex;
    }
}

.header-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
}

.header-item.green {
    color: #059669;
}

.header-item .icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Product Card */
.product-card {
    background-color: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
    .product-card {
        padding: 1.25rem;
    }
}

@media (min-width: 768px) {
    .product-card {
        padding: 1.5rem;
        border-radius: 1rem;
        margin-bottom: 1.5rem;
    }
}

.product-header {
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.product-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .product-header {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .product-content {
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

.product-icons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.product-icon {
    width: 4rem;
    height: 4rem;
    min-width: 4rem;
    min-height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background-color: white;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .product-icon {
        width: 3.5rem;
        height: 3.5rem;
        min-width: 3.5rem;
        min-height: 3.5rem;
    }
    
    .product-icons {
        gap: 0.375rem;
    }
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.product-icon.fallback {
    background-color: #4A04A5;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.product-details {
    flex: 1;
}

.product-title {
    font-weight: bold;
    font-size: 0.875rem;
    color: #111827;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.product-order {
    font-size: 0.6875rem;
    color: #4b5563;
    margin-bottom: 0.125rem;
}

.product-price {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 500;
}

@media (min-width: 768px) {
    .product-title {
        font-size: 1rem;
        margin-bottom: 0.375rem;
        line-height: 1.5;
    }
    
    .product-order {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .product-price {
        font-size: 0.875rem;
    }
}

.product-status {
    display: none;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #4A04A5;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

@media (min-width: 768px) {
    .product-status {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.75rem;
        color: #4b5563;
        font-weight: 500;
    }
}

/* Instructions */
.instructions {
    display: none;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

@media (min-width: 768px) {
    .instructions {
        display: block;
        margin-top: 0;
    }
}

@media (min-width: 1024px) {
    .instructions {
        text-align: left;
    }
}

/* Copy Button (Desktop only) */
.copy-button {
    width: 100%;
    border-radius: 0.75rem;
    padding: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    margin-bottom: 1rem;
    border: 2px solid #e5e7eb;
    background-color: white;
    color: #111827;
    cursor: pointer;
    min-height: 3.5rem;
}

@media (min-width: 1024px) {
    .copy-button {
        display: flex;
    }
}

.copy-button:hover {
    border-color: #4A04A5;
    background-color: #faf5ff;
}

.copy-button.copied {
    background-color: #dcfce7;
    border-color: #059669;
    color: #047857;
}

.copy-button .icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Timer Section */
.timer-section {
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    text-align: center;
    margin-bottom: 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.timer-section.warning {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.timer-section.expired {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

.timer-label {
    font-size: 0.625rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.timer-section.warning .timer-display {
    color: #dc2626;
}

.timer-section.expired .timer-display {
    color: #991b1b;
}

.timer-display .icon {
    width: 0.875rem;
    height: 0.875rem;
}

@media (min-width: 768px) {
    .timer-section {
        border-radius: 1rem;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        background: linear-gradient(to bottom right, #4A04A5, #3a0385);
        border: none;
    }
    
    .timer-section.warning {
        background: linear-gradient(to bottom right, #dc2626, #b91c1c);
    }
    
    .timer-section.expired {
        background: linear-gradient(to bottom right, #991b1b, #7f1d1d);
    }
    
    .timer-label {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 0.5rem;
    }
    
    .timer-display {
        font-size: 2.25rem;
        color: white;
        gap: 0.5rem;
    }
    
    .timer-section.warning .timer-display,
    .timer-section.expired .timer-display {
        color: white;
    }
    
    .timer-display .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Order Info */
.order-info {
    text-align: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    display: none;
}

.order-id {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.order-amount {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.order-amount strong {
    color: #111827;
    font-weight: 700;
}

@media (min-width: 768px) {
    .order-info {
        display: block;
        margin-bottom: 1.5rem;
        padding: 1.25rem;
    }
    
    .order-id {
        font-size: 0.9375rem;
    }
    
    .order-amount {
        font-size: 0.9375rem;
    }
}

/* Footer */
.footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.footer-text {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.footer-id {
    font-size: 0.625rem;
    color: #d1d5db;
    font-family: monospace;
}

@media (min-width: 768px) {
    .footer {
        margin-top: 2.5rem;
        padding-top: 1.5rem;
    }
    
    .footer-text {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-id {
        font-size: 0.6875rem;
    }
}

/* QR Section Mobile */
.qr-section-mobile {
    text-align: center;
    margin-bottom: 1.25rem;
}

@media (min-width: 1024px) {
    .qr-section-mobile {
        display: none;
    }
}

/* QR Section Desktop */
.qr-section {
    text-align: center;
    margin-bottom: 1.5rem;
    display: none;
}

@media (min-width: 1024px) {
    .qr-section {
        display: block;
    }
}

.qr-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.qr-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.qr-hint .icon {
    width: 1.125rem;
    height: 1.125rem;
}

@media (min-width: 1024px) {
    .qr-hint {
        margin-bottom: 1.5rem;
    }
}

.qr-image-container {
    display: inline-block;
    background-color: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.qr-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    display: block;
}

@media (min-width: 640px) {
    .qr-image-container {
        padding: 1rem;
    }
    
    .qr-image {
        max-width: 240px;
    }
}

@media (min-width: 768px) {
    .qr-section-mobile {
        margin-bottom: 2rem;
    }
    
    .qr-image-container {
        padding: 1.25rem;
        border-radius: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .qr-image {
        max-width: 280px;
    }
}

@media (min-width: 1024px) {
    .qr-section .qr-image-container {
        padding: 1.25rem;
        border-radius: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .qr-section .qr-image {
        max-width: 320px;
    }
    
    .qr-section-mobile .qr-image {
        max-width: 200px;
    }
}

/* PIX Code Section Mobile */
.pix-code-section-mobile {
    margin-bottom: 1rem;
}

.pix-code-section-mobile .pix-code-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .pix-code-section-mobile {
        display: none;
    }
}


.pix-code-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
}

.pix-code-input {
    flex: 1;
    background-color: transparent;
    border: none;
    outline: none;
    font-family: monospace;
    font-size: 0.75rem;
    color: #111827;
    padding: 0.5rem;
    word-break: break-all;
    min-width: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

@media (min-width: 640px) {
    .pix-code-input {
        font-size: 0.8125rem;
        padding: 0.625rem;
    }
}

.pix-code-input:focus {
    outline: none;
}

.copy-pix-button {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    background-color: #4A04A5;
    color: white;
    border: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.copy-pix-button:hover {
    background-color: #3a0385;
    transform: scale(1.05);
}

.copy-pix-button:active {
    transform: scale(0.95);
}

.copy-pix-button.copied {
    background-color: #059669;
}

.copy-pix-button .icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
}

@media (min-width: 640px) {
    .copy-pix-button {
        width: 100%;
        height: 3.5rem;
        margin-top: 0.5rem;
    }
    
    .copy-pix-button .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Success Page */
.success-page {
    min-height: 100vh;
}

.success-card {
    max-width: 42rem;
    margin: 0 auto;
    background-color: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #dcfce7, #bbf7d0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.success-icon svg {
    width: 50px;
    height: 50px;
}

.success-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.75rem;
    text-align: center;
}

.success-message {
    font-size: 0.9375rem;
    color: #4b5563;
    margin-bottom: 2rem;
    text-align: center;
}

.success-message strong {
    color: #111827;
}

/* Codes List */
.codes-list-container {
    margin-top: 2rem;
}

.codes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.codes-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.copy-all-button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #4A04A5;
    color: white;
    border: none;
    cursor: pointer;
}

.copy-all-button:hover {
    background-color: #3a0385;
}

.copy-all-button.copied {
    background-color: #059669;
}

.copy-all-button .icon {
    width: 1rem;
    height: 1rem;
}

.codes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.code-item {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.2s;
}

.code-item:hover {
    background-color: #f3f4f6;
    border-color: #4A04A5;
}

.code-item.copied {
    background-color: #faf5ff;
    border-color: #4A04A5;
}

.code-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.code-info {
    flex: 1;
}

.code-platform {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4A04A5;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.code-text {
    font-family: monospace;
    font-size: 0.875rem;
    color: #111827;
    word-break: break-all;
    cursor: pointer;
    user-select: all;
}

.copy-code-button {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    transition: all 0.2s;
    background-color: #4A04A5;
    color: white;
    border: none;
    cursor: pointer;
}

.copy-code-button:hover {
    background-color: #3a0385;
}

.copy-code-button.copied {
    background-color: #059669;
}

.no-codes {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    color: #4b5563;
}

/* Responsive */
@media (max-width: 640px) {
    .codes-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .copy-all-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    /* Mobile-specific adjustments */
    .payment-card {
        padding: 1rem;
    }
    
    .payment-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }
    
    .payment-subtitle {
        font-size: 0.75rem;
    }
    
    .pix-code-container {
        padding: 0.625rem;
    }
    
    .pix-code-input {
        font-size: 0.6875rem;
        padding: 0.5rem;
    }
    
    .copy-pix-button {
        width: 100%;
        height: 2.75rem;
        margin-top: 0.5rem;
    }
}
