/* ══════════════════════════════════════════════════════════════
   Notespark — note attachments
   Isolated file. Load after the other nota-*.css files.
   ══════════════════════════════════════════════════════════════ */

/* The paperclip is a <label> wrapping a hidden InputFile, so it needs the
   icon-btn look without being a real button. */
.att-upload-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

    /* Blazor's <InputFile> renders a real <input type="file">, which shows the
   browser's "Choose Files / No file chosen" chrome. Take it out of layout
   entirely — the label (paperclip) is the visible control, and clicking the
   label still opens the picker. `display:none` would break that in some
   browsers, so clip it to a 1px box instead. */
    .att-upload-btn input[type="file"],
    .att-upload-btn ::deep input[type="file"] {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        border: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
        opacity: 0 !important;
    }

.att-strip {
    margin: 18px 0 6px;
    padding: 14px 0 0;
    border-top: 1px solid var(--n-border-light);
}

.att-strip-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    color: var(--n-text-3);
    margin-bottom: 10px;
}

.att-count {
    font-weight: 700;
    color: var(--n-text-4);
}

.att-status {
    font-size: 13px;
    color: var(--n-text-3);
    margin-bottom: 8px;
}

.att-error {
    color: var(--n-danger);
}

.att-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.att-item {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--n-border-light);
    border-radius: 11px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .att-item:hover {
        border-color: var(--n-card-border-hover);
        box-shadow: 0 3px 12px rgba(70,55,30,0.10);
    }

.att-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 34px 8px 10px;
    text-decoration: none;
    color: inherit;
    max-width: 260px;
}

/* Image attachments get a thumbnail preview */
.att-thumb {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 7px;
    flex-shrink: 0;
    background: var(--n-surface);
}

.att-fileicon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--n-surface);
    color: var(--n-text-3);
    flex-shrink: 0;
}

.att-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.att-name {
    font-size: 13px;
    font-weight: 650;
    color: var(--n-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.att-size {
    font-size: 11px;
    color: var(--n-text-4);
    margin-top: 1px;
}

.att-del {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--n-text-4);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.att-item:hover .att-del {
    opacity: 1;
}

.att-del:hover {
    color: var(--n-danger);
    background: var(--n-danger-bg);
}
