/* Mobile-First Thumb-Friendly UI styles for log-catch.html */

body {
    padding: 20px 15px;
}

.logger-container {
    max-width: 600px;
    margin: 0 auto;
}

.auth-panel {
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 25px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeIn 0.5s ease;
}

.auth-panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: #f8fafc;
    margin-bottom: 15px;
}

.auth-panel p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    max-width: 300px;
}

.google-btn:active {
    transform: scale(0.96);
}

.logger-panel {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--glass-shadow);
}

.mode-toggle {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mode-btn.active-mode {
    background: rgba(30, 41, 59, 0.9);
    color: #06b6d4;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

select.thumb-input, input.thumb-input {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: #f8fafc;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    appearance: none;
    outline: none;
}

.outcome-toggle {
    display: flex;
    gap: 10px;
    background: rgba(15, 23, 42, 0.4);
    padding: 6px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.toggle-btn {
    flex: 1;
    padding: 16px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.toggle-btn.active-catch {
    background: #10b981;
    color: #060c18;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.toggle-btn.active-blank {
    background: #ef4444;
    color: #060c18;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Catch Builder & Basket Styles */
.builder-panel {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
}

.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 20px;
}

.species-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 12px 8px;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.species-btn.selected {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.96);
}

.species-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.measurement-sliders {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-label {
    font-size: 0.95rem;
    color: #cbd5e1;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.slider-value {
    font-size: 1.2rem;
    color: #06b6d4;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #06b6d4;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.add-fish-btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.add-fish-btn:active {
    background: #10b981;
    color: #060c18;
}

.add-fish-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #64748b;
    color: #64748b;
}

/* The Keepnet (Basket) */
.keepnet-container {
    border: 2px dashed rgba(6, 182, 212, 0.4);
    border-radius: 20px;
    padding: 20px;
    background: rgba(6, 182, 212, 0.02);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.keepnet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.keepnet-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #06b6d4;
    font-size: 1.1rem;
}

.empty-basket {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    padding: 20px 0;
    font-style: italic;
}

.fish-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    padding: 12px 15px;
    border-radius: 12px;
    animation: slideDown 0.3s ease;
}

.fish-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fish-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #f8fafc;
    font-size: 1rem;
    margin-bottom: 2px;
}

.fish-stats {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

.remove-fish {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 1.5rem;
    padding: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-fish:active {
    background: rgba(239, 68, 68, 0.2);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.note-tag {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.note-tag.selected {
    background: #06b6d4;
    color: #060c18;
    border-color: #06b6d4;
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%);
    color: #060c18;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 10px;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.submit-btn:active {
    transform: scale(0.98);
}

.hidden {
    display: none !important;
}

.section-divider {
    border-top: 1px dashed rgba(255,255,255,0.1);
    margin: 30px 0;
    position: relative;
    text-align: center;
}

.section-divider span {
    background: #0f172a;
    padding: 0 15px;
    position: relative;
    top: -12px;
    color: #64748b;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   ===  PER-ROD REBUILD ADDITIONS  ============================================
   New structures for the rewritten log-catch.html: numbered fieldset sections,
   dual-range time sliders, rod cards, debris sliders, region-filtered species,
   condition tags (.tag-btn), and the "add rod" control. Appended so the
   originals above are untouched; a few reconciliations are noted inline.
   ============================================================================ */

/* --- Form primitives the new HTML uses (it doesn't use .thumb-input) -------- */
.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    color: #f8fafc;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.form-control:disabled { opacity: 0.5; }

.form-group { margin-bottom: 20px; }
.form-group > label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 10px;
    font-size: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
}

.back-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.back-nav a { color: #06b6d4; text-decoration: none; font-weight: 600; }
.back-nav h2 { margin: 0; font-family: 'Outfit', sans-serif; color: #f8fafc; }

/* --- Numbered sections ------------------------------------------------------ */
.logger-section {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 22px 18px 8px;
    margin: 0 0 22px 0;
    background: rgba(15, 23, 42, 0.4);
}
.logger-section > legend {
    padding: 0 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #06b6d4;
    letter-spacing: 0.5px;
}
.section-help {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 18px 0;
}
.hint { font-weight: 400; color: #94a3b8; font-size: 0.85em; }
.range-readout { color: #06b6d4; font-weight: 800; }
.range-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 2px;
}

/* --- Dual-range (two thumbs over one shared track) -------------------------- */
.dual-range {
    position: relative;
    height: 40px;
}
.dual-range input[type="range"] {
    position: absolute;
    left: 0;
    top: 10px;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;            /* track ignores clicks */
    -webkit-appearance: none;
    appearance: none;
}
/* the track is drawn once via the first input to avoid a double-thick bar */
.dual-range input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 6px;
    background: rgba(6, 182, 212, 0.18);
}
.dual-range input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 6px;
    background: rgba(6, 182, 212, 0.18);
}
.dual-range input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;            /* thumbs draggable */
    -webkit-appearance: none;
    appearance: none;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2px solid #0f172a;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.5);
    cursor: pointer;
    margin-top: -8px;
}
.dual-range input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2px solid #0f172a;
    cursor: pointer;
}

.debris-slider { width: 100%; }

/* --- Condition tags (new HTML emits .tag-btn; mirror the .note-tag look) ----- */
.tag-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tag-btn.selected {
    background: #06b6d4;
    color: #060c18;
    border-color: #06b6d4;
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

/* --- Rod cards -------------------------------------------------------------- */
.rod-card {
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(15, 23, 42, 0.55);
}
.rod-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.rod-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: #f8fafc;
}
.rod-remove-btn {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.rod-remove-btn:active { background: rgba(248, 113, 113, 0.22); }

.builder-label {
    display: block;
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Blank toggle row (reused for the per-rod blank checkbox) */
.blank-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    margin: 10px 0;
}
.blank-toggle input { width: 18px; height: 18px; accent-color: #ef4444; }

.add-rod-btn {
    width: 100%;
    background: rgba(6, 182, 212, 0.12);
    border: 1px dashed rgba(6, 182, 212, 0.5);
    color: #06b6d4;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.add-rod-btn:active { background: rgba(6, 182, 212, 0.2); }

/* --- Species grid override for the per-rod builder -------------------------
   The original .species-grid is a fixed-height scroller with centred pills.
   Inside a rod card we want a compact, left-aligned, auto-height grid that
   shows the nickname in italics, so scope these overrides to .rod-species-grid. */
.rod-species-grid {
    max-height: none;
    margin-bottom: 0;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.rod-species-grid .species-btn {
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
    padding: 9px 10px;
    font-size: 0.82rem;
}
.rod-species-grid .species-btn em {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.92em;
}
.species-empty {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 0.85rem;
    font-style: italic;
    padding: 8px 2px;
}

/* Per-rod basket spacing */
.rod-basket { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rod-add-fish { margin-top: 14px; }

/* Firefox: hide the duplicate track fill on the upper range input */
@-moz-document url-prefix() {
    .dual-range input[type="range"]:last-of-type::-moz-range-track { background: transparent; }
}