/* ============================================
   Checkout Modal
   ============================================ */
.checkout-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.checkout-overlay.active {
    display: flex;
}

.checkout-modal {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    padding: 32px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.checkout-close:hover {
    background: #f0f0f0;
    color: #333;
}

.checkout-title {
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #1a1a1a;
    margin: 0 0 20px;
    text-align: center;
}

/* Tabs */
.checkout-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.checkout-tab {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #666;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.checkout-tab.active {
    border-color: #1a3a8a;
    background: #1a3a8a;
    color: #fff;
}

.checkout-tab:hover:not(.active) {
    border-color: #999;
}

/* Tab content */
.checkout-tab-content {
    display: none;
}

.checkout-tab-content.active {
    display: block;
}

/* Form fields */
.checkout-field {
    margin-bottom: 14px;
}

.checkout-field label {
    display: block;
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 6px;
}

.checkout-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-family: 'Mulish', sans-serif;
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #fafafa;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.checkout-field input:focus {
    outline: none;
    border-color: #1a3a8a;
    background: #fff;
}

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

.checkout-field-row .checkout-field {
    flex: 1;
}

/* Pay button */
.checkout-pay-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #1a6b3c, #0d4a2a);
    color: #fff;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.checkout-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26,107,60,0.4);
}

.checkout-pay-pix {
    background: linear-gradient(135deg, #1a3a8a, #0d2563);
}

.checkout-pay-pix:hover {
    box-shadow: 0 4px 16px rgba(26,58,138,0.4);
}

/* States */
.checkout-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 0;
}

.checkout-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e8e8e8;
    border-top-color: #1a6b3c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.checkout-spinner-small {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

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

.checkout-state-title {
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: #1a1a1a;
}

.checkout-state-text {
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    color: #888;
    line-height: 1.5;
}

.checkout-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a6b3c, #0d4a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
}

.checkout-error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c62828, #b71c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
}

.checkout-done-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #1a6b3c, #0d4a2a);
    color: #fff;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s;
}

.checkout-done-btn:hover {
    transform: translateY(-1px);
}

.checkout-cancel-btn {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #aaa;
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkout-cancel-btn:hover {
    color: #666;
}

/* PIX */
.checkout-pix-info {
    text-align: center;
    padding: 24px 0;
    color: #888;
}

.checkout-pix-info i {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    color: #1a3a8a;
}

.checkout-pix-info p {
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0;
}

.checkout-pix-qr {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-pix-qr img {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
}

.checkout-pix-copy-wrap {
    display: flex;
    gap: 8px;
    width: 100%;
}

.checkout-pix-code {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-family: monospace;
    font-size: 0.75rem;
    color: #333;
    background: #f5f5f5;
    min-width: 0;
}

.checkout-pix-copy-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #1a3a8a;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.checkout-pix-copy-btn:hover {
    background: #f0f0f0;
}

.checkout-pix-timer {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #c62828;
}

.checkout-pix-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #888;
}
