/**
 * Agency SSO — Slide-out Panel Styles
 *
 * A small floating user-icon button is fixed to the right edge of the
 * viewport. Clicking it slides a panel out from the right containing
 * the "Sign in with Microsoft" flow.
 */

/* ------------------------------------------------------------------ */
/*  Trigger button (floating user icon)                                */
/* ------------------------------------------------------------------ */
.sso-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 10px 12px;
    background: #2F2F2F;
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.18);
    transition: background-color 0.15s ease, padding-right 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.sso-trigger:hover,
.sso-trigger:focus {
    background: #404040;
    padding-right: 18px;
    outline: none;
}

.sso-trigger:focus-visible {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

.sso-trigger__icon {
    flex-shrink: 0;
}

.sso-trigger__label {
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ------------------------------------------------------------------ */
/*  Backdrop overlay                                                   */
/* ------------------------------------------------------------------ */
.sso-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sso-backdrop--visible {
    opacity: 1;
    visibility: visible;
}

/* ------------------------------------------------------------------ */
/*  Slide-out panel                                                    */
/* ------------------------------------------------------------------ */
.sso-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    width: 340px;
    max-width: 90vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.16);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sso-slide-panel--open {
    transform: translateX(0);
}

/* ------------------------------------------------------------------ */
/*  Panel header                                                       */
/* ------------------------------------------------------------------ */
.sso-slide-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
}

.sso-slide-panel__heading {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.3;
}

.sso-slide-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    color: #5e5e5e;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
    -webkit-appearance: none;
    appearance: none;
}

.sso-slide-panel__close:hover,
.sso-slide-panel__close:focus {
    background: #f0f0f0;
    color: #1e1e1e;
    outline: none;
}

.sso-slide-panel__close:focus-visible {
    outline: 2px solid #0078d4;
    outline-offset: -2px;
}

/* ------------------------------------------------------------------ */
/*  Panel body                                                         */
/* ------------------------------------------------------------------ */
.sso-slide-panel__body {
    padding: 20px;
    flex: 1;
}

.sso-slide-panel__description {
    margin: 0 0 24px;
    font-size: 13px;
    color: #5e5e5e;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/*  Microsoft sign-in button                                           */
/* ------------------------------------------------------------------ */
.sso-panel__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background-color: #2F2F2F;
    border: 1px solid #2F2F2F;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.sso-panel__button:hover,
.sso-panel__button:focus {
    background-color: #404040;
    border-color: #404040;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    outline: none;
}

.sso-panel__button:active {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

.sso-panel__button:focus-visible {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

.sso-panel__ms-logo {
    flex-shrink: 0;
    margin-right: 8px;
    vertical-align: middle;
}

/* ------------------------------------------------------------------ */
/*  Error banner inside panel                                          */
/* ------------------------------------------------------------------ */
.sso-panel__error {
    margin: 0 0 16px;
    padding: 10px 12px;
    background-color: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    color: #50575e;
    text-align: left;
}

.sso-panel__error p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/*  Mobile adjustments                                                 */
/* ------------------------------------------------------------------ */
@media screen and (max-width: 480px) {
    .sso-slide-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .sso-trigger__label {
        display: none;
    }
}
