/**
 * Quick Pay Stylesheet
 * Responsive, Modern, RTL-First, Distraction-Free Payment Experience
 */

:root {
    --wc-qp-primary: #004733;
    --wc-qp-primary-hover: #003626;
    --wc-qp-accent: #D4AF37;
    --wc-qp-bg: #f8fafc;
    --wc-qp-card-bg: #ffffff;
    --wc-qp-text: #1e293b;
    --wc-qp-text-muted: #64748b;
    --wc-qp-border: #e2e8f0;
    --wc-qp-border-focus: #004733;
    --wc-qp-radius: 14px;
    --wc-qp-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body.wc-quick-pay-body {
    margin: 0;
    padding: 0;
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--wc-qp-bg);
    color: var(--wc-qp-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wc-qp-page-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px 60px;
}

.wc-qp-main {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

/* ─── Header Section ────────────────────────────────── */
.wc-qp-header-section {
    text-align: center;
    margin-bottom: 28px;
}

.wc-qp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6f4ea;
    color: #137333;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 16px;
    border: 1px solid #ceead6;
}

.wc-qp-logo-wrap {
    margin-bottom: 12px;
}

.wc-qp-logo {
    max-height: 65px;
    max-width: 220px;
    height: auto;
    object-fit: contain;
}

.wc-qp-brand-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--wc-qp-primary);
    margin-bottom: 8px;
}

.wc-qp-heading {
    font-size: 24px;
    font-weight: 800;
    color: var(--wc-qp-text);
    margin: 0 0 8px;
    line-height: 1.3;
}

.wc-qp-subheading {
    font-size: 14px;
    color: var(--wc-qp-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ─── Cards ─────────────────────────────────────────── */
.wc-qp-card {
    background: var(--wc-qp-card-bg);
    border: 1px solid var(--wc-qp-border);
    border-radius: var(--wc-qp-radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--wc-qp-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wc-qp-card:hover {
    border-color: #cbd5e1;
}

.wc-qp-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wc-qp-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--wc-qp-border);
}

.wc-qp-card-icon {
    font-size: 18px;
}

/* ─── Amount Card ───────────────────────────────────── */
.wc-qp-amount-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdfd 100%);
    border: 2px solid var(--wc-qp-border);
    text-align: center;
}

.wc-qp-amount-card .wc-qp-label {
    justify-content: center;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 700;
}

.wc-qp-amount-input-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 6px 16px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

.wc-qp-amount-input-group:focus-within {
    border-color: var(--wc-qp-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 71, 51, 0.12);
}

.wc-qp-amount-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 36px;
    font-weight: 900;
    text-align: center;
    color: var(--wc-qp-primary);
    outline: none;
    font-family: inherit;
    direction: ltr;
}

.wc-qp-amount-input::placeholder {
    color: #cbd5e1;
}

.wc-qp-currency-tag {
    font-size: 18px;
    font-weight: 800;
    color: var(--wc-qp-text-muted);
    margin-inline-start: 8px;
}

.wc-qp-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.wc-qp-preset-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.wc-qp-preset-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.wc-qp-preset-btn.is-active {
    background: var(--wc-qp-primary);
    color: #ffffff;
    border-color: var(--wc-qp-primary);
}

.wc-qp-amount-limits {
    font-size: 12px;
    color: var(--wc-qp-text-muted);
    margin-top: 10px;
}

/* ─── Form Inputs ───────────────────────────────────── */
.wc-qp-field-group {
    margin-bottom: 14px;
}

.wc-qp-field-group:last-child {
    margin-bottom: 0;
}

.wc-qp-grid-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .wc-qp-grid-fields {
        grid-template-columns: 1fr;
    }
}

.wc-qp-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.wc-qp-required {
    color: #ef4444;
}

.wc-qp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.wc-qp-input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
}

[dir="ltr"] .wc-qp-input-icon {
    right: auto;
    left: 14px;
}

