﻿.PopupBox_BoxWrap
{
    float:none; 
    overflow:hidden; 
    width:auto; 
    position:relative;
    padding-left: 26px;
    padding-right: 26px;
}

.PopupBox_c {
    background-color: white;
    margin-bottom: 20px;
    margin-top: 20px;
    padding: 1em;
    border-radius: 1em;
    box-shadow: 0.5em 0.5em 1em #444, -0.5em 0.5em 1em #444;
    font-size: 0.9em;
}

.PopupBoxCloseImage
{
    margin-right: 10px;
    margin-top: 10px;
    border-width: 0px;
    cursor: pointer;
    float: right;
}

/* ==========================================================================
   Shared responsive popup helpers.
   Apply these classes to popup content so every modal renders cleanly on
   mobile without needing per-control media queries.
   ========================================================================== */

/* Replaces hard-coded width:700px blocks. Stays 700px on desktop, shrinks
   to fit the viewport on smaller screens. */
.sqp-popup-panel {
    width: 560px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Wrap wide data tables so they scroll horizontally instead of overflowing. */
.sqp-popup-tablewrap {
    clear: left;
    float: left;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Colored student summary banner row. */
.sqp-popup-summary {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.sqp-popup-summary-balance {
    margin-left: auto;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    flex-direction: column;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
}

/* Figma-style summary balance: balance sits as a secondary line under the name. */
.sqp-popup-summary.sqp-popup-summary-figma-balance {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 8px;
    align-items: center;
}

.sqp-popup-summary.sqp-popup-summary-figma-balance > div:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.sqp-popup-summary.sqp-popup-summary-figma-balance .sqp-popup-summary-name {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

.sqp-popup-summary.sqp-popup-summary-figma-balance .sqp-popup-summary-balance {
    grid-column: 2;
    grid-row: 2;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 5px;
    flex-wrap: nowrap;
}

.sqp-popup-summary.sqp-popup-summary-figma-balance .sqp-popup-summary-balance span,
.sqp-popup-summary.sqp-popup-summary-figma-balance .sqp-popup-summary-balance label {
    color: #e3edf9 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 16px !important;
}

.sqp-popup-summary img {
    max-height: 32px;
    width: auto;
}

.sqp-popup-applied-student {
    display: block;
    width: 100%;
    font-family: 'Inter', Inter, sans-serif;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    color: #1c211f;
    margin: 16px 0 8px 0;
}

.sqp-popup-applied-student-line {
    width: 100%;
    height: 1px;
    border: 0;
    background-color: #e8e8e8;
    margin: 0 0 14px 0;
}

/* Shared Figma-style primary Save button for popup actions. */
.sqp-popup-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 48px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', Inter, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.2px;
    color: #ffffff;
    background-color: #1c4e80;
    box-shadow: inset 0 1px 4px rgba(12, 12, 13, 0.05);
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.sqp-popup-save-btn:hover {
    background-color: #173f67;
}

.sqp-popup-save-btn:disabled,
.sqp-popup-save-btn[disabled] {
    opacity: 0.65;
    cursor: default;
}

@media only screen and (max-device-width: 640px), (max-width: 760px) {
    .sqp-popup-panel {
        width: 100%;
        float: none;
        clear: both;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Keep banner horizontal on small screens to avoid text dropping below image. */
    .sqp-popup-summary {
        flex-direction: row;
        align-items: center !important;
        gap: 8px !important;
    }

    .sqp-popup-summary > div {
        width: auto;
        justify-content: flex-start !important;
    }

    .sqp-popup-summary-name {
        flex-wrap: nowrap;
        min-width: 0;
    }

    .sqp-popup-summary-balance {
        margin-left: 0 !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        text-align: left !important;
        flex-wrap: nowrap;
        padding-left: 0 !important;
        border-left: none !important;
        border-top: none !important;
        padding-top: 0;
    }

    .sqp-popup-summary.sqp-popup-summary-figma-balance {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 6px;
        align-items: center;
    }

    .sqp-popup-summary.sqp-popup-summary-figma-balance .sqp-popup-summary-name { gap: 8px !important; }

    .sqp-popup-summary.sqp-popup-summary-figma-balance .sqp-popup-summary-balance {
        position: static;
        transform: none;
        opacity: 0.85;
        width: 100%;
    }

    .sqp-popup-save-btn {
        min-width: 130px;
        min-height: 42px;
        padding: 9px 14px;
        font-size: 13px;
        letter-spacing: -0.18px;
    }
}
