/* sightings module styles: thumb-sized controls, log an animal in three taps */

.sg-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 8px;
}
.sg-filter {
    flex: 1;
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
    font-family: inherit;
}
.sg-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
}
.sg-check input { width: 20px; height: 20px; }

.sg-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.sg-total { font-size: 0.75rem; color: #6c757d; }
.sg-wp-count {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
}
.sg-wp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-wp-n { font-weight: 700; color: #e67e22; }

.sg-list { display: flex; flex-direction: column; gap: 6px; }
.sg-entry {
    display: flex;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}
.sg-entry-pending { border-style: dashed; border-color: #f39c12; }
.sg-entry-main {
    flex: 1;
    min-height: 44px;
    padding: 8px 10px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    overflow: hidden;
}
.sg-entry-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.9rem;
}
.sg-entry-kind { font-weight: 600; color: #2c3e50; }
.sg-entry-time { font-size: 0.75rem; color: #6c757d; white-space: nowrap; }
.sg-entry-sub { font-size: 0.78rem; color: #6c757d; }
.sg-entry-note {
    font-size: 0.8rem;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sg-entry-tools {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 2px;
}
.sg-btn {
    min-width: 40px;
    min-height: 26px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #f8f9fa;
    font-size: 0.8rem;
    cursor: pointer;
}
.sg-btn:hover { background: #e9ecef; }

/* ---- bottom sheet form ---- */
.sg-sheet {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.sg-sheet.hidden,
.sg-sheet .hidden { display: none; }
.sg-sheet-inner {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px 14px 0 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}
.sg-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.sg-sheet-head h3 { font-size: 1.05rem; color: #2c3e50; }
.sg-icon-btn {
    min-width: 40px;
    min-height: 40px;
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
}
.sg-field { display: block; margin-bottom: 12px; }
.sg-field > span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    margin-bottom: 4px;
}
.sg-row { display: flex; gap: 10px; align-items: flex-end; }
.sg-grow { flex: 1; }
.sg-field input[type="datetime-local"],
.sg-field select,
.sg-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
}
.sg-field textarea { min-height: 58px; resize: vertical; }
.sg-kinds {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.sg-kind-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 58px;
    padding: 6px 2px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}
.sg-kind-icon { font-size: 1.2rem; }
.sg-kind-label { font-size: 0.72rem; color: #495057; }
.sg-kind-btn.on {
    background: #27ae60;
    border-color: #27ae60;
}
.sg-kind-btn.on .sg-kind-label { color: #fff; }
.sg-dirs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.sg-dir-btn {
    min-height: 44px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}
.sg-dir-btn.on {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}
.sg-count {
    display: flex;
    align-items: center;
    gap: 4px;
}
.sg-count input {
    width: 64px;
    min-height: 46px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
}
.sg-step {
    min-width: 46px;
    min-height: 46px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 1.2rem;
    cursor: pointer;
}
.sg-meta {
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 10px;
    min-height: 1em;
}
.sg-sheet-actions { display: flex; gap: 8px; }
.sg-btn-lg {
    flex: 1 1 auto;
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}
.sg-btn-lg:hover { background: #e9ecef; }
.sg-btn-lg.primary {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
}
.sg-btn-lg.danger {
    border-color: #e74c3c;
    color: #c0392b;
}
#sg-add { width: 100%; }

@media (max-width: 480px) {
    .sg-sheet-inner { max-width: 100%; }
}
