/**
 * SPARC Net Logger - front-end styles.
 *
 * Scoped under .snl-app so theme styles are minimally disturbed, and so
 * this stylesheet wins specificity ties against themes that enqueue their
 * stylesheet after plugins (e.g. Twenty Seventeen's .entry-content table,
 * input, and link rules). Brand palette follows the club logo:
 * green #60a830 / #307818 with yellow #f0d800 accents.
 */

.snl-app {
        max-width: 860px;
        margin: 0 0 2em;
        font-size: 16px;
        color: #1d2327;
}

.snl-app a.snl-btn,
.snl-app .snl-report-link {
        text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Access prompt                                                        */
/* ------------------------------------------------------------------ */

.snl-app .snl-locked {
        padding: 1.5em;
        border: 1px solid #d8e0c8;
        border-radius: 8px;
        background: #f6f8f0;
}

.snl-locked-title {
        margin-top: 0;
}

.snl-muted {
        color: #5c6657;
        font-size: 0.9em;
}

.snl-footnote {
        color: #5c6657;
        font-size: 0.82em;
        margin-top: 1.5em;
}

/* ------------------------------------------------------------------ */
/* Toolbar                                                              */
/* ------------------------------------------------------------------ */

.snl-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 14px;
}

.snl-toolbar-label {
        font-weight: 600;
}

.snl-app .snl-logout {
        margin-left: auto;
}

.snl-app .snl-toolbar select {
        font-size: 1em;
        padding: 6px 8px;
        border-radius: 6px;
        border: 1px solid #9aa38c;
        background: #fff;
        color: #1d2327;
        max-width: 420px;
}

.snl-app .snl-toolbar input[type="date"],
.snl-app .snl-toolbar input[type="text"] {
        padding: 5px 8px;
        border: 1px solid #9aa38c;
        border-radius: 6px;
        background: #fff;
        color: #1d2327;
        font-size: 0.95em;
}

/* ------------------------------------------------------------------ */
/* Status bar                                                           */
/* ------------------------------------------------------------------ */

.snl-app .snl-status {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        padding: 12px 14px;
        background: #f3f8ea;
        border: 1px solid #cfe3ae;
        border-radius: 8px;
        margin-bottom: 14px;
}

.snl-status-title {
        font-weight: 600;
}

.snl-status-count {
        color: #307818;
        font-weight: 600;
}

.snl-status-meta {
        color: #5c6657;
        font-size: 0.9em;
}

.snl-badge {
        display: inline-block;
        padding: 2px 10px;
        border-radius: 999px;
        font-size: 0.75em;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
}

.snl-badge-open {
        background: #e4f3d2;
        color: #255e12;
        border: 1px solid #9fcf6e;
}

.snl-badge-submitted {
        background: #eee9c2;
        color: #5c5412;
        border: 1px solid #d4cb77;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */

.snl-app .snl-btn {
        display: inline-block;
        padding: 7px 14px;
        border: 1px solid #307818;
        border-radius: 6px;
        background: #fff;
        color: #307818;
        font-size: 0.95em;
        line-height: 1.4;
        cursor: pointer;
        text-decoration: none;
        box-shadow: none;
}

.snl-app .snl-btn:hover,
.snl-app .snl-btn:focus {
        background: #f3f8ea;
        color: #255e12;
        border-color: #255e12;
        box-shadow: none;
}

.snl-app .snl-btn-primary {
        background: #307818;
        color: #fff;
        border-color: #307818;
}

.snl-app .snl-btn-primary:hover,
.snl-app .snl-btn-primary:focus {
        background: #255e12;
        color: #fff;
        border-color: #255e12;
}

.snl-btn-ghost {
        border-color: #9aa38c;
        color: #3c434a;
}

.snl-btn-danger {
        border-color: #b32d2e;
        color: #b32d2e;
}

.snl-btn-danger:hover {
        background: #fcf0f1;
}

.snl-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* Add check-in card (soft yellow - the club logo accent)               */
/* ------------------------------------------------------------------ */

.snl-app .snl-addcard {
        padding: 14px;
        border: 1px solid #e0d98c;
        border-radius: 8px;
        background: #fdfbe8;
        margin-bottom: 16px;
}

.snl-addrow {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
}

.snl-app .snl-addrow input {
        flex: 1 1 150px;
        min-width: 120px;
        padding: 8px 10px;
        border: 1px solid #9aa38c;
        border-radius: 6px;
        background: #fff;
        color: #1d2327;
        font-size: 1em;
}

.snl-addrow .snl-in-callsign {
        flex: 0 1 190px;
        text-transform: uppercase;
        font-weight: 400;
        letter-spacing: 0.04em;
}

/* The entry hint stays in normal case - typed call signs still render uppercase. */
.snl-addrow .snl-in-callsign::placeholder {
        text-transform: none;
        letter-spacing: normal;
}

.snl-addrow .snl-btn {
        flex: 0 0 auto;
}

.snl-hint {
        margin-top: 8px;
        font-size: 0.9em;
}

.snl-hint-ok {
        color: #255e12;
}

.snl-hint-error {
        color: #8a2424;
}

/* ------------------------------------------------------------------ */
/* Roster                                                               */
/* ------------------------------------------------------------------ */

.snl-app .snl-roster {
        width: 100%;
        border-collapse: collapse;
        margin: 0 0 10px;
        background: #fff;
}

.snl-app .snl-roster th,
.snl-app .snl-roster td {
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid #e7ebe0;
        text-align: left;
        vertical-align: top;
}

.snl-app .snl-roster thead th {
        background: #e9f2d8;
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #3c4a2e;
        border: none;
        border-bottom: 2px solid #9fcf6e;
}

.snl-col-num {
        width: 44px;
        color: #5c6657;
        font-variant-numeric: tabular-nums;
}

.snl-col-count,
.snl-roster td.snl-col-count {
        text-align: center;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
}

.snl-col-actions {
        width: 44px;
        text-align: center;
}

.snl-cell-call {
        font-family: monospace, monospace;
        font-weight: 700;
        font-size: 1.05em;
        white-space: nowrap;
}

.snl-strong {
        font-weight: 700;
}

.snl-remove {
        border: none;
        background: transparent;
        color: #b32d2e;
        font-size: 1.15em;
        line-height: 1;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 4px;
}

.snl-remove:hover {
        background: #fcf0f1;
}

.snl-empty {
        color: #5c6657;
        font-style: italic;
        margin: 8px 0 16px;
}

/* ------------------------------------------------------------------ */
/* Comments + submit row                                                */
/* ------------------------------------------------------------------ */

.snl-comments {
        margin: 18px 0;
}

.snl-app .snl-comments label {
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
}

.snl-app .snl-comments textarea {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        border: 1px solid #9aa38c;
        border-radius: 6px;
        background: #fff;
        color: #1d2327;
        font-size: 0.98em;
        min-height: 90px;
        resize: vertical;
}

.snl-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 8px;
}

