.iol-auth,
.iol-auth * {
    box-sizing: border-box;
}

.iol-auth {
    --iol-bg: #f7f8fc;
    --iol-card: rgba(255, 255, 255, 0.88);
    --iol-text: #172033;
    --iol-muted: #6d7587;
    --iol-border: rgba(61, 71, 96, 0.14);
    --iol-primary: #5b5ce2;
    --iol-primary-deep: #4647c5;
    --iol-success: #16815f;
    --iol-danger: #c73f58;
    width: 100%;
    max-width: 520px;
    margin: 32px auto;
    padding: 18px;
    color: var(--iol-text);
    font-family: Vazirmatn, IRANSans, Tahoma, Arial, sans-serif;
    line-height: 1.75;
}

.iol-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(24px, 6vw, 42px);
    border: 1px solid var(--iol-border);
    border-radius: 10px;
    background: var(--iol-card);
    box-shadow: 0 28px 80px rgba(31, 42, 73, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.iol-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(145deg, rgba(91, 92, 226, 0.08), transparent 42%),
        radial-gradient(circle at 88% 95%, rgba(22, 129, 95, 0.08), transparent 34%);
}

.iol-orb {
    position: absolute;
    z-index: -1;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.22;
    pointer-events: none;
}

.iol-orb--one {
    top: -110px;
    right: -75px;
    background: radial-gradient(circle, #7f80ff, transparent 68%);
}

.iol-orb--two {
    bottom: -120px;
    left: -60px;
    background: radial-gradient(circle, #64d9b6, transparent 68%);
}

.iol-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.iol-header h2 {
    margin: 0 0 6px;
    color: var(--iol-text);
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.35;
}

.iol-header p {
    margin: 0;
    color: var(--iol-muted);
    font-size: 0.94rem;
}

.iol-icon {
    display: grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(145deg, #ff65a7, #e73782);
    box-shadow: 0 12px 28px rgb(91 92 226 / .28);
}

.iol-icon svg {
    width: 27px;
    height: 27px;
    fill: #fff;
}

.iol-form {
    position: relative;
}

.iol-step {
    animation: iol-fade-up 260ms ease both;
}

.iol-step[hidden] {
    display: none !important;
}

.iol-label {
    display: block;
    margin: 0 0 9px;
    color: var(--iol-text);
    font-size: 0.91rem;
    font-weight: 700;
}

.iol-input-wrap {
    display: flex;
    width: 100%;
    align-items: stretch;
    direction: ltr;
}

.iol-prefix {
    display: inline-flex;
    flex: 0 0 70px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--iol-border);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: rgba(245, 246, 251, 0.96);
    color: var(--iol-muted);
    font-size: 0.92rem;
    direction: ltr;
    transition: border-color 180ms ease, background 180ms ease;
}

.iol-input-wrap:focus-within .iol-prefix {
    border-color: rgba(91, 92, 226, 0.72);
    background: #fff;
}

.iol-input {
    width: 100%;
    min-height: 56px;
    padding: 13px 16px;
    border: 1px solid var(--iol-border);
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, 0.76);
    color: var(--iol-text);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.iol-mobile-input {
    min-width: 0;
    padding-left: 16px;
    border-radius: 8px 8px;
    direction: ltr;
    text-align: left;
}

.iol-step--mobile .iol-button {
    margin-top: 20px;
}

.iol-otp-input {
    direction: ltr;
    text-align: center;
    font-size: clamp(1.35rem, 5vw, 0.85rem);
    font-weight: 800;
    letter-spacing: .42em;
    padding-left: calc(16px + 0.42em);
    margin-bottom: 15px;
}

.iol-input::placeholder {
    color: #a5aab6;
    opacity: 1;
}

.iol-input:focus {
    border-color: rgba(91, 92, 226, 0.72);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.12);
}

.iol-hint {
    margin: 8px 2px 20px;
    color: var(--iol-muted);
    font-size: 0.78rem;
}

.iol-button {
    display: inline-flex;
    width: 100%;
    min-height: 55px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 0;
    border-radius: 7px;
    background: #ff65a7;
    box-shadow: 0 14px 30px rgb(71 72 199 / .24);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    border-bottom: 5px solid #e73782;
}

.iol-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 17px 34px rgba(71, 72, 199, 0.3);
}

.iol-button:focus-visible,
.iol-link-button:focus-visible {
    outline: 3px solid rgba(91, 92, 226, 0.25);
    outline-offset: 3px;
}

.iol-button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.iol-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: iol-spin 700ms linear infinite;
}

.iol-button.is-loading .iol-spinner {
    display: inline-block;
}

.iol-mobile-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid rgba(91, 92, 226, 0.12);
    border-radius: 14px;
    background: rgba(91, 92, 226, 0.06);
    color: var(--iol-muted);
    font-size: 0.82rem;
}

.iol-mobile-summary strong {
    color: var(--iol-text);
    direction: ltr;
}

.iol-link-button {
    display: block;
    margin: 14px auto 0;
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: var(--iol-primary-deep);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
}

.iol-link-button:disabled {
    color: var(--iol-muted);
    cursor: default;
    opacity: 0.72;
}

.iol-mobile-summary .iol-link-button {
    display: inline-block;
    margin: 0 auto 0 0;
}

.iol-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 14px 2px 18px;
    color: var(--iol-muted);
    cursor: pointer;
    font-size: 0.82rem;
}

.iol-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--iol-primary);
}

.iol-status {
    min-height: 27px;
    margin-top: 14px;
    padding: 0 2px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 650;
}

