/* sharepoint-picker.css — slide-in panel for browsing and pinning SharePoint
   document libraries. Matches the dark dashboard theme; light theme variants
   not needed (only used inside the dashboard). */

.sp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}
.sp-overlay--open {
    opacity: 1;
    pointer-events: auto;
}

.sp-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 100vw;
    background: #0e1d34;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
    color: #e2e8f0;
    font-family: inherit;
}
.sp-panel--open { transform: translateX(0); }

.sp-panel__header {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sp-panel__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #f8fafc;
}
.sp-panel__subtitle {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.5);
    margin: 2px 0 0;
}
.sp-panel__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
}
.sp-panel__close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sp-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px 28px;
}

.sp-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(226, 232, 240, 0.5);
    margin: 18px 0 10px;
}
.sp-section-label:first-child { margin-top: 0; }

.sp-pinned-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}
.sp-pinned-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
}
.sp-pinned-row__icon { color: #6366f1; flex-shrink: 0; }
.sp-pinned-row__body { flex: 1; min-width: 0; }
.sp-pinned-row__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-pinned-row__site {
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.55);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-pinned-row__unpin {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.sp-pinned-row__unpin:hover { background: rgba(239, 68, 68, 0.1); }

.sp-empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.55);
    text-align: center;
}

.sp-search {
    width: 100%;
    box-sizing: border-box;
    background: #0a1628;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 9px 12px;
    color: #e2e8f0;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.sp-search:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
}

.sp-site-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sp-site {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    overflow: hidden;
}
.sp-site__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}
.sp-site__header:hover { background: rgba(255, 255, 255, 0.04); }
.sp-site__chevron {
    color: rgba(226, 232, 240, 0.5);
    transition: transform 0.18s;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}
.sp-site--open .sp-site__chevron { transform: rotate(90deg); }
.sp-site__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-site__drives {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 10px 10px;
}
.sp-site--open .sp-site__drives { display: block; }
.sp-site__loading {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.5);
    padding: 8px 4px;
}

.sp-drive {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 6px 7px 28px;
    border-radius: 6px;
}
.sp-drive:hover { background: rgba(255, 255, 255, 0.03); }
.sp-drive__icon { color: rgba(226, 232, 240, 0.4); flex-shrink: 0; }
.sp-drive__name {
    font-size: 0.82rem;
    color: #e2e8f0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-drive__pin {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.sp-drive__pin:hover { background: rgba(99, 102, 241, 0.28); }
.sp-drive__pin:disabled {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

.sp-err {
    color: #f87171;
    font-size: 0.78rem;
    margin: 8px 0 0;
}
.sp-info {
    color: rgba(226, 232, 240, 0.55);
    font-size: 0.72rem;
    margin: 12px 0 0;
    line-height: 1.5;
}

/* ── Pick mode: quick-access library list ──────────────────────────────────── */

.sp-quick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.sp-quick-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    color: #e2e8f0;
    font-family: inherit;
}
.sp-quick-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}
.sp-quick-btn__icon { color: #6366f1; flex-shrink: 0; }
.sp-quick-btn__text { flex: 1; min-width: 0; }
.sp-quick-btn__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-quick-btn__site {
    font-size: 0.71rem;
    color: rgba(226, 232, 240, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-quick-btn__arrow {
    color: rgba(226, 232, 240, 0.4);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ── Pick mode: file browser ───────────────────────────────────────────────── */

.sp-browser__back {
    background: transparent;
    border: none;
    color: rgba(226, 232, 240, 0.55);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0 0 10px;
    display: block;
    text-align: left;
    transition: color 0.15s;
}
.sp-browser__back:hover { color: #e2e8f0; }

.sp-browser__breadcrumb {
    font-size: 0.79rem;
    color: rgba(226, 232, 240, 0.6);
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-browser__sep  { color: rgba(226, 232, 240, 0.25); }
.sp-browser__crumb:last-child { color: #c7d2fe; font-weight: 600; }

.sp-browser__items {
    display: flex;
    flex-direction: column;
}

.sp-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 6px;
    border-radius: 6px;
}
.sp-file-row:hover { background: rgba(255, 255, 255, 0.04); }

.sp-file-row__icon { color: rgba(226, 232, 240, 0.45); flex-shrink: 0; }
.sp-file-row--folder .sp-file-row__icon { color: #fbbf24; }

.sp-file-row__info { flex: 1; min-width: 0; }
.sp-file-row__name {
    font-size: 0.83rem;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-file-row__meta {
    font-size: 0.69rem;
    color: rgba(226, 232, 240, 0.4);
    margin-top: 1px;
}
.sp-file-row__unsupported {
    font-size: 0.68rem;
    color: rgba(248, 113, 113, 0.65);
    margin-top: 1px;
}

.sp-file-row__open {
    background: transparent;
    border: none;
    color: rgba(226, 232, 240, 0.45);
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
    transition: color 0.15s;
}
.sp-file-row__open:hover { color: #e2e8f0; }

.sp-file-row__select {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.15s;
}
.sp-file-row__select:hover:not(:disabled) { background: rgba(99, 102, 241, 0.28); }
.sp-file-row__select:disabled {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.25);
    cursor: default;
}
