/* ============================================================
   HEXIS DAM v2 — Shared Components
   Buttons, badges, inputs, toasts, spinners
   ============================================================ */

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    transition: all var(--ease-fast);
    white-space: nowrap;
    line-height: 1.4;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
    background: var(--brand-accent);
    color: white;
    box-shadow: 0 2px 8px rgba(254, 1, 108, 0.25);
}
.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(254, 1, 108, 0.35);
    filter: brightness(1.05);
}

.btn--secondary {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn--secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-light);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn--ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn--icon {
    padding: 8px;
    border-radius: var(--radius-sm);
}

.btn--sm { padding: 6px 14px; font-size: var(--text-xs); }
.btn--lg { padding: 14px 28px; font-size: var(--text-base); }

.btn--rounded { border-radius: var(--radius-full); }

.btn:disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    line-height: 1.4;
}

.badge svg { width: 12px; height: 12px; }

.badge--image    { background: #FEE2E2; color: #DC2626; }
.badge--video    { background: #DBEAFE; color: #2563EB; }
.badge--document { background: #FEF3C7; color: #D97706; }
.badge--logo     { background: #D1FAE5; color: #059669; }
.badge--product  { background: #EDE9FE; color: #7C3AED; }

.badge--lang {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 10px;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--featured {
    background: linear-gradient(135deg, #FDE68A, #F59E0B);
    color: #78350F;
}

.badge--division {
    color: white;
    font-size: 10px;
    padding: 2px 8px;
}

[data-theme="dark"] .badge--image    { background: rgba(220, 38, 38, 0.15); }
[data-theme="dark"] .badge--video    { background: rgba(37, 99, 235, 0.15); }
[data-theme="dark"] .badge--document { background: rgba(217, 119, 6, 0.15); }
[data-theme="dark"] .badge--logo     { background: rgba(5, 150, 105, 0.15); }
[data-theme="dark"] .badge--product  { background: rgba(124, 58, 237, 0.15); }

/* ── Inputs ─────────────────────────────────────────────── */
.input {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: var(--text-sm);
    transition: all var(--ease-fast);
}

.input::placeholder { color: var(--text-light); }

.input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(254, 1, 108, 0.1);
    background: var(--bg-surface);
}

.input--lg {
    padding: 14px 20px;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}

.input-group {
    position: relative;
}

.input-group__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.input-group__icon svg { width: 18px; height: 18px; }

.input-group .input { padding-left: 42px; }

/* ── Tag Chips ──────────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    background: var(--bg-hover);
    color: var(--text-secondary);
    transition: all var(--ease-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.chip:hover {
    background: var(--brand-accent);
    color: white;
    border-color: var(--brand-accent);
}

.chip.active {
    background: var(--brand-accent);
    color: white;
}

.chip svg { width: 14px; height: 14px; }

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--border);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.spinner--lg { width: 40px; height: 40px; border-width: 3px; }

/* ── Skeleton ───────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-hover) 25%,
        var(--bg-input) 50%,
        var(--bg-hover) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* ── Toast ──────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-sm);
    animation: slideUp var(--ease-spring);
    max-width: 400px;
}

.toast svg { width: 20px; height: 20px; flex-shrink: 0; }

.toast--success svg { color: #059669; }
.toast--error svg   { color: #DC2626; }
.toast--info svg    { color: #2563EB; }

.toast__close {
    margin-left: auto;
    padding: 4px;
    opacity: 0.5;
}
.toast__close:hover { opacity: 1; }

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    stroke-width: 1;
    margin-bottom: var(--space-lg);
    opacity: 0.4;
}

.empty-state__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.empty-state__text {
    font-size: var(--text-sm);
    max-width: 400px;
}
