/*
 * UnlockForge Frontend Styles
 * Covers content gates, social login, unlock messages, paid content,
 * email unlock, OTP verification, and paid-content indicators.
 */

/* =========================================================
   Shared content gate
   ========================================================= */

.unlockforge-gate {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 32px auto;
    padding: 28px;
    color: #202833;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(16, 24, 40, 0.05);
}

.unlockforge-gate h3 {
    margin: 0 0 12px;
    color: #202833;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.unlockforge-gate p {
    margin: 0 0 18px;
    color: #596579;
    font-size: 15px;
    line-height: 1.65;
}

/* =========================================================
   Social login
   ========================================================= */

.unlockforge-social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.unlockforge-social-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid #d9dee5;
    border-radius: 7px;
    background: #ffffff;
    color: #202833;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.unlockforge-social-login-button:hover {
    border-color: #aeb8c5;
    background: #f8fafc;
    color: #202833;
    box-shadow: 0 2px 7px rgba(16, 24, 40, 0.06);
}

.unlockforge-social-login-button:focus-visible {
    outline: 2px solid #64748b;
    outline-offset: 3px;
}

.unlockforge-social-login-button-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.unlockforge-social-login-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex: 0 0 20px;
}

.unlockforge-social-login-button-icon svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* =========================================================
   Listing content
   ========================================================= */

.unlockforge-read-more {
    display: inline-block;
    margin-top: 12px;
}

.unlockforge-listing-content {
    text-align: center;
}

/* =========================================================
   Custom unlock message
   ========================================================= */

.unlockforge-unlock-message {
    box-sizing: border-box;
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    background: #ffffff;
    text-align: center;
}

.unlockforge-unlock-message-emoji {
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1.1;
}

.unlockforge-unlock-message-image {
    margin-bottom: 16px;
}

.unlockforge-unlock-message-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 220px;
    margin: 0 auto;
    border-radius: 8px;
}

.unlockforge-unlock-message-title {
    margin: 0 0 8px;
    color: #202833;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.4;
}

.unlockforge-unlock-message-message {
    margin: 0;
    color: #596579;
    font-size: 14px;
    line-height: 1.6;
}

/* =========================================================
   Paid content gate
   Requires the payment-header and payment-price markup.
   ========================================================= */

.unlockforge-payment-gate {
    max-width: 440px;
    padding: 30px 26px;
    border-color: #e0e5eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(16, 24, 40, 0.07);
    color: #202833;
}

.unlockforge-payment-gate .unlockforge-payment-header {
    margin: 0;
}

.unlockforge-payment-gate .unlockforge-payment-header h3 {
    margin: 0 0 8px;
    color: #202833;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.unlockforge-payment-gate .unlockforge-payment-header p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}

.unlockforge-payment-price {
    margin: 24px 0 20px;
    padding: 18px 14px;
    border: 1px solid #e5e9ef;
    border-radius: 9px;
    background: #f8fafc;
}

.unlockforge-payment-price-label {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.unlockforge-payment-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    color: #202833;
    font-variant-numeric: tabular-nums;
}

.unlockforge-payment-currency {
    font-size: 14px;
    font-weight: 600;
}

.unlockforge-payment-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.unlockforge-payment-gate .unlockforge-payment-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 18px;
    border: 1px solid #202833;
    border-radius: 7px;
    background: #202833;
    box-shadow: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.unlockforge-payment-gate .unlockforge-payment-button:hover {
    border-color: #111820;
    background: #111820;
    box-shadow: none;
    color: #ffffff;
    transform: none;
}

.unlockforge-payment-gate .unlockforge-payment-button:focus-visible {
    outline: 2px solid #667085;
    outline-offset: 3px;
}

.unlockforge-payment-gate .unlockforge-payment-button:active {
    box-shadow: none;
    transform: none;
}

.unlockforge-payment-gate .unlockforge-payment-status,
.unlockforge-payment-gate .unlockforge-payment-error {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.unlockforge-payment-gate .unlockforge-payment-status {
    color: #475467;
}

.unlockforge-payment-gate .unlockforge-payment-error {
    color: #b42318;
}

.unlockforge-payment-gate .unlockforge-payment-status:empty,
.unlockforge-payment-gate .unlockforge-payment-error:empty,
.unlockforge-payment-gate .unlockforge-payment-error[hidden] {
    display: none;
}

.unlockforge-payment-gate .unlockforge-payment-unavailable {
    margin: 16px 0 0;
    color: #b42318;
    font-size: 13px;
}

/* =========================================================
   Email unlock
   ========================================================= */

.unlockforge-email-unlock {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 24px auto;
    padding: 24px;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.04);
    text-align: left;
}

.unlockforge-email-unlock-heading {
    margin: 0 0 14px;
    color: #202833;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.unlockforge-email-unlock-form {
    display: block;
}

.unlockforge-email-unlock-label {
    display: block;
    margin: 0 0 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.unlockforge-email-unlock-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cfd5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #202833;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.unlockforge-email-unlock-input::placeholder {
    color: #98a2b3;
}

.unlockforge-email-unlock-input:focus {
    border-color: #475467;
    outline: 2px solid rgba(71, 84, 103, 0.14);
    outline-offset: 0;
}

.unlockforge-email-unlock-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 12px 0 0;
    padding: 10px 16px;
    border: 1px solid #202833;
    border-radius: 6px;
    background: #202833;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.unlockforge-email-unlock-button:hover {
    border-color: #111820;
    background: #111820;
    color: #ffffff;
}

