/* Fishing Log — custom styles on top of Bootstrap */
:root {
    --water-blue: #1e6091;
    --water-light: #e7f1f8;
    --catch-green: #2d6a4f;
    --accent: #f4a261;
}

body {
    background: linear-gradient(180deg, #f8fafb 0%, #eef4f8 100%);
    min-height: 100vh;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.brand-icon {
    display: inline-block;
    transform: translateY(-1px);
    margin-right: 6px;
}

.card {
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border-radius: 10px;
}

.card-trip {
    transition: transform 0.12s, box-shadow 0.12s;
}

.card-trip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.weather-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--water-light);
    color: var(--water-blue);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-tile {
    background: white;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.stat-tile .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--water-blue);
    line-height: 1;
}

.stat-tile .stat-label {
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.catch-row {
    border-left: 3px solid var(--catch-green);
    padding: 12px 14px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
}

.catch-row .catch-species {
    font-weight: 600;
    color: var(--catch-green);
}

.catch-reg-note {
    display: inline-block;
    font-size: 0.78rem;
    color: #7a5a00;
    background: #fff8ee;
    border-left: 2px solid #f4a261;
    padding: 2px 8px;
    margin-top: 4px;
    border-radius: 2px;
}

.catch-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.geocode-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    width: 100%;
}

.geocode-suggestions .suggestion {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.geocode-suggestions .suggestion:hover {
    background: var(--water-light);
}

.geocode-suggestions .suggestion:last-child {
    border-bottom: none;
}

.species-select-wrap {
    position: relative;
}

.species-list {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    width: 100%;
    display: none;
}

.species-list.open {
    display: block;
}

.species-list .opt {
    padding: 6px 12px;
    cursor: pointer;
}

.species-list .opt:hover, .species-list .opt.highlighted {
    background: var(--water-light);
}

.species-list .add-new {
    padding: 8px 12px;
    background: #fff8ee;
    color: #8a5a00;
    cursor: pointer;
    border-top: 1px solid #eee;
    font-weight: 500;
}

.species-list .species-group-header {
    padding: 6px 12px 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #5b7a8f;
    background: #f4f8fb;
    border-top: 1px solid #e5edf3;
    font-weight: 600;
}

.species-list .species-group-header:first-child {
    border-top: none;
}

.species-list .opt {
    padding: 6px 12px;
}

.species-list .opt .opt-main {
    line-height: 1.2;
}

.species-list .opt .opt-note {
    font-size: 0.75rem;
    color: #7a5a00;
    background: #fff8ee;
    border-left: 2px solid #f4a261;
    padding: 2px 6px;
    margin-top: 2px;
    border-radius: 2px;
}

.species-list .reg-badge {
    color: #1e6091;
    font-size: 0.85rem;
    cursor: help;
}

.species-list {
    max-height: 360px;  /* wider room for ~150 species with notes */
}

.offline-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: none;
}

.offline-banner.visible {
    display: block;
}

.auth-card {
    max-width: 420px;
    margin: 6vh auto;
}

footer {
    color: #999;
    font-size: 0.85rem;
    text-align: center;
    padding: 30px 0 20px;
}


/* ============================================================
   Mobile polish (≤ 575px — Bootstrap's xs breakpoint)
   ============================================================ */

/* Dropdowns (geocode / species picker) must never exceed the visible
   viewport on a phone — half-viewport gives breathing room above + below. */
@media (max-width: 575.98px) {
    .geocode-suggestions,
    .species-list {
        max-height: 50vh;
    }
}

/* Catch row on mobile: shrink the photo a touch, let the action column
   sit below the info so edit/delete have real tap targets. */
@media (max-width: 575.98px) {
    .catch-row {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    .catch-photo {
        width: 64px;
        height: 64px;
    }
    /* The action buttons column was a sibling of the flex-grow info block;
       on narrow screens push it to a full-width row so the buttons get
       proper spacing instead of fighting for horizontal room. */
    .catch-row > .d-flex.flex-column {
        width: 100%;
        flex-direction: row !important;
        justify-content: flex-end;
    }
    .catch-row .btn-sm {
        /* Apple's HIG asks for ≥ 44×44 px tap targets; padding gets us there. */
        padding: 0.45rem 0.85rem;
    }
}

/* Form action bars (Save / Cancel / Delete) need to wrap on narrow
   screens, and the `ms-auto` on the delete button shouldn't push it
   off the right edge. */
.form-action-bar {
    flex-wrap: wrap;
    row-gap: 0.5rem;
}
@media (max-width: 575.98px) {
    .form-action-bar .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
    /* On phones the delete button sits on its own row, full width,
       slightly distanced from the safer Save / Cancel pair. */
    .form-action-bar .btn-outline-danger {
        flex-basis: 100%;
        margin-top: 0.25rem;
        margin-left: 0 !important;
    }
}

/* Friends / settings list rows: let the action button drop below the
   name+email on narrow screens instead of getting squeezed. */
.list-row-responsive {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Trip-detail header — slightly tighter title size on phone so the
   "Planned" / "Shared" badges sit comfortably on the same line. */
@media (max-width: 575.98px) {
    h2 {
        font-size: 1.5rem;
    }
    .stat-tile .stat-number {
        font-size: 1.75rem;
    }
    .stat-tile {
        padding: 12px;
    }
}

/* Tidy markdown-rendered privacy / docs content. */
.privacy-content h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.privacy-content h2 { font-size: 1.25rem; margin-top: 1.5rem; }
.privacy-content h3 { font-size: 1.1rem; margin-top: 1rem; }
.privacy-content table { width: 100%; margin: 0.75rem 0; }
.privacy-content table th,
.privacy-content table td { border-bottom: 1px solid #e5edf3; padding: 6px 10px; }
.privacy-content hr { border-color: #e5edf3; margin: 1.25rem 0; }
.privacy-content blockquote {
    border-left: 3px solid var(--water-blue);
    padding: 0.25rem 0.75rem;
    color: #555;
    background: var(--water-light);
    border-radius: 0 4px 4px 0;
}

/* Add a hair more vertical breathing room between stacked form fields
   on phones — Bootstrap's `g-3` controls both axes; we only want extra
   vertical space when columns have collapsed to one. */
@media (max-width: 767.98px) {
    form .row.g-3 > [class*="col-"],
    form .row.g-2 > [class*="col-"] {
        margin-bottom: 0.25rem;
    }
}
