/* ==========================================================================
   Select User Dialog Modal Styles (su-*)
   ========================================================================== */

.su-dialog-card {
    width: 440px;
    max-width: 90vw;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* overflow:visible so the absolutely-positioned dropdown panel
       can escape the card without clipping */
    overflow: visible;
}

.su-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #F0F0F5;
    box-sizing: border-box;
    border-radius: 12px 12px 0 0;
    background: #FFFFFF;
}

.su-dialog-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #151515;
}

.su-dialog-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #666666;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.su-dialog-close-btn:hover {
    color: #151515;
}

.su-dialog-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    /* Must be visible so the absolutely-positioned panel floats out */
    overflow: visible;
}

.su-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.su-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #151515;
}

.su-required-star {
    color: #EF4444;
    font-weight: 600;
    margin-left: 2px;
}

/* ── Custom Floating Dropdown ──────────────────────────────────────────── */

.su-dropdown {
    position: relative;   /* panel anchors to this */
    width: 100%;
}

/* Trigger button */
.su-dropdown-trigger {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s;
    outline: none;
}

.su-dropdown-trigger:hover,
.su-dropdown--open .su-dropdown-trigger {
    border-color: #CBD5E1;
}

.su-dropdown-trigger-text {
    font-size: 13px;
    color: #344054;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}

.su-dropdown-trigger-text--placeholder {
    color: #888888;
}

.su-dropdown-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: #888888;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.su-dropdown--open .su-dropdown-chevron {
    transform: rotate(180deg);
}

/* ── Floating Panel (absolutely positioned — does NOT push content down) */
.su-dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 99999;          /* floats above footer/overlay inside the card */
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    box-sizing: border-box;
    animation: suPanelIn 0.12s ease-out;
}

@keyframes suPanelIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Each item row */
.su-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s;
    box-sizing: border-box;
    width: 100%;
}

.su-dd-item:hover {
    background-color: #F8FAFC;
}

/* "All" row */
.su-dd-item--all {
    background-color: #F1F5F9;
}

.su-dd-item--all:hover {
    background-color: #E9EEF5;
}

.su-dd-divider {
    height: 1px;
    background-color: #E2E8F0;
}

/* Checkboxes */
.su-dd-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #0405AB;
    cursor: pointer;
    flex-shrink: 0;
}

.su-dd-label {
    font-size: 13px;
    color: #344054;
    line-height: 1.4;
}

.su-dd-item--all .su-dd-label {
    font-weight: 700;
    color: #151515;
}

.su-dd-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.su-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #F0F0F5;
    background-color: #FFFFFF;
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
}

.su-btn-cancel {
    height: 38px;
    padding: 0 20px;
    background-color: #FFFFFF;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.su-btn-cancel:hover {
    background-color: #F8FAFC;
}

.su-btn-submit {
    height: 38px;
    padding: 0 24px;
    background-color: #0405AB;
    border: none;
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.su-btn-submit:hover {
    opacity: 0.9;
}