.unlockforge-email-unlock-button:focus-visible {
    outline: 2px solid #667085;
    outline-offset: 2px;
}

.unlockforge-email-unlock-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.unlockforge-email-unlock + .unlockforge-social-login-buttons {
    margin-top: 20px;
}

/* =========================================================
   Email OTP verification
   ========================================================= */

.unlockforge-email-otp {
    margin-top: 16px;
    padding-top: 20px;
    border-top: 1px solid #e4e7eb;
}

.unlockforge-email-otp-header {
    margin-bottom: 16px;
}

.unlockforge-email-otp-header strong {
    display: block;
    margin-bottom: 6px;
    color: #202833;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.unlockforge-email-otp-description {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.unlockforge-email-otp-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unlockforge-email-otp-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #cfd5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #202833;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.2em;
}

.unlockforge-email-otp-input:focus {
    border-color: #475467;
    outline: 2px solid rgba(71, 84, 103, 0.14);
    outline-offset: 0;
}

.unlockforge-email-otp-button {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #202833;
    border-radius: 6px;
    background: #202833;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.unlockforge-email-otp-button:hover:not(:disabled) {
    border-color: #111820;
    background: #111820;
}

.unlockforge-email-otp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.unlockforge-email-otp-countdown {
    margin: 12px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.unlockforge-email-otp-change-email {
    display: block;
    margin: 12px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #475467;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
}

.unlockforge-email-otp-change-email:hover {
    color: #202833;
    text-decoration: underline;
}

.unlockforge-gate p.unlockforge-email-unlock-error {
    margin: 12px 0 0;
    color: #b42318;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

/* =========================================================
   Paid content indicator
   ========================================================= */

.unlockforge-paid-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-right: 6px;
    padding: 4px 7px;
    border: 1px solid #f2d58a;
    border-radius: 4px;
    background: #fff8e5;
    color: #805b10;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.unlockforge-paid-indicator .dashicons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.unlockforge-paid-label {
    display: inline-block;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================
   Responsive layout
   ========================================================= */

@media screen and (max-width: 600px) {
    .unlockforge-gate {
        margin: 24px auto;
        padding: 22px 18px;
        border-radius: 10px;
    }

    .unlockforge-gate h3 {
        font-size: 20px;
    }

    .unlockforge-payment-gate {
        padding: 24px 18px;
    }

    .unlockforge-payment-gate .unlockforge-payment-header h3 {
        font-size: 20px;
    }

    .unlockforge-payment-value {
        font-size: 29px;
    }

    .unlockforge-payment-gate .unlockforge-payment-button,
    .unlockforge-gate .unlockforge-social-login-button {
        width: 100%;
    }

    .unlockforge-gate .unlockforge-social-login-buttons {
        flex-direction: column;
    }

    .unlockforge-email-unlock {
        margin: 20px auto;
        padding: 18px;
    }

    .unlockforge-email-unlock-input,
    .unlockforge-email-unlock-button {
        min-height: 42px;
    }
}

@media screen and (max-width: 480px) {
    .unlockforge-email-otp {
        margin-top: 14px;
        padding-top: 16px;
    }

    .unlockforge-email-otp-input,
    .unlockforge-email-otp-button {
        min-height: 46px;
    }

    .unlockforge-email-otp-input {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .unlockforge-social-login-button,
    .unlockforge-payment-gate .unlockforge-payment-button,
    .unlockforge-email-unlock-button,
    .unlockforge-email-otp-button {
        transition: none;
    }
}
