/*
 * Additions to the Filament studio panel. Uses Filament's colour variables,
 * so light and dark mode follow the panel automatically.
 */

/* Uploader */

.pd-uploader {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.dark .pd-uploader {
    border-color: color-mix(in oklab, white 10%, transparent);
}

.pd-dropzone {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    padding: 1.75rem 1rem;
    border: 1.5px dashed var(--gray-300);
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 120ms, background-color 120ms;
}

.pd-dropzone:hover,
.pd-dropzone--active {
    border-color: var(--primary-500);
    background: color-mix(in oklab, var(--primary-500) 6%, transparent);
}

.dark .pd-dropzone {
    border-color: var(--gray-600);
}

.pd-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.pd-dropzone__icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--gray-400);
}

.pd-dropzone__title {
    font-weight: 600;
    font-size: 0.875rem;
}

.pd-dropzone__hint {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pd-queue {
    display: grid;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.pd-queue__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pd-queue__bar {
    flex: 1;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--gray-200);
    overflow: hidden;
}

.dark .pd-queue__bar {
    background: var(--gray-700);
}

.pd-queue__bar-fill {
    height: 100%;
    background: var(--primary-600);
    transition: width 200ms;
}

.pd-queue__list {
    display: grid;
    gap: 0.25rem;
    max-height: 12rem;
    overflow-y: auto;
}

.pd-queue__item {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
}

.pd-queue__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-queue__status {
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.pd-queue__item--error .pd-queue__status {
    color: var(--danger-600);
}

.pd-link {
    font-weight: 600;
    color: var(--primary-600);
}

.dark .pd-link {
    color: var(--primary-400);
}

/* Photo tiles */

.pd-tile {
    display: grid;
    gap: 0.375rem;
    min-width: 0;
}

.pd-tile__frame {
    aspect-ratio: 3 / 2;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--gray-100);
}

.dark .pd-tile__frame {
    background: var(--gray-800);
}

.pd-tile__frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-tile__state {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.375rem;
    height: 100%;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pd-tile__state--failed {
    color: var(--danger-600);
}

.pd-tile__icon {
    width: 1.25rem;
    height: 1.25rem;
}

.pd-tile__name,
.pd-tile__error {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
}

.pd-tile__name {
    color: var(--gray-600);
}

.dark .pd-tile__name {
    color: var(--gray-400);
}

.pd-tile__error {
    color: var(--danger-600);
}
