/*
 * Ο οδηγός χρήσης: η σελίδα «Βοήθεια» και το παράθυρο του «?».
 *
 * Όλα τα χρώματα διαβάζουν μεταβλητές: τις --nylc-* του θέματος
 * (nylc-theme.css) και τις --primary/--success/--warning/--danger-* του
 * Filament. Έτσι ο οδηγός ακολουθεί φωτεινό και σκοτεινό χωρίς δεύτερο
 * αντίγραφο κανόνων. Όπου χρειάζεται απαλό φόντο από χρώμα, βγαίνει με
 * color-mix πάνω στην επιφάνεια, που δουλεύει και στα δύο θέματα.
 *
 * Καμία utility class του Tailwind: το Filament δεν τις στέλνει (CLAUDE.md,
 * ενότητα 2). Όλα είναι κλάσεις nylc-help-*.
 */

.nylc-help {
    --help-blue: var(--nylc-blue, #215490);
    --help-gold: var(--nylc-gold, #b38e39);
    --help-green: var(--success-600);
    --help-red: var(--danger-600);
    --help-amber: var(--warning-500);
    --help-purple: #7c4dbd;
    --help-surface: var(--nylc-surface, #fff);
    --help-line: var(--nylc-line, var(--gray-200));
    --help-ink: var(--gray-800);
    --help-muted: var(--gray-500);

    color: var(--help-ink);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.dark .nylc-help {
    --help-blue: #8fb3e6;
    --help-purple: #b79be6;
    --help-green: var(--success-400);
    --help-red: var(--danger-400);
    --help-ink: var(--gray-200);
    --help-muted: var(--gray-400);
}

/* ================================================================ hero */

.nylc-help-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.75rem 2rem;
    border-radius: 1rem;
    color: #fff;
    background:
        radial-gradient(circle at 92% 10%, rgb(179 142 57 / 0.45), transparent 40%),
        linear-gradient(135deg, #215490 0%, #173c69 60%, #0f2a4b 100%);
    box-shadow: 0 10px 30px -12px rgb(33 84 144 / 0.55);
    overflow: hidden;
}

/* Η χρυσή γραμμή, ίδια «υπογραφή» με την πάνω μπάρα του θέματος. */
.nylc-help-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, #b38e39, #e3c27a, #b38e39);
}

.nylc-help-hero__icon {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f2a4b;
    background: linear-gradient(145deg, #f0d48f, #b38e39);
    box-shadow: 0 0 0 6px rgb(255 255 255 / 0.12);
}

.nylc-help-hero h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nylc-help-hero p {
    margin: 0.25rem 0 0;
    color: rgb(255 255 255 / 0.85);
}

.nylc-help-hero__roles span {
    display: inline-block;
    margin: 0.125rem 0.125rem 0 0;
    padding: 0 0.6rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f2a4b;
    background: #f0d48f;
}

.nylc-help-search {
    grid-column: 1 / -1;
    position: relative;
    display: block;
}

.nylc-help-search input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: #10203a;
    background: rgb(255 255 255 / 0.96);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
    outline: none;
}

.nylc-help-search input:focus {
    box-shadow: 0 0 0 3px rgb(240 212 143 / 0.8);
}

.nylc-help-search__icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    width: 1.25rem;
    height: 1.25rem;
    color: #5a6b85;
    transform: translateY(-50%);
}

/* =============================================================== κάρτες */

.nylc-help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.nylc-help-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border: 1px solid var(--help-line);
    border-radius: var(--nylc-radius, 0.75rem);
    background: var(--help-surface);
    box-shadow: var(--nylc-shadow, none);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.nylc-help-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--help-gold) 60%, transparent);
    box-shadow: 0 8px 20px -10px rgb(33 84 144 / 0.45);
}

.nylc-help-card__text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.nylc-help-card__text strong {
    color: var(--help-ink);
}

.nylc-help-card__text span {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: var(--help-muted);
}

/* Το χρωματιστό εικονίδιο κεφαλαίου. */
.nylc-help-tone {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    color: var(--tone);
    background: color-mix(in srgb, var(--tone) 14%, var(--help-surface));
}

.nylc-help-tone svg {
    width: 1.35rem;
    height: 1.35rem;
}

.nylc-help-tone--blue { --tone: var(--help-blue); }
.nylc-help-tone--gold { --tone: var(--help-gold); }
.nylc-help-tone--green { --tone: var(--help-green); }
.nylc-help-tone--red { --tone: var(--help-red); }
.nylc-help-tone--purple { --tone: var(--help-purple); }

/* ============================================================== διάταξη */

.nylc-help-layout {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

.nylc-help-toc {
    position: sticky;
    top: calc(var(--topbar-height, 4rem) + 1rem);
    padding: 0.75rem;
    border: 1px solid var(--help-line);
    border-radius: var(--nylc-radius, 0.75rem);
    background: var(--help-surface);
}

.nylc-help-toc__title {
    margin: 0 0 0.4rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--help-gold);
}

