/* Styles for the Org Invitation pages — 1:1 with the redesigned
   /login page on app.ocrolus.com. Used only by page_join.mak and
   page_join_success.mak. Do not import from page_base.mak / register_base.mak.
*/

body { margin: 0 }

* { font-family: "Karla", sans-serif; }

.outer-wrapper {
    height: 100vh;
    background: rgb(1, 29, 70);
    display: flex;
    justify-content: center;
    align-items: center;
}

.inner-wrapper {
    width: 400px;
    background: #FFF;
}

header {
    padding: 40px 40px 24px 40px;
}

header > img {
    display: block;
    object-fit: contain;
    max-height: 52px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    border: 0;
    vertical-align: baseline;
    text-align: center;
}

header > h1 {
    margin: 24px 0px 16px 0px;
    font-size: 24px;
    font-weight: 400;
    color: #2d333a;
    padding: 0;
    border: 0;
    text-align: center;
    vertical-align: baseline;
    font-style: normal;
    line-height: 36px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

header > div {
    margin: 20px;
    font-size: 14px;
    color: rgb(45, 51, 58);
    text-align: center;
}

form {
    padding: 0px 40px 40px 40px;
}

.container {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 24px;
}

.material-textfield {
    position: relative;
    width: 100%;
}

.material-textfield label {
    position: absolute;
    font-size: 1rem;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: gray;
    padding: 0 0.3rem;
    margin: 0 0.5rem;
    transition: 0.1s ease-out;
    transform-origin: left top;
    pointer-events: none;
}

.label-error {
    color: #d00e17 !important;
}

.material-textfield input {
    width: -webkit-fill-available;
    font-size: 1rem;
    outline: none;
    border: 1px solid gray;
    border-radius: 5px;
    padding: 1rem 2.8rem 1rem 0.7rem;
    color: rgb(45, 51, 58);
    transition: 0.1s ease-out;
}

/* Show / hide password toggle inside the input */
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: gray;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: auto;
    border-radius: 4px;
    box-sizing: content-box;
    flex-direction: row;
    letter-spacing: normal;
    line-height: 1;
}

.password-toggle:hover {
    color: rgb(0, 123, 173);
    box-shadow: none;
    background: rgba(0, 123, 173, 0.08);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.password-toggle .icon-hide { display: none; }
.password-toggle.is-showing .icon-show { display: none; }
.password-toggle.is-showing .icon-hide { display: block; }

.input-error {
    border: 1px solid #d00e17 !important;
}

.material-textfield input:focus {
    border-color: rgb( 0,123,173 );
}

.material-textfield input:focus + label {
    color: rgb( 0,123,173 );
    top: 0;
    transform: translateY(-50%) scale(0.9) !important;
}

.material-textfield input:-webkit-autofill + label,
.material-textfield input:not(:placeholder-shown) + label,
.material-textfield input:valid + label {
    top: 0;
    transform: translateY(-50%) scale(0.9) !important;
}

.material-textfield input:not(:focus)::placeholder {
    opacity: 0;
}

.material-textfield input:-webkit-autofill,
.material-textfield input:-webkit-autofill:hover,
.material-textfield input:-webkit-autofill:focus,
.material-textfield input:-webkit-autofill:active  {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: fieldtext !important;
}

/* For Firefox */
.material-textfield input:-moz-ui-autofill,
.material-textfield input:-moz-ui-autofill:hover,
.material-textfield input:-moz-ui-autofill:focus,
.material-textfield input:-moz-ui-autofill:active {
    background: white !important;
    color: fieldtext !important;
}

.error {
    margin: 0;
    padding: 0;
    vertical-align: baseline;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    margin-top: 4px;
    display: flex;
    font-size: 12px;
    line-height: 1.4;
    color: #d00e17;
    width: 100%;
}

/* Server-side error variant: positioned below the submit button so it's
   visually separated from any field-level (client validation) error. */
.error-below-button {
    margin-top: 12px;
    align-items: flex-start;
}

.error-below-button .error-img {
    margin-top: 1px; /* nudge icon down to baseline-align with text first line */
}

.error-img {
    display: inline-block;
    height: 16px;
    width: 16px;
    margin-right: 8px;
    flex-shrink: 0;
    background-position: 0 0;
    background-repeat: no-repeat;
    background-size: 16px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 14.667A6.667 6.667 0 1 0 8 1.333a6.667 6.667 0 0 0 0 13.334z' fill='%23D00E17' stroke='%23D00E17' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 4.583a.75.75 0 0 1 .75.75V8a.75.75 0 0 1-1.5 0V5.333a.75.75 0 0 1 .75-.75z' fill='%23fff'/%3E%3Cpath d='M8.667 10.667a.667.667 0 1 1-1.334 0 .667.667 0 0 1 1.334 0z' fill='%23fff'/%3E%3C/svg%3E");
}

button,
.continue-link {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: rgb(0, 89, 214);
    color: white;
    cursor: pointer;
    display: flex;
    padding: 15px 26px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    background: #0059d6;
    font-family: "Karla", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0.46px;
    height: 52px;
    text-decoration: none;
    box-sizing: border-box;
}
button:hover,
.continue-link:hover {
  box-shadow: inset 0 0 0 150px rgba(0, 0, 0, .1);
}

/* Disabled state for a .continue-link used as a timed action (e.g. the Resend
   cooldown on the recover-success page). JS removes this class when the timer
   elapses to re-enable the link. */
.continue-link.is-disabled {
    background: #c7ced6;
    pointer-events: none;
    cursor: default;
}

/* Secondary, text-style action stacked beneath a primary .continue-link button. */
.secondary-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 16px;
    text-align: center;
    color: rgb(0, 89, 214);
    font-family: "Karla", sans-serif;
    font-size: 14px;
    text-decoration: none;
}

.secondary-link:hover {
    text-decoration: underline;
}

.success-wrapper {
    padding: 0px 40px 40px 40px;
}

/* Success state — SVG check inside a circle for crisp rendering.
   Mirrors the look of Auth0's "Password Changed!" confirmation. */
.success-icon {
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

/* Password requirements list — flat, every item must be satisfied to submit.
   Items start unsatisfied (gray) and turn green when matched. */
.password-requirements {
    list-style: none;
    padding: 0;
    margin: 8px 0 24px 0;
    font-size: 13px;
    line-height: 1.45;
    color: rgb(45, 51, 58);
    width: 100%;
}

.password-requirements li {
    position: relative;
    padding-left: 24px;
    color: gray;
    margin-bottom: 6px;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #c7ced6;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 9px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4l1.5 1.5L6 3' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.password-requirements li.satisfied::before {
    background-color: #2e9d6e;
}

.password-requirements li.satisfied {
    color: #2d333a;
}

/* Inline anchor styling for subtitle links (e.g. mailto on info-only pages). */
header > div a {
    color: rgb(0, 89, 214);
    text-decoration: none;
}

header > div a:hover {
    text-decoration: underline;
}
