/**
 * SSO Popup Styles
 * Reusable popup component for SSO login
 */

.sso-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    pointer-events: none;
}

.sso-popup.active {
    pointer-events: auto;
}

.sso-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sso-popup-overlay.active {
    opacity: 1;
}

.sso-popup-window {
    position: relative;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.sso-popup-window.active {
    opacity: 1;
    transform: translateY(0);
}

.sso-popup-window h2 {
    margin: 0 0 15px;
    font-size: 24px;
    color: #333;
}

.sso-popup-window p {
    margin: 0 0 25px;
    color: #666;
    font-size: 15px;
}

.sso-popup-oauth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Center MiniOrange button */
.sso-popup-oauth a,
.sso-popup-oauth button,
.sso-popup-oauth input[type="button"],
.sso-popup-oauth input[type="submit"] {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 200px;
    text-align: center;
    margin-inline: auto !important;
}

/* MiniOrange specific button fix */
.sso-popup-oauth a img,
.sso-popup-oauth a svg {
    margin-right: 8px;
}

.sso-popup-oauth a span {
    flex: 1;
    text-align: center;
}

/* Handle MiniOrange wrapper divs */
.sso-popup-oauth > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Back link */
.sso-popup-back-btn {
    margin-top: 20px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.sso-popup-back-btn:hover {
    color: #333;
}

/* Force scroll lock when popup is active */
html:has(.sso-popup.active),
html:has(.sso-popup.active) body {
    overflow: hidden !important;
    height: 100% !important;
}
