/* "Kréditu" modal — reuses the CSS custom properties already defined in
   frontend/static/frontend/css/style.css (var(--surface), var(--ink), etc.),
   so it automatically matches the site's theme and dark-mode support
   instead of hardcoding its own colors. Load this file AFTER style.css. */

.credits-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 12, 16, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: credits-fade-in 0.18s ease;
}

.credits-modal-overlay[hidden] {
    display: none;
}

.credits-modal {
    position: relative;
    width: 100%;
    max-width: 740px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 28px 24px;
    background: #fff;
    color: var(--ink, #1a1a1a);
    border: 1px solid var(--border, #e2e2e2);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-lift, 0 24px 70px rgba(0, 0, 0, 0.3));
    animation: credits-pop-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes credits-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes credits-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Header: title + circular icon close button ---------- */
.credits-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.credits-modal-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.credits-modal-close {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: color-mix(in srgb, var(--ink, #1a1a1a) 6%, transparent);
    color: var(--muted, #666);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.credits-modal-close-icon {
    width: 16px;
    height: 16px;
}

.credits-modal-close:hover,
.credits-modal-close:focus-visible {
    background: color-mix(in srgb, var(--primary, #0b5fff) 14%, transparent);
    color: var(--primary, #0b5fff);
    outline: none;
}

.credits-modal-close:active {
    transform: scale(0.92);
}

/* ---------- Lede ---------- */
.credits-modal-lede {
    margin: 4px 0 20px;
    color: var(--muted, #666);
    font-size: 0.92rem;
}

/* ---------- Credits card ---------- */
.credits-card {
    margin: 0 0 20px;
    padding: 18px 20px;
    background: color-mix(in srgb, var(--primary, #0b5fff) 6%, var(--surface, #fff));
    border: 1px solid color-mix(in srgb, var(--primary, #0b5fff) 16%, var(--border, #e2e2e2));
    border-radius: calc(var(--radius-lg, 16px) - 4px);
}

.credits-card p {
    margin: 0;
}

.credits-card-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted, #666);
}

.credits-card-name {
    margin-top: 4px !important;
    font-size: 1.1rem;
    font-weight: 700;
}

.credits-card-role {
    margin-top: 2px !important;
    font-size: 0.85rem;
    color: var(--muted, #666);
}

.credits-card-org {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px dashed color-mix(in srgb, var(--primary, #0b5fff) 25%, var(--border, #e2e2e2));
}

.credits-card-org a {
    font-weight: 600;
    color: var(--primary, #0b5fff);
    text-decoration: none;
}

.credits-card-org a:hover,
.credits-card-org a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.credits-card-version {
    margin-top: 10px !important;
    font-size: 0.78rem;
    color: var(--muted, #666);
}

.credits-card-version span {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.74rem;
    padding: 2px 6px;
    background: color-mix(in srgb, var(--ink, #1a1a1a) 8%, transparent);
    border-radius: 4px;
}

/* ---------- Legal notice ---------- */
.credits-modal-legal {
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid var(--border, #e2e2e2);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted, #666);
}

.credits-modal-legal strong {
    color: var(--ink, #1a1a1a);
}

@media (max-width: 480px) {
    .credits-modal {
        padding: 22px 20px 20px;
    }
}