.snl-save-note {
        color: #255e12;
        font-size: 0.9em;
        font-weight: 600;
}

.snl-submitrow {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        padding-top: 14px;
        border-top: 1px solid #e7ebe0;
}

.snl-app .snl-report-link {
        color: #307818;
        font-weight: 600;
        text-decoration: underline;
        text-decoration-color: #f0d800;
        text-decoration-thickness: 2px;
        text-underline-offset: 3px;
}

.snl-app .snl-report-link:hover {
        color: #255e12;
}

/* ------------------------------------------------------------------ */
/* Messages                                                             */
/* ------------------------------------------------------------------ */

.snl-msg {
        padding: 10px 14px;
        border-radius: 6px;
        margin: 10px 0;
        font-size: 0.95em;
}

.snl-msg-ok {
        background: #f0f8e4;
        border: 1px solid #9fcf6e;
        color: #255e12;
}

.snl-msg-error {
        background: #fcf0f1;
        border: 1px solid #e2b6b7;
        color: #8a2424;
}

/* ------------------------------------------------------------------ */
/* Reports                                                              */
/* ------------------------------------------------------------------ */

.snl-reports-head {
        display: flex;
        align-items: baseline;
        gap: 18px;
        flex-wrap: wrap;
        margin-bottom: 10px;
}

.snl-reports-title {
        margin: 0 0 6px;
        padding-bottom: 6px;
        border-bottom: 3px solid #f0d800;
        display: inline-block;
}

.snl-monthform {
        display: flex;
        align-items: center;
        gap: 8px;
}

.snl-app .snl-monthform select {
        padding: 6px 8px;
        border: 1px solid #9aa38c;
        border-radius: 6px;
        background: #fff;
        color: #1d2327;
        font-size: 0.95em;
}

.snl-summary {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin: 14px 0 22px;
}

.snl-stat {
        flex: 1 1 120px;
        text-align: center;
        padding: 12px 8px;
        background: #f3f8ea;
        border: 1px solid #cfe3ae;
        border-top: 4px solid #60a830;
        border-radius: 8px;
}

.snl-stat-num {
        display: block;
        font-size: 1.7em;
        font-weight: 700;
        color: #307818;
        line-height: 1.2;
}

.snl-stat-label {
        display: block;
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #5c6657;
}

.snl-section-title {
        margin: 26px 0 10px;
        padding-bottom: 6px;
        border-bottom: 2px solid #f0d800;
}

.snl-netcard {
        border: 1px solid #dfe4d3;
        border-radius: 8px;
        margin-bottom: 10px;
        background: #fff;
}

.snl-app .snl-netcard summary {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        padding: 10px 14px;
        cursor: pointer;
        background: #fafbf5;
        border-radius: 8px;
        list-style-position: inside;
}

.snl-app .snl-netcard summary:hover {
        background: #f3f8ea;
}

.snl-netcard-date {
        font-weight: 700;
        min-width: 150px;
}

.snl-netcard-title {
        color: #3c4a2e;
}

.snl-netcard-count {
        margin-left: auto;
        color: #307818;
        font-weight: 600;
        white-space: nowrap;
}

