/**
 * RapidLEI Certificate -- product page styles.
 * All rules scoped to #rl-cert-page to avoid theme conflicts.
 * Fonts and base text colour inherit from the theme body.
 */

/* -- CSS custom properties -------------------------------------------- */
#rl-cert-page {
    --rl-navy:    #0f2240;
    --rl-teal:    #00b8b0;
    --rl-green:   #16a34a;
    --rl-amber:   #d97706;
    --rl-red:     #dc2626;
    --rl-border:  #e2e8f0;
    --rl-bg:      #f4f6f9;
    --rl-muted:   #6b7280;
    --rl-radius:  8px;

    font-family: inherit;
    color: inherit;
    line-height: 1.55;
    padding: 0 0 48px;
}

/* -- Outer wrapper ------------------------------------------------------ */
#rl-cert-page .rl-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -- Entity confirmation bar -------------------------------------------- */
#rl-cert-page .rl-entity-bar {
    background: #eaf7f0;
    border: 1px solid #b6e4ce;
    border-radius: var(--rl-radius);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 18px;
    margin: 28px 0 32px;
}

#rl-cert-page .rl-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--rl-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

#rl-cert-page .rl-entity-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--rl-navy);
}

#rl-cert-page .rl-entity-lei {
    font-family: monospace;
    font-size: 13px;
    color: #4a5568;
    background: #fff;
    border: 1px solid #b6e4ce;
    border-radius: 4px;
    padding: 2px 9px;
    letter-spacing: 0.3px;
}

/* -- Two-column grid ---------------------------------------------------- */
#rl-cert-page .rl-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 820px) {
    #rl-cert-page .rl-grid {
        grid-template-columns: 1fr;
    }
    /* Action card first on mobile; preview below it */
    #rl-cert-page .rl-col-product { order: 1; }
    #rl-cert-page .rl-col-preview { order: 2; }
}

/* -- Certificate preview ------------------------------------------------ */
#rl-cert-page .rl-preview-card {
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#rl-cert-page .rl-preview-inner {
    position: relative;
    cursor: zoom-in;
}

#rl-cert-page .rl-preview-inner:focus-visible {
    outline: 3px solid var(--rl-teal);
    outline-offset: -3px;
}

#rl-cert-page .rl-preview-inner img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.8;
}

#rl-cert-page .rl-specimen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#rl-cert-page .rl-specimen span {
    font-size: 48px;
    font-weight: 900;
    color: rgba(220, 38, 38, 0.20);
    letter-spacing: 8px;
    text-transform: uppercase;
    transform: rotate(-30deg);
    user-select: none;
}

#rl-cert-page .rl-preview-caption {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--rl-muted);
    text-align: center;
    border-top: 1px solid var(--rl-border);
    margin: 0;
}

/* -- Product card ------------------------------------------------------- */
#rl-cert-page .rl-product-card {
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 30px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#rl-cert-page .rl-product-card h1,
#rl-cert-page .rl-product-card .rl-product-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--rl-navy);
    margin: 0 0 16px;
    line-height: 1.3;
}

#rl-cert-page .rl-product-card h2.rl-product-title {
    padding: 0;
    border: none;
}

/* -- Ordering-for block ------------------------------------------------- */
#rl-cert-page .rl-ordering-for {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: #f0f4fa;
    border: 1px solid #c8d8ee;
    border-radius: var(--rl-radius);
    padding: 12px 15px;
    margin-bottom: 18px;
}

#rl-cert-page .rl-ordering-entity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}

#rl-cert-page .rl-ordering-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rl-muted);
    white-space: nowrap;
}

#rl-cert-page .rl-ordering-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--rl-navy);
}

#rl-cert-page .rl-ordering-lei {
    font-family: monospace;
    font-size: 13px;
    color: #4a5568;
    background: #fff;
    border: 1px solid #c8d8ee;
    border-radius: 4px;
    padding: 2px 8px;
    letter-spacing: 0.4px;
}

/* -- Description -------------------------------------------------------- */
#rl-cert-page .rl-product-desc {
    color: #4a5568;
    margin: 22px 0 18px;
    padding-top: 20px;
    border-top: 1px solid var(--rl-border);
    line-height: 1.6;
}

/* -- What's included ---------------------------------------------------- */
#rl-cert-page .rl-included {
    background: #f8fbff;
    border: 1px solid #dde8f5;
    border-radius: var(--rl-radius);
    padding: 16px 18px;
    margin-bottom: 18px;
}

#rl-cert-page .rl-included h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--rl-muted);
    margin: 0 0 12px;
}

#rl-cert-page .rl-included ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

#rl-cert-page .rl-included li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.45;
    color: #1a1a2e;
}

#rl-cert-page .rl-included li::before {
    content: '';
    flex-shrink: 0;
    margin-top: 4px;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23dcfce7'/%3E%3Cpath d='M5 8l2.5 2.5L11 5.5' stroke='%2316a34a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") no-repeat center/contain;
}

/* -- eSeal badge -------------------------------------------------------- */
#rl-cert-page .rl-eseal {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--rl-radius);
    padding: 13px 15px;
    margin-bottom: 0;
}

#rl-cert-page .rl-eseal-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--rl-amber);
}

#rl-cert-page .rl-eseal strong {
    display: block;
    color: #92400e;
    margin-bottom: 3px;
}

#rl-cert-page .rl-eseal p {
    font-size: 12px;
    color: #92400e;
    opacity: 0.85;
    margin: 0;
    line-height: 1.5;
}

/* -- Price row ---------------------------------------------------------- */
#rl-cert-page .rl-price-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

#rl-cert-page .rl-price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

#rl-cert-page .rl-price-currency {
    font-size: 20px;
    font-weight: 700;
    color: var(--rl-navy);
}

