/* Generic Attachment Component */
.att-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.att-card {
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: all 0.2s ease;
}

.att-card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.1);
}

.att-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.att-card__icon svg {
    width: 18px;
    height: 18px;
    stroke: #22c55e;
}

.att-card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    word-break: break-word;
}

.att-card__size {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.att-card__actions {
    display: flex;
    gap: 6px;
}

.att-card__btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: var(--color-text-muted);
}

.att-card__btn svg {
    width: 14px;
    height: 14px;
}

.att-card__btn:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.att-card__btn--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}

.att-dropzone {
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.att-dropzone svg {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

.att-dropzone:hover,
.att-dropzone--active {
    border-color: var(--color-primary);
    background: rgba(13, 148, 136, 0.05);
    color: var(--color-text);
}

.att-dropzone__browse {
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
}

.att-upload-progress {
    margin-bottom: 12px;
}

.att-upload-bar {
    height: 28px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
}

.att-upload-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #14b8a6);
    transition: width 0.2s ease;
}

.att-upload-bar__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: var(--color-text);
    font-weight: 600;
}

.att-preview__image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-md);
}

.att-preview__pdf {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: var(--radius-md);
}

.att-preview__unsupported {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

body.light-mode .att-card {
    background: rgba(34, 197, 94, 0.03);
    border: 1px solid rgba(34, 197, 94, 0.12);
}

@media (max-width: 768px) {
    .att-grid {
        grid-template-columns: 1fr;
    }
}
