﻿/* Fansa Simple Login. These rules apply only to the React sign-in card. */
#app.react-context:has(.user .user__login.panel) {
    min-height: 0;
}
#app.react-context .user:has(> .user__wrapper > .user__login.panel) {
    --fansa-simple-login: R11F2;
    direction: rtl;
    font-family: FansaYekan, Tahoma, sans-serif;
    color: #252628;
    padding: 8px 8px 28px;
    margin: 0;
    overflow: visible;
}
#app.react-context .user .user__wrapper:has(> .user__login.panel) {
    width: min(100%, 30rem);
    height: auto;
}
#app.react-context .user .user__login.panel {
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #e4e0d7 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 5px 20px rgb(27 34 38 / 8%) !important;
    text-align: start;
}
#app.react-context .user .user__login.panel > .panel-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 16px clamp(18px, 4vw, 28px);
    border: 0;
    border-bottom: 1px solid #ebe8e0;
    border-radius: 11px 11px 0 0;
    background: #faf8f3 !important;
    color: #252628 !important;
    font: 750 22px/1.6 FansaYekan, Tahoma, sans-serif;
}
#app.react-context .user .user__login.panel > .panel-heading::before {
    content: "";
    width: 23px;
    height: 3px;
    flex: none;
    background: #ffc40c;
}
#app.react-context .user .user__login.panel > .user__formWrapper {
    padding: 22px clamp(18px, 4vw, 28px) 25px;
    border-radius: 0 0 11px 11px;
}
#app.react-context .user .user__login.panel .user__formWrapper form {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 0;
}
#app.react-context .user .user__login.panel form :is(.row, .form-group, .button-container, .button-container > li) {
    min-width: 0;
    margin: 0;
    padding: 0;
}
#app.react-context .user .user__login.panel .button-container {
    display: block;
    list-style: none;
}

/* Keep the existing label and its 'for' association above the input through
   the empty, populated and autofilled states. The module toggles the -out class. */
#app.react-context .user .user__login.panel .float-label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 7px;
}
#app.react-context .user .user__login.panel form .float-label > .float-label__label {
    position: static;
    justify-self: start;
    margin: 0;
    padding: 0;
    background: transparent !important;
    color: #34383a !important;
    font: 600 14px/1.7 FansaYekan, Tahoma, sans-serif;
    text-align: start;
    transform: none !important;
    transition: none;
    will-change: auto;
}
#app.react-context .user .user__login.panel .float-label > input:is([type="text"], [type="password"], [type="tel"], [type="email"], [type="number"]) {
    display: block;
    position: static;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 9px 12px !important;
    border: 1px solid #979b99 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #252628 !important;
    font: 500 16px/1.5 FansaYekan, Tahoma, sans-serif;
    direction: ltr;
    text-align: left;
}
#app.react-context .user .user__login.panel .float-label > input:focus {
    border-color: #896408 !important;
    outline: 2px solid #896408;
    outline-offset: 2px;
}
#app.react-context .user .user__login.panel .float-label > input:-webkit-autofill {
    -webkit-text-fill-color: #252628;
    caret-color: #252628;
    box-shadow: 0 0 0 1000px #fff inset !important;
}

/* The username step uses a button inside a list. The OTP switch in the password
   step is a div.btn, so both types of action need a deliberately sized hit area. */
#app.react-context .user .user__login.panel form :is(button.btn, .one-time-password.btn) {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #ffc40c !important;
    border-radius: 7px !important;
    background: #ffc40c !important;
    color: #252628 !important;
    box-shadow: none !important;
    font: 700 15px/1.7 FansaYekan, Tahoma, sans-serif;
    text-align: center;
    white-space: normal;
    cursor: pointer;
}
#app.react-context .user .user__login.panel form button.btn:not(:disabled):hover {
    background: #ffda64 !important;
    border-color: #ffda64 !important;
}
#app.react-context .user .user__login.panel form .login-btn-cn {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
}
#app.react-context .user .user__login.panel form .one-time-password.btn {
    background: #fff !important;
    border-color: #d3c28e !important;
    color: #61490a !important;
}
#app.react-context .user .user__login.panel form .one-time-password.btn:hover {
    background: #fff8df !important;
}
#app.react-context .user .user__login.panel .remember-me-cn,
#app.react-context .user .user__login.panel .rememberMe-label,
#app.react-context .user .user__login.panel .rememberMe-label span {
    margin: 0;
}
#app.react-context .user .user__login.panel .rememberMe-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 500 14px/1.7 FansaYekan, Tahoma, sans-serif;
    cursor: pointer;
}
#app.react-context .user .user__login.panel .rememberMe-label input[type="checkbox"] {
    flex: none;
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: #926900;
    transform: none;
}
#app.react-context .user .user__login.panel .btn-back-cn .btn-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border: 1px solid #d5d3ca;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}
#app.react-context .user .user__login.panel .btn-back-cn .btn-back i {
    font-size: 17px;
}
#app.react-context .user .user__login.panel .padding-wrapper > a {
    justify-self: start;
    color: #70520b !important;
    font: 600 13px/1.8 FansaYekan, Tahoma, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
}
#app.react-context .user .user__login.panel .float-label > input.checkify__has-error {
    border-color: #9c2926 !important;
}
#app.react-context .user .user__login.panel form .checkify__message {
    position: static !important;
    width: fit-content;
    max-width: 100%;
    padding: 3px 8px;
    background: #f9eae8;
    color: #85221d;
    font: 500 13px/1.7 FansaYekan, Tahoma, sans-serif;
}
#app.react-context .user .user__login.panel form .checkify__message::before {
    display: none;
}

/* Builds with inline status messages put this node next to the active form. */
#app.react-context .user .user__login.panel .simplelogin-status-message {
    margin: 0 0 16px;
    padding: 9px 12px;
    border: 1px solid #c7d7de !important;
    border-radius: 6px;
    background: #edf4f7 !important;
    color: #234855 !important;
    overflow-wrap: anywhere;
}
#app.react-context .user .user__login.panel .simplelogin-status-message.success {
    border-color: #bed4c4 !important;
    background: #edf5ef !important;
    color: #27563b !important;
}
#app.react-context .user .user__login.panel .simplelogin-status-message.error {
    border-color: #e4c4be !important;
    background: #f9eae8 !important;
    color: #85221d !important;
}

/* Replace the stock English module heading only after React renders its own login heading. */
.DnnModule:has(.DNNModuleContent link[data-fansa-default-login-title="true"]):has(#app.react-context .user__login > h3.panel-heading:not(:empty)):not(.fansa-editing *, .dnnEditState *, .dnnLayoutEditing *)
  :is(h1, h2, h3, h4, h5, h6, .dnnTitle):has([id$="_titleLabel" i]):not(.DNNModuleContent *):not(:has(.dnnActionMenu, .dnnModuleActions, [contenteditable="true"])) {
    display: none !important;
}