#rl-cert-page .rl-price-amount {
    font-size: 34px;
    font-weight: 800;
    color: var(--rl-navy);
    line-height: 1;
}

#rl-cert-page .rl-price-sub {
    display: flex;
    align-items: center;
    gap: 0;
    color: var(--rl-muted);
}

#rl-cert-page .rl-price-note {
    font-size: 13px;
    color: var(--rl-muted);
}

/* -- Currency selector -------------------------------------------------- */
#rl-cert-page .rl-currency-select {
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    color: var(--rl-navy);
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

#rl-cert-page .rl-currency-select:focus {
    border-color: var(--rl-navy);
    box-shadow: 0 0 0 2px rgba(15,34,64,0.08);
}

/* -- Form --------------------------------------------------------------- */
#rl-cert-page .rl-form-group {
    margin-bottom: 14px;
}

#rl-cert-page .rl-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

#rl-cert-page .rl-form-group input[type="email"] {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#rl-cert-page .rl-form-group input[type="email"]:focus {
    border-color: var(--rl-navy);
    box-shadow: 0 0 0 3px rgba(15, 34, 64, 0.08);
}

#rl-cert-page .rl-form-group input[type="email"]::placeholder {
    color: #9ca3af;
}

#rl-cert-page .rl-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

#rl-cert-page .rl-terms-row input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
    width: 15px;
    height: 15px;
    accent-color: var(--rl-navy);
    cursor: pointer;
}

#rl-cert-page .rl-terms-row label {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.5;
    cursor: pointer;
}

#rl-cert-page .rl-terms-row a {
    color: var(--rl-navy);
    text-decoration: underline;
}

/* -- Error message ------------------------------------------------------ */
#rl-cert-page .rl-error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: var(--rl-red);
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: none;
}

/* -- CTA button --------------------------------------------------------- */
#rl-cert-page .rl-btn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--rl-navy);
    color: #fff;
    border: none;
    border-radius: var(--rl-radius);
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.15s;
}

#rl-cert-page .rl-btn-pay:hover:not(:disabled) {
    background: #1a3a60;
}

#rl-cert-page .rl-btn-pay:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#rl-cert-page .rl-pay-note {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin: 8px 0 0;
}

/* -- Trust bar ---------------------------------------------------------- */
#rl-cert-page .rl-trust-bar {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 5px 18px;
    margin-top: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#rl-cert-page .rl-trust-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
    padding: 10px 0;
    border-bottom: 1px solid var(--rl-border);
}

#rl-cert-page .rl-trust-item:last-child {
    border-bottom: none;
}

#rl-cert-page .rl-trust-item::before {
    content: '';
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23dcfce7'/%3E%3Cpath d='M5 8l2.5 2.5L11 5.5' stroke='%2316a34a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") no-repeat center/contain;
}

/* -- Error state page --------------------------------------------------- */
#rl-cert-page .rl-error-state {
    max-width: 540px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 40px 36px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#rl-cert-page .rl-error-state h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--rl-navy);
    margin: 0 0 12px;
}

#rl-cert-page .rl-error-state p {
    font-size: 14px;
    color: #4a5568;
    margin: 0 0 24px;
    line-height: 1.6;
}

#rl-cert-page .rl-error-state a {
    display: inline-block;
    background: var(--rl-navy);
    color: #fff;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

#rl-cert-page .rl-error-state a:hover {
    background: #1a3a60;
}

/* -- Confirmation (success) state --------------------------------------- */
#rl-cert-page .rl-confirmation,
#rl-cert-page .rl-cancelled {
    max-width: 580px;
    margin: 48px auto;
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    padding: 48px 40px 40px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#rl-cert-page .rl-conf-icon {
    margin-bottom: 20px;
}

#rl-cert-page .rl-confirmation h1,
#rl-cert-page .rl-cancelled h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--rl-navy);
    margin: 0 0 12px;
}

#rl-cert-page .rl-conf-desc {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 24px;
    line-height: 1.6;
}

#rl-cert-page .rl-cancelled p {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 24px;
    line-height: 1.6;
}

#rl-cert-page .rl-conf-detail {
    background: #f8fbff;
    border: 1px solid #dde8f5;
    border-radius: var(--rl-radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    text-align: left;
}

#rl-cert-page .rl-conf-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--rl-border);
}

#rl-cert-page .rl-conf-row:last-child {
    border-bottom: none;
}

#rl-cert-page .rl-conf-row-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--rl-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 90px;
    flex-shrink: 0;
}

#rl-cert-page .rl-conf-row-value {
    font-size: 14px;
    color: var(--rl-navy);
    font-weight: 600;
}

#rl-cert-page code.rl-conf-row-value {
    font-family: monospace;
    letter-spacing: 0.3px;
}

#rl-cert-page .rl-conf-note {
    font-size: 13px;
    color: var(--rl-muted);
    margin: 0 0 28px;
    line-height: 1.55;
}

#rl-cert-page .rl-conf-note a {
    color: var(--rl-navy);
    text-decoration: underline;
}

#rl-cert-page .rl-conf-btn {
    display: inline-block;
    background: var(--rl-navy);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--rl-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

#rl-cert-page .rl-conf-btn:hover {
    background: #1a3a60;
}

#rl-cert-page .rl-conf-btn-secondary {
    background: #f0f4fa;
    color: var(--rl-navy);
    border: 1px solid #c8d8ee;
}

#rl-cert-page .rl-conf-btn-secondary:hover {
    background: #dde8f5;
}

/* -- Preview lightbox (overlay appended to body by product-page.js) ------ */
.rl-cert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 18, 35, 0.85);
    cursor: zoom-out;
}

.rl-cert-lightbox img {
    max-width: min(92vw, 860px);
    max-height: 92vh;
    width: auto;
    height: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
}
