:root {
    --zindex_on_top: 999999999;

    --color_gray: #5e5e5e;
    --color_dark: #3c3c3c;
    --color_border: #808080;
}

.ui-widget-overlay {
    background: #aaa;
    opacity: .8;
    z-index: var(--zindex_on_top);
}

.ui-dialog {
    z-index: calc(var(--zindex_on_top) + 1);
    background-color: var(--color_gray);
    border-radius: 10px;
    padding: 0;
}

/* Modern browsers will override this */
@supports (selector(:has(*))) {

    .act_patches {

        .ui-dialog-titlebar {
            background-color: var(--color_dark);
            color: #ffffff;
            font-size: 20px;
            text-align: center;
            padding-top: 14px;
            padding-bottom: 14px;
            border-radius: 10px 10px 0 0;
        }

        .ui-dialog-titlebar-close {
            display: none;
        }

        .ui-dialog-content {
            overflow: hidden;
        }

        .dialog-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            /*padding: 1em;*/
            text-align: center;
        }

        .control-group {
            background-color: var(--color_dark);
            border: var(--color_border) 1px solid;
            border-radius: 10px;
            color: white;
            width: 100%;
        }

        .control-group h2{
            font-size: 16px;
            font-weight: 400;
            padding: 0 19px;
        }

        .form-footer {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 10px;
        }

        #password-expiration-dialog .form-footer {
            max-width: 80%;
            margin: 40px auto 20px;
            flex-direction: row;
        }


        .password-error {
            display: block;
            font-size: 13px;
            position: absolute;
            top: 100%;
            margin-top: 5px;
            width: 100%;
            color: red;
        }

        .error-msg,#phone-error {
            color: red;
            font-size: 1.2em;
            display: none;
            margin-bottom: 10px;
            text-align: left;
            padding: 0 19px;
        }

        .resend-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

        .form-footer>button {
            width: 100%;
            margin-right: 10px;
        }

        .logout-button {
            color: var(--secondary);
            font-size: 14px;
            margin-top: 10px;
            margin-bottom: 10px;
            cursor: pointer;
        }

        input,
        select,
        button {
            width: 90%;
            max-width: 300px;
            padding: 12px;
            margin: 10px 0;
            border-radius: 8px;
            border: 1px solid #ccc;
            font-size: 16px;
        }

        input:disabled::-webkit-input-placeholder { 
            color:    rgba(255, 255, 255, 0.5);
        }
        input:disabled:-moz-placeholder { 
            color:    rgba(255, 255, 255, 0.75);
        }
        input:disabled::-moz-placeholder { 
            color:    rgba(255, 255, 255, 0.75);
        }
        input:disabled:-ms-input-placeholder { 
            color:    rgba(255, 255, 255, 0.75);
        }


        button {
            background-color: var(--color_gray);
            color: white;

            border: var(--color_dark) 1px solid;
            cursor: pointer;
            box-shadow: 1px 2px 0px #00000059;

        }

        button:disabled {
            cursor: not-allowed;
            border: none;
            box-shadow: none;
        }

        button .ui-dialog-titlebar-close {
            background: none;
        }

        .code-input {
            width: 100%;
            max-width: 40px;
            height: 50px;
            text-align: center;
            font-size: 24px;
            border: 1px solid #ccc;
            border-radius: 8px;
            box-sizing: border-box;
            padding: 12px 10px;
        }

        #code-boxes {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin: 10px 0;
        }

        .phone-row {
            display: flex;
            gap: 10px;
            width: 90%;
            max-width: 300px;
            margin: 0 auto 10px;
        }

        .center {
            text-align: center;
        }

        #send-phone-code {
            margin-bottom: 15px;
        }

        #country-code {
            flex: 1.2;
        }

        #phone-number {
            flex: 2;
        }

        /* Password Expiration Modal Styles */
        .password-warning {
            color: red !important;
            font-weight: 500;
            margin: 15px 0 0;
            font-size: 16px;
        }

        .password-form {
            width: 100%;
            padding: 20px;
        }

        .form-field {
            position: relative;
            text-align: left;
            max-width: 90%;
            width: 100%;
            margin: 0 auto 20px;
        }


        .form-field label {
            display: block;
            color: white;
            font-weight: 500;
            margin-bottom: 5px;
            font-size: 14px;
        }

        .form-field input[type="text"],
        .form-field input[type="password"] {
            width: 100%;
            padding: 10px;
            border-radius: 5px;
            border: 1px solid #ccc;
            font-size: 14px;
            margin: 0;
            max-width: 100%;
        }

        .form-field input[readonly] {
            background-color: #f5f5f5;
            color: #666;
        }


        .password-validation {
            position: relative;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            font-size: 12px;
        }

        .password-button {
            margin: 5px;
            padding: 8px 16px;
            border-radius: 5px;
            border: 1px solid var(--color_dark);
            background-color: var(--color_gray);
            color: white;
            cursor: pointer;
            font-size: 14px;
        }

        .password-button:hover {
            background-color: #666;
        }

        .password-button:disabled {
            background-color: #444;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .password-clear-button {
            background-image: url('../images/Icons/Delete/Delete_16x16.png');
            background-repeat: no-repeat;
            background-position: 8px center;
            background-size: 16px 16px;
            padding-left: 30px;
        }

        .password-submit-button {
            background-image: url('../images/Icons/famfam/key.png');
            background-repeat: no-repeat;
            background-position: 8px center;
            background-size: 16px 16px;
            padding-left: 30px;
        }
        #password-expiration-dialog * {
            box-sizing: border-box;
        }

        #email-code-error,#phone-code-error{
            padding: 10px;
            color:red;
            font-size: 14px;
        }
    }

    .password-expiration-banner {
        position: fixed;
        top: 115px;
        left: 0;
        right: 0;
        background-color: #C1272D;
        color: white;
        z-index: 9999999999;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        font-size: 14px;
    }

    .banner-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        margin: 0 auto;
        font-size: 13px;
    }

    .banner-message {
        flex: 1;
    }

    .banner-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .banner-create-password-btn,
    .banner-dismiss-btn {
        background-color: transparent;
        color: white;
        border: 1px solid transparent;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-decoration: none;
    }

    .banner-create-password-btn:hover,
    .banner-dismiss-btn:hover {
        background-color: white;
        color: #d32f2f;
    }


    .banner-close-btn {
        background-color: transparent;
        color: white;
        border: none;
        padding: 4px 8px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.2s ease;
        line-height: 1;
        min-width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .banner-close-btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    /* Loading cursor for body during password submission */
    .loading-cursor {
        cursor: wait !important;
    }

    .loading-cursor * {
        cursor: wait !important;
    }
}