.wc-qp-input {
    width: 100%;
    padding: 11px 40px 11px 14px;
    border: 1.5px solid var(--wc-qp-border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--wc-qp-text);
    background: #ffffff;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

[dir="ltr"] .wc-qp-input {
    padding: 11px 14px 11px 40px;
}

.wc-qp-input:focus {
    border-color: var(--wc-qp-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 51, 0.1);
}

.wc-qp-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--wc-qp-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--wc-qp-text);
    background: #ffffff;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: all 0.2s ease;
}

.wc-qp-textarea:focus {
    border-color: var(--wc-qp-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 51, 0.1);
}

.wc-qp-field-hint {
    display: block;
    font-size: 11px;
    color: var(--wc-qp-text-muted);
    margin-top: 4px;
}

/* ─── Gateways List ─────────────────────────────────── */
.wc-qp-gateways-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wc-qp-gateway-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid var(--wc-qp-border);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.wc-qp-gateway-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.wc-qp-gateway-item.is-selected {
    border-color: var(--wc-qp-primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(0, 71, 51, 0.1);
}

.wc-qp-gateway-radio-wrap {
    margin-inline-end: 12px;
    display: flex;
    align-items: center;
}

.wc-qp-gateway-radio {
    accent-color: var(--wc-qp-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wc-qp-gateway-info {
    flex: 1;
}

.wc-qp-gateway-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-qp-gateway-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wc-qp-text);
}

.wc-qp-badge-recommended {
    background: var(--wc-qp-accent);
    color: #451a03;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
}

.wc-qp-gateway-desc {
    font-size: 12px;
    color: var(--wc-qp-text-muted);
    margin: 4px 0 0;
    line-height: 1.4;
}

.wc-qp-gateway-icon img {
    max-height: 28px;
    max-width: 60px;
    height: auto;
    object-fit: contain;
}

.wc-qp-gateway-icon-fallback {
    font-size: 20px;
}

/* ─── Submit Button & Actions ───────────────────────── */
.wc-qp-submit-card {
    margin-top: 24px;
}

.wc-qp-submit-btn {
    width: 100%;
    background: var(--wc-qp-primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 71, 51, 0.25);
    transition: all 0.2s ease;
}

.wc-qp-submit-btn:hover:not(:disabled) {
    background: var(--wc-qp-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 71, 51, 0.3);
}

.wc-qp-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.wc-qp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.wc-qp-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wc-qp-spin 0.8s linear infinite;
    display: inline-block;
}

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

.wc-qp-trust-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--wc-qp-text-muted);
}

.wc-qp-trust-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Notices & Alerts ──────────────────────────────── */
.wc-qp-notice {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.wc-qp-notice-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wc-qp-notice-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wc-qp-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
}

.wc-qp-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ─── Footer Section ────────────────────────────────── */
.wc-qp-footer-section {
    text-align: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.wc-qp-payment-icons-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.wc-qp-pay-icon {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.wc-qp-support-box {
    margin-bottom: 16px;
}

.wc-qp-support-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--wc-qp-text-muted);
    margin: 0 0 10px;
}

.wc-qp-support-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wc-qp-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wc-qp-support-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.wc-qp-support-btn.wc-qp-wa {
    background: #25D366;
    color: #ffffff;
    border-color: #25D366;
}

.wc-qp-support-btn.wc-qp-wa:hover {
    background: #1eb855;
}

.wc-qp-legal-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
}

.wc-qp-legal-links a {
    color: var(--wc-qp-text-muted);
    text-decoration: none;
}

.wc-qp-legal-links a:hover {
    color: var(--wc-qp-primary);
    text-decoration: underline;
}

.wc-qp-copyright {
    font-size: 12px;
    color: #94a3b8;
}

.wc-qp-copyright p {
    margin: 0;
}

/* ─── Marketing / Developer Credit Badge at Bottom Edge ─── */
.wc-qp-marketing-credit {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    line-height: 1.4;
}

.wc-qp-credit-label {
    color: #94a3b8;
    font-weight: 500;
}

.wc-qp-credit-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 3px 12px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

.wc-qp-credit-item {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
    font-size: 11px;
    transition: color 0.15s ease;
}

.wc-qp-credit-item:hover {
    color: var(--wc-qp-primary);
    text-decoration: underline;
}

.wc-qp-credit-sep {
    color: #cbd5e1;
    font-size: 9px;
}
