/* CCP Checkout Styles */

/* ── Modal Overlay ──────────────────────────────────────────────────────────── */
.ccp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.ccp-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.ccp-modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    z-index: 1;
}

.ccp-close-x {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
.ccp-close-x:hover { color: #000; }

.ccp-modal-title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
}

.ccp-modal-price {
    margin: 0 0 20px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #2563eb;
}

/* ── Form ────────────────────────────────────────────────────────────────────── */
.ccp-payment-form label,
.ccp-invoice-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.ccp-payment-form label span,
.ccp-invoice-form label span {
    color: #dc2626;
    margin-left: 2px;
}

.ccp-payment-form input,
.ccp-invoice-form input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

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

.ccp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ccp-row.ccp-three {
    grid-template-columns: 2fr 1fr 1fr;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

.ccp-card-label {
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
}

/* ── Button ──────────────────────────────────────────────────────────────────── */
.ccp-btn-pay {
    display: inline-block;
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.ccp-btn-pay:hover { background: #1d4ed8; }
.ccp-btn-pay:active { transform: scale(0.98); }

.ccp-btn-submit {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #16a34a;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.ccp-btn-submit:hover    { background: #15803d; }
.ccp-btn-submit:disabled { background: #9ca3af; cursor: not-allowed; }

/* ── Messages ────────────────────────────────────────────────────────────────── */
.ccp-messages { margin-bottom: 16px; }

.ccp-msg-success,
.ccp-msg-error {
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.ccp-msg-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.ccp-msg-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Secure note ─────────────────────────────────────────────────────────────── */
.ccp-secure-note {
    text-align: center;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 16px;
}

/* ── Invoice page ────────────────────────────────────────────────────────────── */
.ccp-invoice-page {
    max-width: 520px;
    margin: 40px auto;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .ccp-modal-box { padding: 20px; }
    .ccp-row { grid-template-columns: 1fr; }
}