.password-validation-container .password-rules-wrapper{
    top: 100%;
    min-width: 245px;
    right: 0;
}

.password-rules-wrapper {
    position: absolute;
    width: 100%;
    background-color: #fff;
    border: 1px solid #a3d165;
    padding: 10px 0;
    z-index: 1;
    top: -1px;
    font-size: 11px;
    text-align: left;
    line-height: 1.5;
}

.password-rules-wrapper .rule-item {
    padding: 0 10px;
}

.password-rules-wrapper .rule-item.consecutive-pattern-rule {
    border-top: 1px solid #a3d165;
    padding-top: 5px;
    margin-top: 5px;
    display: none;
}

.password-rules-wrapper .rule-item.consecutive-pattern-rule.text_red {
    display: block;
}

/* Password validation styles */
.password-rules-wrapper .text_green {
    color: #a3d165;
}

.password-rules-wrapper .text_red {
    color: #dc210b;
}


/* Cross-browser compatible icon styles using CSS pseudo-elements */
.password-rules-wrapper .check-icon,
.password-rules-wrapper .cross-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
    vertical-align: middle;
    margin-right: 4px;
}

/* Check icon using CSS */
.password-rules-wrapper .check-icon::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #a3d165;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Cross icon using CSS */
.password-rules-wrapper .cross-icon::before,
.password-rules-wrapper .cross-icon::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 2px;
    width: 2px;
    height: 12px;
    background-color: #dc3545;
}

.password-rules-wrapper .cross-icon::before {
    transform: rotate(45deg);
}

.password-rules-wrapper .cross-icon::after {
    transform: rotate(-45deg);
}

div.popUp_Red_Message > div:nth-child(2) > div > div > .contant_holder {
    padding: 10px;
}

.password-email-alert {
    font-size: 12px;
}