.nylc-help-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nylc-help-toc a {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--help-ink);
}

.nylc-help-toc a:hover {
    color: var(--nylc-active-ink, var(--help-blue));
    background: var(--nylc-active-bg, var(--gray-100));
}

.nylc-help-toc svg {
    width: 1rem;
    height: 1rem;
    color: var(--help-muted);
}

@media (max-width: 64rem) {
    .nylc-help-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .nylc-help-toc {
        display: none;
    }
}

@media (max-width: 40rem) {
    .nylc-help-hero {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .nylc-help-hero__icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.75rem;
    }
}

/* ============================================================ κεφάλαια */

.nylc-help-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nylc-help-chapter {
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--help-line);
    border-radius: 1rem;
    background: var(--help-surface);
    box-shadow: var(--nylc-shadow, none);
    scroll-margin-top: calc(var(--topbar-height, 4rem) + 1rem);
}

.nylc-help-chapter__head {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid color-mix(in srgb, var(--help-gold) 45%, transparent);
}

.nylc-help-chapter__head h2 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--help-ink);
}

.nylc-help-chapter__head p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--help-muted);
}

.nylc-help-top {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--help-muted);
}

.nylc-help-top:hover {
    color: var(--help-blue);
}

.nylc-help-empty {
    padding: 2rem;
    text-align: center;
    color: var(--help-muted);
}

/* ============================================================ ενότητες */

.nylc-help-section {
    scroll-margin-top: calc(var(--topbar-height, 4rem) + 1rem);
}

.nylc-help-section:not([hidden]) ~ .nylc-help-section:not([hidden]) {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--help-line);
}

.nylc-help h3 {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.75rem 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--help-blue);
}

.nylc-help h3::before {
    content: '';
    width: 0.3rem;
    height: 1.15rem;
    border-radius: 999px;
    background: var(--help-gold);
}

.nylc-help h4 {
    margin: 1.1rem 0 0.35rem;
    font-size: 1rem;
    font-weight: 650;
    color: var(--help-ink);
}

.nylc-help p {
    margin: 0.5rem 0;
}

.nylc-help ul:not(.nylc-help-steps):not(.nylc-help-toc ul) {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    list-style: none;
}

.nylc-help-section ul:not(.nylc-help-steps) > li {
    position: relative;
    margin: 0.3rem 0;
}

.nylc-help-section ul:not(.nylc-help-steps) > li::before {
    content: '';
    position: absolute;
    top: 0.62em;
    left: -0.9rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--help-gold);
}

.nylc-help a:not([class]) {
    font-weight: 600;
    color: var(--help-blue);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--help-blue) 35%, transparent);
    text-underline-offset: 2px;
}

.nylc-help strong {
    font-weight: 650;
}

/* Βήματα: αριθμημένοι κύκλοι σε κάθετη γραμμή. */
.nylc-help-steps {
    counter-reset: step;
    margin: 0.75rem 0;
    padding: 0;
    list-style: none;
}

.nylc-help-steps > li {
    counter-increment: step;
    position: relative;
    min-height: 2rem;
    padding: 0.2rem 0 0.75rem 2.75rem;
}

.nylc-help-steps > li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: var(--nylc-blue, #215490);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--help-gold) 40%, transparent);
}

.nylc-help-steps > li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2.1rem;
    bottom: 0.1rem;
    left: 0.92rem;
    width: 2px;
    background: color-mix(in srgb, var(--help-blue) 22%, transparent);
}

/* Όνομα κουμπιού ή επιλογής, όπως φαίνεται στην οθόνη. */
.nylc-help-ui {
    display: inline-block;
    padding: 0 0.45rem;
    border: 1px solid color-mix(in srgb, var(--help-blue) 30%, transparent);
    border-radius: 0.375rem;
    font-size: 0.875em;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    color: var(--nylc-active-ink, var(--help-blue));
    background: var(--nylc-active-bg, var(--gray-100));
}

/* Διαδρομή στο μενού: Εξετάσεις › Υποψήφιοι */
.nylc-help-path {
    font-weight: 600;
    white-space: nowrap;
    color: var(--nylc-gold-ink, var(--help-gold));
}

/* Καταστάσεις εξέτασης, στα χρώματα των σημάτων της λίστας. */
.nylc-help-state {
    display: inline-block;
    padding: 0 0.55rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    color: var(--state);
    background: color-mix(in srgb, var(--state) 14%, var(--help-surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state) 30%, transparent);
}

.nylc-help-state--new { --state: var(--gray-500); }
.nylc-help-state--active { --state: var(--help-green); }
.nylc-help-state--locked { --state: var(--warning-600); }
.nylc-help-state--results { --state: var(--info-600, var(--help-blue)); }
.nylc-help-state--issued { --state: var(--help-blue); }
.nylc-help-state--danger { --state: var(--help-red); }

