/* ==========================================================================
   DDA LMIS Portal - Single Sign-On (SSO) Popup Stylesheet
   Matches C:\Users\DDA\Documents\ssopopup.html pixel-for-pixel
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Modal Backdrop */
.sso-modal-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    z-index: 99999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    transition: opacity 0.22s ease-out, visibility 0.22s ease-out;
}

@media (min-width: 640px) {
    .sso-modal-backdrop {
        padding: 1.25rem;
    }
}
@media (min-width: 768px) {
    .sso-modal-backdrop {
        padding: 1.5rem;
    }
}

/* Modal Container */
.sso-modal-container {
    background-color: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    animation: ssoModalScaleIn 0.28s ease-out forwards;
}

@media (min-width: 640px) {
    .sso-modal-container {
        border-radius: 1.5rem;
    }
}

@keyframes ssoModalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header Gradient */
.dda-header-gradient {
    background: linear-gradient(90deg, #23399f 0%, #46227b 40%, #701a57 70%, #821948 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .dda-header-gradient {
        padding: 1.25rem 1.75rem;
    }
}

/* Close Button (Top-Right) */
.sso-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    z-index: 10;
}

.sso-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    transform: scale(1.05);
}

.sso-close-btn i {
    font-size: 0.9375rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sso-close-btn i:empty::before {
    content: "\2715";
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif;
}

@media (min-width: 640px) {
    .sso-close-btn {
        top: 1.25rem;
        right: 1.25rem;
    }
}

/* Top Logo & Title Group */
.sso-top-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
    padding-right: 2rem;
}

.sso-logo-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    background-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
}

@media (min-width: 640px) {
    .sso-logo-wrapper {
        width: 3.5rem;
        height: 3.5rem;
    }
}

.sso-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.125rem;
    display: block;
}

.sso-brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

@media (min-width: 640px) {
    .sso-brand-title {
        font-size: 1.125rem;
    }
}

.sso-brand-subtitle {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #e9d5ff;
    margin-top: 0.125rem;
    margin-bottom: 0;
    text-transform: uppercase;
}

@media (min-width: 640px) {
    .sso-brand-subtitle {
        font-size: 0.75rem;
    }
}

/* Sub-Header SSO Box */
.sso-subheader-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sso-shield-icon-box {
    width: 2.25rem;
    height: 2.25rem;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    color: #ffffff;
    font-size: 1.125rem;
}

@media (min-width: 640px) {
    .sso-shield-icon-box {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}

.sso-subheader-heading {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    line-height: 1;
    color: #ffffff;
    margin: 0;
}

@media (min-width: 640px) {
    .sso-subheader-heading {
        font-size: 1.125rem;
    }
}

.sso-subheader-sub {
    font-size: 0.6875rem;
    color: #f3e8ff;
    font-weight: 500;
    margin-top: 0.125rem;
    margin-bottom: 0;
}

@media (min-width: 640px) {
    .sso-subheader-sub {
        font-size: 0.75rem;
    }
}

/* Modal Body */
.sso-modal-body {
    padding: 1rem;
    background-color: rgba(248, 250, 252, 0.75);
    color: #1f2937;
    overflow-y: auto;
    flex-grow: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .sso-modal-body {
        padding: 1.5rem;
    }
}

.sso-body-intro {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    padding-left: 0.125rem;
    padding-right: 0.125rem;
    margin: 0;
}

@media (min-width: 640px) {
    .sso-body-intro {
        font-size: 0.875rem;
    }
}

/* Info Card Boxes */
.info-card-box {
    background-color: #fcfbfe;
    border: 1px solid #e9e2f3;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.info-card-box:hover {
    border-color: #c4b5fd;
    background-color: #ffffff;
    box-shadow: 0 4px 10px -2px rgba(74, 21, 75, 0.05);
}

.info-card-content {
    flex: 1 1 0%;
    min-width: 0;
}

.info-card-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    margin: 0;
}

@media (min-width: 640px) {
    .info-card-title {
        font-size: 0.875rem;
    }
}

.info-card-desc {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.5;
    margin-top: 0.125rem;
    margin-bottom: 0;
}

.info-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b21a8 !important;
    text-decoration: none !important;
    padding-top: 0.125rem;
    transition: color 0.15s ease;
}

.info-card-link:hover {
    color: #3b0764 !important;
}

.info-card-link i:first-child {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.info-card-link:hover i:first-child {
    transform: translateX(3px);
}

/* Icon Badges */
.icon-badge {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background-color: #ede7f6;
    color: #5b21b6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .icon-badge {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* Domain / URL Bar */
.sso-domain-bar {
    background-color: rgba(250, 245, 255, 0.7);
    border: 1px solid #f3e8ff;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #1e293b;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    margin-top: 0.25rem;
    box-sizing: border-box;
}

.sso-domain-text {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #3b0764;
    letter-spacing: -0.015em;
    user-select: all;
    -webkit-user-select: all;
}

.sso-domain-lock {
    color: #6b21a8;
    font-size: 0.75rem;
}

/* Primary CTA Button */
.dda-btn-gradient {
    background: linear-gradient(90deg, #23399f 0%, #701a57 65%, #821948 100%);
    transition: all 0.3s ease;
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    color: #ffffff !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-decoration: none !important;
    margin-top: 0.25rem;
    border: none;
    box-sizing: border-box;
}

.dda-btn-gradient:hover {
    opacity: 0.96;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -2px rgba(118, 24, 78, 0.4);
    color: #ffffff !important;
    text-decoration: none !important;
}

.dda-btn-gradient i:first-child {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.dda-btn-gradient:hover i:first-child {
    transform: translateX(2px);
}

.sso-btn-text {
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

@media (min-width: 640px) {
    .sso-btn-text {
        font-size: 0.875rem;
    }
}

/* Modal Footer */
.sso-modal-footer {
    padding-top: 0.25rem;
    text-align: center;
}

.sso-footer-text {
    font-size: 0.625rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

@media (min-width: 640px) {
    .sso-footer-text {
        font-size: 0.75rem;
    }
}

/* Custom Scrollbar for inner modal body */
.modal-body-scroll::-webkit-scrollbar {
    width: 5px;
}

.modal-body-scroll::-webkit-scrollbar-track {
    background: #f8f6fc;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 4px;
}

/* Single Sign-On (SSO) Portal Button with white text & icon on hover */
.btn-sso-portal {
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    border: 1.5px solid #2563eb !important;
    background-color: transparent !important;
    color: #1d4ed8 !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.12) !important;
    padding: 0.65rem 1rem !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
}

.btn-sso-portal i {
    color: #2563eb !important;
    font-size: 1.1rem !important;
    transition: color 0.2s ease-in-out !important;
}

.btn-sso-portal span {
    color: inherit !important;
    transition: color 0.2s ease-in-out !important;
}

.btn-sso-portal:hover,
.btn-sso-portal:focus-visible,
.btn-sso-portal:active {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
    transform: translateY(-1px) !important;
}

.btn-sso-portal:hover i,
.btn-sso-portal:focus-visible i,
.btn-sso-portal:active i,
.btn-sso-portal:hover span,
.btn-sso-portal:focus-visible span,
.btn-sso-portal:active span {
    color: #ffffff !important;
}
