/* =========================================================
   Add / import workspace
   ========================================================= */

#import-button
    .card {
    overflow: visible;
}


/* =========================================================
   Upload zones
   ========================================================= */

.upload-zone {
    position: relative;

    margin-top:
        var(--space-4);

    padding:
        18px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.012),
            transparent
        ),
        var(--bg-surface-2);

    border:
        1px dashed
        rgba(161, 170, 186, 0.24);

    border-radius:
        var(--radius-md);

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}


.upload-zone:hover {
    background:
        linear-gradient(
            180deg,
            rgba(124, 92, 252, 0.022),
            transparent
        ),
        var(--bg-surface-3);

    border-color:
        rgba(124, 92, 252, 0.28);

    box-shadow:
        inset 0 0 0 1px
        rgba(124, 92, 252, 0.02);
}


.upload-zone::before {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 7px;
    height: 7px;

    content: "";

    background:
        var(--text-muted);

    border-radius: 50%;
}


.upload-zone:first-of-type::before {
    background:
        var(--accent-purple);

    box-shadow:
        0 0 9px
        rgba(124, 92, 252, 0.35);
}


.upload-zone:nth-of-type(2)::before {
    background:
        var(--accent-cyan);

    box-shadow:
        0 0 9px
        rgba(59, 200, 255, 0.28);
}


/* =========================================================
   Upload titles / metadata
   ========================================================= */

.upload-title {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom:
        4px;

    color:
        var(--text-primary);

    font-size:
        12px;

    font-weight:
        670;
}


.optional {
    margin-left: 0;

    padding:
        2px
        6px;

    color:
        var(--text-muted);

    background:
        rgba(255, 255, 255, 0.025);

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-xs);

    font-family:
        var(--font-mono);

    font-size:
        9px;

    font-weight:
        650;

    text-transform:
        uppercase;
}


.upload-zone p {
    margin:
        0
        0
        13px;

    color:
        var(--text-muted);

    font-size:
        11px;
}


/* =========================================================
   Native file inputs
   ========================================================= */

.upload-zone
input[type="file"] {
    padding:
        8px;

    color:
        var(--text-secondary);

    background:
        rgba(9, 13, 20, 0.52);

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-sm);

    font-family:
        var(--font-mono);

    font-size:
        10px;

    cursor:
        pointer;
}


.upload-zone
input[type="file"]::file-selector-button {
    margin-right:
        10px;

    padding:
        7px
        10px;

    color:
        var(--text-primary);

    background:
        var(--bg-hover);

    border:
        1px solid
        var(--border-subtle);

    border-radius:
        var(--radius-xs);

    font-family:
        var(--font-sans);

    font-size:
        11px;

    font-weight:
        620;

    cursor:
        pointer;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.upload-zone
input[type="file"]::file-selector-button:hover {
    background:
        rgba(124, 92, 252, 0.10);

    border-color:
        rgba(124, 92, 252, 0.25);
}


/* =========================================================
   File summary
   ========================================================= */

.file-summary {
    display: inline-flex;
    align-items: center;

    margin-top:
        10px;

    padding:
        4px
        7px;

    color:
        var(--text-secondary);

    background:
        rgba(255, 255, 255, 0.025);

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-xs);

    font-family:
        var(--font-mono);

    font-size:
        10px;
}


/* =========================================================
   Import action
   ========================================================= */

.import-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap:
        var(--space-3);

    margin-top:
        var(--space-5);

    padding-top:
        var(--space-4);

    border-top:
        1px solid
        var(--border-default);
}


#import-button {
    min-width:
        120px;
}


/* =========================================================
   Technical note
   ========================================================= */

.note {
    margin-top:
        12px;

    padding-left:
        12px;

    color:
        var(--text-muted);

    border-left:
        2px solid
        rgba(124, 92, 252, 0.24);

    font-family:
        var(--font-mono);

    font-size:
        9px;

    line-height:
        1.5;
}


/* =========================================================
   Drag/drop visual readiness
   ========================================================= */

.upload-zone:focus-within {
    border-color:
        rgba(124, 92, 252, 0.32);

    box-shadow:
        var(--shadow-focus);
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 700px) {
    .import-actions {
        justify-content:
            stretch;
    }

    #import-button {
        width: 100%;
    }
}

/* =========================================================
   Import metadata
   ========================================================= */

.import-metadata {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        220px;

    gap:
        16px;

    margin-top:
        var(--space-4);

    padding:
        16px;

    background:
        rgba(255, 255, 255, 0.012);

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-md);
}


.import-metadata
.field:last-child {
    grid-column:
        1 / -1;
}


.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.field-label {
    color:
        var(--text-primary);

    font-size:
        11px;

    font-weight:
        650;
}


.field-help {
    color:
        var(--text-muted);

    font-size:
        9px;

    line-height:
        1.45;
}


.import-metadata
input,
.import-metadata
textarea {
    width: 100%;

    color:
        var(--text-primary);

    background:
        rgba(8, 11, 18, 0.72);

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-sm);
}


.import-metadata
textarea {
    resize:
        vertical;
}


@media (max-width: 760px) {
    .import-metadata {
        grid-template-columns:
            1fr;
    }

    .import-metadata
    .field:last-child {
        grid-column:
            auto;
    }
}

.import-message {
    margin-top: 12px;
    padding: 10px 12px;

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-sm);

    font-size: 11px;
    line-height: 1.45;
}

.import-message.success {
    background:
        rgba(48, 155, 92, 0.08);
}

.import-message.error {
    background:
        rgba(190, 64, 64, 0.08);
}

/* ---------------------------------------------------------
   Selected upload
   --------------------------------------------------------- */

.upload-selection {
    display:
        flex;

    gap:
        10px;

    align-items:
        center;

    justify-content:
        space-between;

    margin-top:
        10px;

    padding:
        8px
        10px;

    background:
        rgba(255, 255, 255, 0.018);

    border:
        1px solid
        var(--border-default);

    border-radius:
        var(--radius-sm);
}


.upload-selection.hidden {
    display:
        none;
}


.upload-selection-name {
    min-width:
        0;

    overflow:
        hidden;

    color:
        var(--text-secondary);

    font-family:
        var(--font-mono);

    font-size:
        10px;

    line-height:
        1.4;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;
}


.upload-remove-button {
    flex:
        0 0 auto;

    padding:
        5px
        8px;

    color:
        var(--danger);

    background:
        transparent;

    border:
        1px solid
        rgba(255, 92, 117, 0.24);

    border-radius:
        var(--radius-sm);

    font-family:
        var(--font-mono);

    font-size:
        9px;

    font-weight:
        700;

    cursor:
        pointer;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.upload-remove-button:hover {
    background:
        rgba(255, 92, 117, 0.07);

    border-color:
        rgba(255, 92, 117, 0.40);
}


.upload-limits {
    margin-top:
        2px;

    color:
        var(--text-muted);

    font-size:
        11px;
}
