
/* =====================================================
   Institut WP - Authentication
===================================================== */

.iwp-auth-control {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.iwp-login-button,
.iwp-account-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #fff;
    color: #123b70;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.iwp-login-button:hover,
.iwp-account-menu summary:hover {
    background: #f3f7fc;
}

.iwp-account-menu {
    position: relative;
}

.iwp-account-menu summary::-webkit-details-marker {
    display: none;
}

.iwp-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100;
    min-width: 190px;
    padding: 7px;
    border: 1px solid #e4eaf1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15, 42, 75, .13);
}

.iwp-account-dropdown a,
.iwp-account-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #26384d;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.iwp-account-dropdown a:hover,
.iwp-account-dropdown button:hover {
    background: #f2f6fb;
    color: #0a5cab;
}

/* Modal */

.iwp-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 25, 45, .62);
    backdrop-filter: blur(4px);
}

.iwp-auth-modal.is-open {
    display: flex;
}

.iwp-auth-dialog {
    position: relative;
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 35px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .2);
    animation: iwpAuthShow .2s ease-out;
}

@keyframes iwpAuthShow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iwp-auth-close {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f2f5f8;
    color: #536477;
    cursor: pointer;
}

.iwp-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 27px;
    color: #123b70;
    font-size: 14px;
    font-weight: 700;
}

.iwp-auth-brand-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #eaf2fb;
    font-size: 19px;
}

.iwp-auth-dialog h3 {
    margin: 0 0 8px;
    color: #172b43;
    font-size: 25px;
    font-weight: 700;
}

.iwp-auth-dialog p {
    margin: 0 0 23px;
    color: #718096;
    font-size: 14px;
    line-height: 1.65;
}

.iwp-auth-field {
    margin-bottom: 17px;
}

.iwp-auth-field label {
    display: block;
    margin-bottom: 7px;
    color: #34465b;
    font-size: 13px;
    font-weight: 600;
}

.iwp-auth-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #dce4ed;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #24364b;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.iwp-auth-field input:focus {
    border-color: #0a5cab;
    box-shadow: 0 0 0 3px rgba(10, 92, 171, .1);
}

.iwp-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 19px;
    color: #617187;
    font-size: 13px;
}

.iwp-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #0a5cab;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.iwp-auth-submit:hover {
    background: #084d8e;
    color: #fff;
}

.iwp-auth-link {
    display: block;
    margin: 18px auto 0;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #0a5cab;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.iwp-auth-link:hover {
    text-decoration: underline;
}

/* Logout */

.iwp-logout-dialog {
    max-width: 390px;
    text-align: center;
}

.iwp-logout-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #eef4fb;
    color: #0a5cab;
    font-size: 25px;
}

.iwp-logout-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.iwp-logout-actions > * {
    flex: 1;
}

.iwp-auth-cancel {
    min-height: 46px;
    border: 1px solid #dce4ed;
    border-radius: 8px;
    background: #fff;
    color: #43546a;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Mobile */

.iwp-auth-mobile {
    width: 100%;
    padding: 12px 18px;
    border-top: 1px solid #edf0f4;
}

.iwp-auth-mobile .iwp-login-button {
    width: 100%;
    justify-content: center;
}

.iwp-auth-mobile .iwp-account-menu {
    width: 100%;
}

.iwp-auth-mobile .iwp-account-menu summary {
    width: 100%;
    justify-content: space-between;
}

.iwp-auth-mobile .iwp-account-dropdown {
    position: static;
    margin-top: 7px;
    box-shadow: none;
}

@media (max-width: 767px) {
    .iwp-auth-dialog {
        padding: 29px 23px;
    }
}
@media (max-width: 991.98px) {
    .nav-wrap > .iwp-auth-control {
        display: none;
    }
}