/* Si Ali Automation — frontend checkout + thank-you styles.
 * Used by:
 *   templates/checkout.php          (shortcode [ltv_trial_checkout])
 *   templates/thank-you.php         (shortcode [ltv_trial_thank_you])
 *   templates/paid-checkout.php     (shortcode [ltv_paid_checkout])
 *   templates/paid-thank-you.php    (shortcode [ltv_paid_thank_you])
 */

.ltv-checkout, .ltv-thanks {
    max-width: 640px;
    margin: 24px auto;
    padding: 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15,23,42,.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
}

.ltv-thanks { max-width: 680px; padding: 32px; }

.ltv-checkout *, .ltv-thanks * { box-sizing: border-box; }

.ltv-checkout-header, .ltv-thanks-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
}
.ltv-checkout-header img, .ltv-thanks-header img { max-height: 48px; border-radius: 6px; }
.ltv-checkout-header h2, .ltv-thanks-header h2 { margin: 0; font-size: 22px; color: #0f172a; line-height: 1.3; }

.ltv-checkout label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    line-height: 1.4;
}
.ltv-checkout .ltv-req { color: #dc2626; margin-left: 2px; }

/* --- The fix: every form control is the same height, padded the same,
 *     and uses the same line-height so option/value text sits centred.    */
.ltv-checkout input,
.ltv-checkout select,
.ltv-checkout textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    line-height: 1.4;
    color: #0f172a;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.ltv-checkout textarea {
    min-height: 96px;
    resize: vertical;
    padding: 12px 14px;
}

/* The select needs the appearance reset above + a real caret because
   without -webkit-appearance:none different browsers render at different
   heights and don't vertically centre the selected option. */
.ltv-checkout select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    cursor: pointer;
}
/* IE / Edge legacy: hide native arrow. */
.ltv-checkout select::-ms-expand { display: none; }

.ltv-checkout input:focus,
.ltv-checkout select:focus,
.ltv-checkout textarea:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 0;
    border-color: #8b5cf6;
}

.ltv-checkout .ltv-submit {
    display: block;
    width: 100%;
    margin-top: 22px;
    min-height: 50px;
    background: #8b5cf6;
    color: #fff;
    border: 0;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.ltv-checkout .ltv-submit:hover { background: #7c3aed; }
.ltv-checkout .ltv-submit:disabled { background: #cbd5e1; cursor: not-allowed; }

.ltv-msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
}
.ltv-msg-err  { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.ltv-msg-ok   { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.ltv-msg-warn { background: #fef3c7; border: 1px solid #fde68a; color: #854d0e; }

.ltv-checkout .ltv-ref-hint { margin-top: 10px; font-size: 13px; color: #64748b; }
.ltv-checkout .ltv-ref-hint code { background: #f1f5f9; padding: 2px 7px; border-radius: 4px; }

/* --- Thank-you page bits --- */
.ltv-thanks h3 {
    margin: 24px 0 8px;
    font-size: 17px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ltv-creds {
    background: #f8fafc;
    border-left: 4px solid #8b5cf6;
    padding: 18px;
    border-radius: 0 8px 8px 0;
    margin: 10px 0;
}
.ltv-creds p { margin: 8px 0; font-size: 15px; line-height: 1.5; }
.ltv-creds code {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 15px;
    font-weight: 600;
    word-break: break-all;
}

.ltv-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}
.ltv-st-ok      { background: #d1fae5; color: #065f46; }
.ltv-st-fail    { background: #fee2e2; color: #991b1b; }
.ltv-st-pending { background: #fef3c7; color: #854d0e; }

.ltv-support {
    margin-top: 24px;
    padding: 18px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ltv-support h3 { margin-top: 0; font-size: 15px; }
.ltv-support p { margin: 6px 0; font-size: 14px; color: #475569; }
.ltv-support a { color: #8b5cf6; text-decoration: none; font-weight: 600; }
.ltv-support a:hover { text-decoration: underline; }

.ltv-footer-msg {
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
    font-style: italic;
}

/* Paid checkout: product card list */
.ltv-checkout .ltv-product-meta {
    margin: 6px 0 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}
.ltv-checkout .ltv-product-price {
    color: #8b5cf6;
    font-weight: 700;
}

/* Paid thank-you: order summary table */
.ltv-thanks .ltv-summary {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 10px 0 22px;
}
.ltv-thanks .ltv-summary td {
    padding: 8px 4px;
    border-bottom: 1px solid #f1f5f9;
}
.ltv-thanks .ltv-summary td:first-child {
    color: #64748b;
    font-weight: 600;
    width: 160px;
}
.ltv-thanks .ltv-pay-btn {
    display: inline-block;
    width: 100%;
    margin-top: 18px;
    padding: 16px 24px;
    background: #16a34a;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    transition: background .15s;
}
.ltv-thanks .ltv-pay-btn:hover { background: #15803d; }

/* --- Mobile responsive --- */
@media (max-width: 640px) {
    .ltv-checkout, .ltv-thanks {
        margin: 12px;
        padding: 18px;
        border-radius: 10px;
    }
    .ltv-checkout-header h2, .ltv-thanks-header h2 { font-size: 18px; }
    .ltv-checkout-header img, .ltv-thanks-header img { max-height: 38px; }

    .ltv-checkout input,
    .ltv-checkout select,
    .ltv-checkout textarea {
        font-size: 16px;   /* prevent iOS auto-zoom */
        min-height: 48px;
    }
    .ltv-checkout .ltv-submit { font-size: 16px; min-height: 52px; }

    .ltv-thanks .ltv-summary td:first-child { width: 110px; }
}
