/* ── Refs Panel ── */

.refs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.refs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 8px;
    text-align: center;
}

.refs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
    padding: 8px;
}

.refs-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0c;
    border: 1px solid #1f1f23;
    cursor: grab;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.refs-thumb:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.refs-thumb:active {
    cursor: grabbing;
}

.refs-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.refs-thumb > i {
    position: absolute;
    inset: 0;
    margin: auto;
}

.refs-dragging {
    opacity: 0.4;
}

.refs-delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #ef4444;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
}

.refs-thumb:hover .refs-delete-btn {
    opacity: 1;
}

/* ── Divider ── */

.refs-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 2px;
}

.refs-divider::before,
.refs-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #2a2a2e;
}

.refs-divider span {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Drop zone ── */

.refs-drop-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 6px 8px 8px;
    padding: 10px;
    border: 1px dashed #2a2a2e;
    border-radius: 8px;
    color: #555;
    font-size: 11px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    outline: none;
}

.refs-drop-zone:hover,
.refs-drop-zone:focus-visible {
    border-color: rgba(var(--accent-rgb), 0.3);
    color: #888;
}

.refs-drop-active {
    border-color: var(--accent-glow) !important;
    background: rgba(var(--accent-rgb), 0.05);
    color: var(--accent) !important;
}