.dark .nylc-help-state--locked { --state: var(--warning-400); }
.dark .nylc-help-state--results { --state: var(--info-400, var(--help-blue)); }

/* Η «ροή» καταστάσεων: σήματα με βέλη, που αναδιπλώνονται σε στενή οθόνη. */
.nylc-help-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.25rem;
    align-items: center;
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: var(--nylc-surface-alt, var(--gray-50));
}

.nylc-help-flow > .nylc-help-arrow {
    color: var(--help-muted);
    font-weight: 700;
}

/* Ρόλοι. */
.nylc-help-role {
    display: inline-block;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--nylc-gold-ink, var(--help-gold));
    background: var(--nylc-gold-soft, #f4ecd9);
}

/* Πίνακες. */
.nylc-help-table {
    width: 100%;
    margin: 0.75rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--help-line);
    border-radius: 0.6rem;
    overflow: hidden;
    font-size: 0.875rem;
}

.nylc-help-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 650;
    color: var(--help-ink);
    background: var(--nylc-surface-alt, var(--gray-50));
    border-bottom: 1px solid var(--help-line);
}

.nylc-help-table td {
    padding: 0.5rem 0.75rem;
    vertical-align: top;
    border-bottom: 1px solid var(--nylc-line-soft, var(--gray-100));
}

.nylc-help-table tr:last-child td {
    border-bottom: 0;
}

.nylc-help-table-wrap {
    overflow-x: auto;
}

/* Επισημάνσεις. */
.nylc-help-note {
    --note: var(--help-blue);

    display: flex;
    gap: 0.7rem;
    margin: 0.85rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--note);
    border-radius: 0.6rem;
    background: color-mix(in srgb, var(--note) 9%, var(--help-surface));
}

.nylc-help-note > div > :first-child { margin-top: 0; }
.nylc-help-note > div > :last-child { margin-bottom: 0; }

.nylc-help-note__icon {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    color: var(--note);
}

.nylc-help-note__title {
    display: block;
    color: var(--note);
}

.nylc-help-note--tip { --note: var(--help-gold); }
.nylc-help-note--warn { --note: var(--warning-600); }
.nylc-help-note--danger { --note: var(--help-red); }
.nylc-help-note--ok { --note: var(--help-green); }

.dark .nylc-help-note--warn { --note: var(--warning-400); }

/* Κομμάτι μόνο για όσους έχουν το δικαίωμα. */
.nylc-help-admin {
    position: relative;
    margin: 1rem 0;
    padding: 1.1rem 1rem 0.6rem;
    border: 1px dashed color-mix(in srgb, var(--help-gold) 65%, transparent);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--help-gold) 5%, var(--help-surface));
}

.nylc-help-admin__tag {
    position: absolute;
    top: -0.7rem;
    left: 0.9rem;
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--nylc-gold-ink, var(--help-gold));
    background: var(--nylc-gold-soft, #f4ecd9);
}

.nylc-help-admin__tag svg {
    width: 0.8rem;
    height: 0.8rem;
}

/* Ερωτήσεις: κλειστές, ανοίγουν με κλικ. */
.nylc-help details {
    margin: 0.5rem 0;
    border: 1px solid var(--help-line);
    border-radius: 0.6rem;
    background: var(--help-surface);
}

.nylc-help summary {
    padding: 0.65rem 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.nylc-help summary::-webkit-details-marker {
    display: none;
}

.nylc-help summary::before {
    content: '+';
    display: inline-block;
    width: 1.25rem;
    font-weight: 800;
    color: var(--help-gold);
}

.nylc-help details[open] summary::before {
    content: '−';
}

.nylc-help details[open] summary {
    border-bottom: 1px solid var(--help-line);
}

.nylc-help details > :not(summary) {
    margin-left: 1rem;
    margin-right: 1rem;
}

/* ======================================================== κουμπί «?» */

/*
 * Χρυσός κύκλος με «?», δίπλα στις ενέργειες της κεφαλίδας. Διαφορετικό
 * από τα κουμπιά ενεργειών επίτηδες: δεν κάνει τίποτα στα δεδομένα.
 */
.nylc-help-trigger {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, #c9a24c, #9c7a2c);
    box-shadow: 0 2px 6px -1px rgb(122 95 34 / 0.55);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.nylc-help-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px -2px rgb(122 95 34 / 0.6);
}

.nylc-help-trigger:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--nylc-blue, #215490) 55%, transparent);
    outline-offset: 2px;
}

.nylc-help--modal {
    font-size: 0.9rem;
}

.nylc-help--modal .nylc-help-section:not([hidden]) ~ .nylc-help-section:not([hidden]) {
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.nylc-help--modal h3:first-child {
    margin-top: 0;
}

/* Κρυμμένες ενότητες από την αναζήτηση. */
.nylc-help [hidden] {
    display: none !important;
}