.iol-status.is-success {
    color: var(--iol-success);
}

.iol-status.is-error {
    color: var(--iol-danger);
}

.iol-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--iol-muted);
    text-align: center;
    font-size: 0.74rem;
}

.iol-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--iol-success);
    box-shadow: 0 0 0 5px rgba(22, 129, 95, 0.1);
}

.iol-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

.iol-auth.is-complete .iol-card {
    opacity: 0.84;
    pointer-events: none;
}

.iol-auth--logged-in .iol-card {
    text-align: center;
}

.iol-auth--logged-in p {
    margin: 0 0 18px;
}

/* Bootstrap modal integration. Bootstrap itself is expected to be loaded by the site. */
.iol-bootstrap-modal {
    font-family: Vazirmatn, IRANSans, Tahoma, Arial, sans-serif;
}

.iol-bootstrap-modal .modal-dialog {
    width: calc(100% - 24px);
    max-width: 560px;
    margin-right: auto;
    margin-left: auto;
}

.iol-bootstrap-modal .modal-content {
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}

.iol-bootstrap-modal .modal-body {
    padding: 0;
}

.iol-auth--modal {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.iol-auth--modal .iol-card {
    box-shadow: 0 28px 90px rgba(18, 27, 52, 0.24);
}

.iol-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    display: inline-grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(61, 71, 96, 0.12);
    border-radius: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.82);
    color: #50576a;
    cursor: pointer;
    font: inherit;
    font-size: 26px;
    line-height: 1;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.iol-modal-close:hover {
    background: #fff;
    color: #172033;
    transform: rotate(4deg);
}

.iol-modal-close:focus-visible {
    outline: 3px solid rgba(91, 92, 226, 0.25);
    outline-offset: 2px;
}

.iol-fallback-backdrop {
    z-index: 1040;
}

.iol-bootstrap-modal.show {
    z-index: 1055;
}

@keyframes iol-fade-up {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 520px) {
    .iol-auth {
        margin: 14px auto;
        padding: 8px;
    }

    .iol-auth--modal {
        margin: 0;
        padding: 0;
    }

    .iol-bootstrap-modal .modal-dialog {
        width: calc(100% - 16px);
    }

    .iol-modal-close {
        top: 12px;
        left: 12px;
        width: 34px;
        height: 34px;
    }

    .iol-card {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .iol-header {
        gap: 12px;
    }

    .iol-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .iol-mobile-summary .iol-link-button {
        width: 100%;
        margin: 2px 0 0;
        text-align: right;
    }
}

@media (prefers-reduced-motion: reduce) {
    .iol-auth *,
    .iol-auth *::before,
    .iol-auth *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

label.iol-check {
    display: none;
}
/* WooCommerce My Account login replacement. */
.iol-woocommerce-account-login {
    width: 100%;
}

.iol-auth--my-account {
    margin-top: 24px;
    margin-bottom: 24px;
}

/* Inline OTP verification inside WooCommerce classic and block checkout. */
.iol-checkout-otp,
.iol-checkout-otp * {
    box-sizing: border-box;
}

.iol-checkout-otp {
    --iol-text: #172033;
    --iol-muted: #6d7587;
    --iol-border: rgba(61, 71, 96, 0.14);
    --iol-primary-deep: #4647c5;
    --iol-success: #16815f;
    --iol-danger: #c73f58;
    width: 100%;
    margin: 14px 0 22px;
    padding: 18px;
    border: 1px solid rgba(91, 92, 226, 0.2);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 255, 0.98));
    box-shadow: 0 12px 32px rgba(31, 37, 70, 0.08);
    color: var(--iol-text);
    font-family: Vazirmatn, IRANSans, Tahoma, Arial, sans-serif;
    box-sizing: border-box;
}

.iol-checkout-otp[hidden] {
    display: none !important;
}

.iol-checkout-otp__head {
    margin-bottom: 14px;
}

.iol-checkout-otp__head strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.98rem;
    font-weight: 800;
}

.iol-checkout-otp__head p {
    margin: 0;
    color: var(--iol-muted);
    font-size: 0.82rem;
    line-height: 1.8;
}

.iol-checkout-otp__label {
    display: block;
    margin: 0 0 12px;
    font-size: 0.84rem;
    font-weight: 700;
}

.iol-checkout-otp__label > span {
    display: block;
    margin-bottom: 7px;
}

.iol-checkout-otp__input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--iol-border);
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--iol-text);
    direction: ltr;
    text-align: center;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.32em;
    box-sizing: border-box;
}

.iol-checkout-otp__input:focus {
    border-color: rgba(91, 92, 226, 0.72);
    box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.1);
}

.iol-checkout-otp__verify {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 0;
    border-bottom: 4px solid #e73782;
    border-radius: 7px;
    background: #ff65a7;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.iol-checkout-otp__verify:disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

.iol-checkout-otp__verify.is-loading .iol-spinner {
    display: inline-block;
}

.iol-checkout-otp__resend {
    display: block;
    margin: 10px auto 0;
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: var(--iol-primary-deep);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
}

.iol-checkout-otp__resend:disabled {
    color: var(--iol-muted);
    cursor: default;
    opacity: 0.72;
}

.iol-checkout-otp__status {
    min-height: 24px;
    margin-top: 10px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.iol-checkout-otp__status.is-success {
    color: var(--iol-success);
}

.iol-checkout-otp__status.is-error {
    color: var(--iol-danger);
}

@media (max-width: 480px) {
    .iol-checkout-otp {
        padding: 15px;
    }
}
