/*
 * Elatum Public CSS v1.1.3
 * Dark glassmorphic download panel — #c4a75d accents
 * Scoped under .amel-card and .amel-list-wrap
 * Base font-size anchor: 12px — all font sizes in absolute px
 */

.amel-card,
.amel-list-wrap {
    --amel-gold:       #c4a75d;
    --amel-gold-dim:   rgba(196, 167, 93, 0.25);
    --amel-gold-glow:  rgba(196, 167, 93, 0.08);
    --amel-gold-bd:    rgba(196, 167, 93, 0.20);
    --amel-glass:      rgba(15, 23, 42, 0.78);
    --amel-text:       #e2d5b5;
    --amel-text-muted: rgba(226, 213, 181, 0.55);
    --amel-radius:     10px;
    --amel-radius-sm:  6px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size:   12px;
}

/* ── List wrap ───────────────────────────────────────────────────────────── */
.amel-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.amel-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--amel-glass);
    border: 1px solid var(--amel-gold-bd);
    border-radius: var(--amel-radius);
    padding: 20px 22px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.18s, background 0.18s;
}
.amel-card:hover {
    border-color: var(--amel-gold);
    background: rgba(15, 23, 42, 0.88);
}

/* ── File icon ───────────────────────────────────────────────────────────── */
.amel-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--amel-gold-glow);
    border: 1px solid var(--amel-gold-bd);
    border-radius: var(--amel-radius-sm);
    color: var(--amel-gold);
}
.amel-card-icon img {
    width: 32px;
    height: 32px;
    display: block;
    filter: brightness(0) saturate(100%) invert(68%) sepia(32%) saturate(600%) hue-rotate(5deg) brightness(95%);
}

/* ── Card body ───────────────────────────────────────────────────────────── */
.amel-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amel-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.amel-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--amel-gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amel-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.amel-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.amel-badge--ver { background: var(--amel-gold-glow); color: var(--amel-gold); border: 1px solid var(--amel-gold-bd); }
.amel-badge--cat { background: rgba(148,163,184,0.08); color: rgba(148,163,184,0.8); border: 1px solid rgba(148,163,184,0.15); }

/* ── Description ─────────────────────────────────────────────────────────── */
.amel-card-desc {
    font-size: 12px;
    color: var(--amel-text);
    line-height: 1.6;
}

/* ── Release notes ───────────────────────────────────────────────────────── */
.amel-card-notes {
    background: rgba(196,167,93,0.04);
    border: 1px solid rgba(196,167,93,0.12);
    border-radius: var(--amel-radius-sm);
    padding: 10px 14px;
}
.amel-notes-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--amel-gold-dim);
    margin-bottom: 6px;
}
.amel-notes-body {
    font-size: 12px;
    color: var(--amel-text-muted);
    line-height: 1.65;
}

/* ── Meta row — accent pills ─────────────────────────────────────────────── */
.amel-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.amel-meta-pill {
    display: inline-block;
    padding: 2px 8px;
    background: var(--amel-gold-glow);
    border: 1px solid var(--amel-gold-bd);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--amel-gold);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* ── Download action ─────────────────────────────────────────────────────── */
.amel-card-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 4px;
}

.amel-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: var(--amel-gold);
    color: #0f172a !important;
    border: none;
    border-radius: var(--amel-radius-sm);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;
}
.amel-dl-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.amel-dl-btn:active { transform: translateY(0); }
.amel-dl-btn-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.amel-dl-btn-icon img {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0);
}

/* ── Markdown output ─────────────────────────────────────────────────────── */
.amel-card-desc .amel-md-p,
.amel-notes-body .amel-md-p {
    margin: 0 0 8px;
    line-height: 1.6;
}
.amel-card-desc .amel-md-p:last-child,
.amel-notes-body .amel-md-p:last-child {
    margin-bottom: 0;
}
.amel-card-desc .amel-md-list,
.amel-notes-body .amel-md-list {
    margin: 4px 0 8px 16px;
    padding: 0;
    list-style: disc;
}
.amel-card-desc .amel-md-list li,
.amel-notes-body .amel-md-list li {
    line-height: 1.6;
    padding: 1px 0;
}
.amel-card-desc .amel-md-code,
.amel-notes-body .amel-md-code {
    background: rgba(196,167,93,0.08);
    border: 1px solid rgba(196,167,93,0.15);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: var(--amel-gold);
}
.amel-card-desc a,
.amel-notes-body a {
    color: var(--amel-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.amel-card-desc a:hover,
.amel-notes-body a:hover {
    opacity: 0.8;
}

/* ── Previous versions accordion ─────────────────────────────────────────── */
.amel-prev-versions {
    margin-top: 4px;
    border: 1px solid rgba(196,167,93,0.12);
    border-radius: var(--amel-radius-sm);
    overflow: hidden;
}

.amel-acc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(196,167,93,0.04);
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--amel-gold-dim);
    text-align: left;
    letter-spacing: 0.5px;
    transition: background 0.15s, color 0.15s;
    gap: 8px;
}
.amel-acc-toggle:hover {
    background: rgba(196,167,93,0.08);
    color: var(--amel-gold);
}
.amel-acc-toggle[aria-expanded="true"] {
    color: var(--amel-gold);
    border-bottom: 1px solid rgba(196,167,93,0.12);
}

.amel-acc-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-bottom: 3px;
}
.amel-acc-toggle[aria-expanded="true"] .amel-acc-chevron {
    transform: rotate(-135deg);
    margin-bottom: -3px;
}

.amel-acc-body {
    display: flex;
    flex-direction: column;
}
.amel-acc-body[hidden] { display: none; }

.amel-ver-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(196,167,93,0.06);
    flex-wrap: wrap;
}
.amel-ver-row:last-child { border-bottom: none; }

.amel-ver-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.amel-ver-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}
.amel-ver-icon img {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0) saturate(100%) invert(68%) sepia(32%) saturate(600%) hue-rotate(5deg) brightness(95%);
}

/* Icon inside main card meta row — same sizing as accordion */
.amel-card-meta .amel-ver-icon { width: 20px; height: 20px; }
.amel-card-meta .amel-ver-icon img { width: 16px; height: 16px; }

/* Release notes inside accordion version rows */
.amel-ver-notes {
    margin: 0;
    border-top: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(196,167,93,0.06);
    padding: 8px 12px 10px;
}
.amel-ver-notes:last-child { border-bottom: none; }

.amel-ver-dl-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(196,167,93,0.08);
    border: 1px solid rgba(196,167,93,0.20);
    border-radius: var(--amel-radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--amel-gold) !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.amel-ver-dl-link:hover {
    background: rgba(196,167,93,0.15);
    border-color: rgba(196,167,93,0.35);
}
.amel-ver-dl-link img {
    width: 14px;
    height: 14px;
    display: block;
    filter: brightness(0) saturate(100%) invert(68%) sepia(32%) saturate(600%) hue-rotate(5deg) brightness(95%);
}
.amel-no-files {
    color: var(--amel-text-muted);
    font-style: italic;
    font-size: 12px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .amel-card {
        flex-wrap: wrap;
    }
    .amel-card-icon {
        display: none;
    }
    .amel-card-action {
        width: 100%;
        padding-top: 0;
    }
    .amel-dl-btn {
        width: 100%;
        justify-content: center;
    }
}
