:host {
    display: block;
    margin: 4px 0 12px;
}

// ─── Dashed drop zone ────────────────────────────────────────────────────────
.file-drop {
    width: 100%;
    appearance: none;
    font: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 24px 28px;
    border-radius: 16px;
    border: 1.5px dashed
        color-mix(in srgb, var(--app-body-color) 30%, transparent);
    background: color-mix(in srgb, var(--app-shell-bg) 55%, transparent);
    color: var(--app-heading-color);
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;

    &:hover {
        border-color: color-mix(
            in srgb,
            var(--app-selection-color) 55%,
            transparent
        );
        background: color-mix(
            in srgb,
            var(--app-selection-color) 4%,
            var(--app-shell-bg) 70%
        );
    }

    &--dragging {
        border-color: var(--app-selection-color);
        background: color-mix(
            in srgb,
            var(--app-selection-color) 10%,
            var(--app-shell-bg) 70%
        );
        transform: scale(1.005);
    }

    &:focus-visible {
        outline: 2px solid var(--app-selection-color);
        outline-offset: 2px;
    }

    &__icon {
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--app-body-color);
        margin-bottom: 6px;

        mat-icon {
            font-size: 30px;
            width: 30px;
            height: 30px;
            line-height: 30px;
        }
    }

    &__title {
        font-size: 15px;
        font-weight: 600;
        color: var(--app-heading-color);
        letter-spacing: -0.005em;
    }

    &__subtitle {
        font-size: 12.5px;
        color: var(--app-muted-color);
        margin-bottom: 6px;
    }

    &__browse {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 18px;
        border-radius: 9px;
        font-size: 13px;
        font-weight: 600;
        color: var(--app-heading-color);
        background: transparent;
        box-shadow: inset 0 0 0 1px
            color-mix(in srgb, var(--app-body-color) 35%, transparent);
        transition: background-color 160ms ease, box-shadow 160ms ease;
    }

    &:hover &__browse {
        background: color-mix(in srgb, var(--app-hover-overlay) 100%, transparent);
        box-shadow: inset 0 0 0 1px
            color-mix(in srgb, var(--app-body-color) 55%, transparent);
    }
}

// ─── Selected-file card ─────────────────────────────────────────────────────
.file-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--app-shell-bg) 85%, transparent);
    box-shadow: inset 0 0 0 1px var(--app-widget-header-border);

    &__icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: color-mix(
            in srgb,
            var(--app-selection-color) 16%,
            transparent
        );
        color: var(--app-selection-color);

        mat-icon {
            font-size: 22px;
            width: 22px;
            height: 22px;
            line-height: 22px;
        }
    }

    &__meta {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    &__name {
        font-size: 14px;
        font-weight: 600;
        color: var(--app-heading-color);
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    &__size {
        font-size: 12px;
        color: var(--app-muted-color);
    }

    &__remove {
        appearance: none;
        border: 0;
        background: transparent;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--app-muted-color);
        cursor: pointer;
        transition: background-color 120ms ease, color 120ms ease;

        mat-icon {
            font-size: 18px;
            width: 18px;
            height: 18px;
            line-height: 18px;
        }

        &:hover {
            background: var(--app-hover-overlay);
            color: var(--app-heading-color);
        }

        &:focus-visible {
            outline: 2px solid var(--app-selection-color);
            outline-offset: 2px;
        }
    }
}