.snl-netcard-control {
        color: #5c6657;
        font-size: 0.9em;
        white-space: nowrap;
}

.snl-netcard-body {
        padding: 10px 14px 14px;
}

.snl-netcard-comments {
        margin-top: 10px;
        padding: 10px;
        background: #fdfbe8;
        border-left: 3px solid #f0d800;
        border-radius: 0 6px 6px 0;
        font-size: 0.95em;
}

/* ------------------------------------------------------------------ */
/* Focus visibility (keyboard users)                                    */
/* ------------------------------------------------------------------ */

.snl-app input:focus,
.snl-app select:focus,
.snl-app textarea:focus,
.snl-app .snl-btn:focus-visible,
.snl-app .snl-remove:focus-visible {
        outline: 2px solid #60a830;
        outline-offset: 1px;
}

/* ------------------------------------------------------------------ */
/* Small screens                                                        */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
        .snl-addrow input {
                flex: 1 1 100%;
        }

        .snl-addrow .snl-btn {
                flex: 1 1 100%;
        }

        .snl-roster th:nth-child(3),
        .snl-roster td:nth-child(3) {
                white-space: normal;
        }

        .snl-netcard-date {
                min-width: 0;
        }

        .snl-netcard-count {
                margin-left: 0;
        }
}

/* --- Net Control note on the reports page (v1.2.0) --- */
.snl-app .snl-nc-note {
        margin: 0 0 16px;
        padding: 10px 14px;
        background: #f3f8ea;
        border-left: 4px solid #60a830;
        border-radius: 0 6px 6px 0;
        color: #255e12;
        font-size: 0.95em;
}

.snl-app .snl-nc-note a {
        color: #307818;
        font-weight: 700;
        text-decoration: underline;
}

.snl-app .snl-nc-note a:hover,
.snl-app .snl-nc-note a:focus {
        color: #255e12;
}

/* --- All-time participation: search + scrollable frame (v1.2.0) --- */
.snl-app .snl-stats-tools {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 10px;
        flex-wrap: wrap;
}

.snl-app .snl-stats-tools input[type="search"] {
        flex: 0 1 240px;
        padding: 7px 10px;
        border: 1px solid #9aa38c;
        border-radius: 6px;
        background: #fff;
        color: #1d2327;
        font-size: 0.95em;
}

.snl-app .snl-stats-tools input[type="search"]:focus {
        border-color: #60a830;
        outline: 2px solid rgba(96, 168, 48, 0.25);
}

.snl-app .snl-stats-count {
        color: #5a6b52;
        font-size: 0.88em;
}

.snl-app .snl-stats-tools .snl-export {
        margin-left: auto;
}

.snl-app .snl-scroll {
        max-height: 420px;
        overflow-y: auto;
        border: 1px solid #d8e0cc;
        border-radius: 6px;
        background: #fff;
}

.snl-app .snl-scroll .snl-roster {
        margin: 0;
        border: 0;
}

.snl-app .snl-scroll .snl-roster thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #e9f2d8;
        box-shadow: 0 1px 0 #c8d6b0;
}

/* ------------------------------------------------------------------ */
/* Sortable report columns (v1.4.0)                                    */
/* Headings hold a real <button>; JS toggles aria-sort and the         */
/* snl-sorted-asc / snl-sorted-desc classes on the <th>.               */
/* ------------------------------------------------------------------ */

.snl-app .snl-sort-hint {
        margin: 0 0 12px;
        font-size: 0.85em;
        font-style: italic;
        color: #6a7461;
}

.snl-app .snl-roster .snl-th-btn {
        appearance: none;
        -webkit-appearance: none;
        background: none;
        border: none;
        margin: 0;
        padding: 0;
        font: inherit;
        color: inherit;
        letter-spacing: inherit;
        text-transform: inherit;
        text-align: inherit;
        cursor: pointer;
}

.snl-app .snl-roster .snl-th-btn::after {
        content: '\2195'; /* up-down arrow: column is sortable */
        display: inline-block;
        margin-left: 5px;
        font-size: 0.9em;
        opacity: 0.4;
}

.snl-app .snl-roster th:hover .snl-th-btn::after {
        opacity: 0.75;
}

.snl-app .snl-roster th.snl-sorted-asc .snl-th-btn::after {
        content: '\2191'; /* ascending */
        opacity: 1;
}

.snl-app .snl-roster th.snl-sorted-desc .snl-th-btn::after {
        content: '\2193'; /* descending */
        opacity: 1;
}

.snl-app .snl-roster th.snl-sorted-asc,
.snl-app .snl-roster th.snl-sorted-desc {
        color: #255e12;
        border-bottom-color: #60a830;
}

.snl-app .snl-roster .snl-th-btn:focus-visible {
        outline: 2px solid #60a830;
        outline-offset: 2px;
}

/* Only the date cells carry data-v; keep them on one line so the
   arrows on neighbouring headings do not squeeze them into 3-line
   stacks. The all-time table sits in the scroll frame, which takes
   care of any resulting overflow on narrow screens. */
.snl-app .snl-roster td[data-v] {
        white-space: nowrap;
}
