/* waypoints module styles: big tap targets, readable in daylight, phone first */

/* ---- markers ---- */
.wp-marker {
    background: transparent;
    border: none;
    text-align: center;
    line-height: 1;
}
.wp-marker .wp-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid #2c3e50;
    border-radius: 50% 50% 50% 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.wp-marker-stand .wp-pin,
.wp-marker-blind .wp-pin { border-color: #c0392b; }
.wp-marker-trailcam .wp-pin { border-color: #8e44ad; }
.wp-marker-cabin .wp-pin { border-color: #2c3e50; }
.wp-marker-scrape .wp-pin,
.wp-marker-rub .wp-pin,
.wp-marker-bedding .wp-pin { border-color: #d35400; }
.wp-marker-food .wp-pin,
.wp-marker-water .wp-pin { border-color: #16a085; }
.wp-marker-pending .wp-pin {
    border-style: dashed;
    border-color: #f39c12;
    background: rgba(255, 243, 205, 0.95);
}
.wp-marker-moving .wp-pin {
    border-color: #3498db;
    animation: wp-pulse 1.2s infinite;
}
@keyframes wp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.wp-marker .wp-label {
    display: none;
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 130px;
    padding: 1px 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    background: rgba(44, 62, 80, 0.85);
    border-radius: 3px;
    pointer-events: none;
}
/* Labels only once you are zoomed in enough for them not to be a pile of text */
.wp-show-labels .wp-marker .wp-label { display: block; }
.wp-dropping { cursor: crosshair; }
.wp-dropping .leaflet-container { cursor: crosshair; }

/* ---- popup ---- */
.wp-popup-wrap .leaflet-popup-content { margin: 10px 12px; }
.wp-popup { font-size: 0.95rem; }
.wp-popup-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.wp-popup-icon { font-size: 18px; }
.wp-popup-name { font-size: 1rem; color: #2c3e50; }
.wp-popup-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    margin-bottom: 6px;
}
.wp-popup-note {
    white-space: pre-wrap;
    margin-bottom: 6px;
    max-height: 120px;
    overflow-y: auto;
}
.wp-popup-winds {
    font-size: 0.8rem;
    color: #16a085;
    margin-bottom: 6px;
}
.wp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.wp-thumb {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ced4da;
    cursor: pointer;
    background: #eee;
}
.wp-popup-actions,
.wp-popup-confirm {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.wp-popup-confirm { margin-top: 6px; }
.wp-confirm-text { font-size: 0.85rem; color: #c0392b; }
.wp-pop-btn {
    flex: 1 1 auto;
    min-height: 40px;
    min-width: 96px;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}
.wp-pop-btn:hover { background: #e9ecef; }
.wp-pop-btn.danger { border-color: #e74c3c; color: #c0392b; }
.wp-upload-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #2c3e50;
}
.wp-upload-status.done { color: #27ae60; }
.wp-popup .hidden,
.wp-sheet .hidden,
.wp-move-bar.hidden,
.wp-viewer.hidden,
.wp-sheet.hidden { display: none; }

/* ---- sidebar ---- */
.wp-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.wp-btn {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}
.wp-btn:hover { background: #e9ecef; }
.wp-btn.primary {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
}
.wp-btn.danger {
    background: #fff;
    border-color: #e74c3c;
    color: #c0392b;
}
.wp-btn[disabled] { opacity: 0.6; }
.wp-list { display: flex; flex-direction: column; gap: 6px; }
.wp-count { font-size: 0.75rem; color: #6c757d; }
.wp-group-head {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    margin: 6px 0 3px;
}
.wp-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    text-align: left;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}
.wp-item:hover { border-color: #adb5bd; }
.wp-item-pending { border-style: dashed; border-color: #f39c12; }
.wp-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wp-item-badge { font-size: 0.75rem; color: #6c757d; }

/* ---- bottom sheet form ---- */
.wp-sheet {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.wp-sheet-inner {
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    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);
}
.wp-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.wp-sheet-head h3 { font-size: 1.05rem; color: #2c3e50; }
.wp-icon-btn {
    min-width: 40px;
    min-height: 40px;
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
}
.wp-field {
    display: block;
    margin-bottom: 12px;
}
.wp-field > span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    margin-bottom: 4px;
}
.wp-field input[type="text"],
.wp-field select,
.wp-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;            /* 16px stops iOS zooming the page on focus */
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
}
.wp-field textarea { min-height: 72px; resize: vertical; }
.wp-winds {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.wp-chip {
    min-height: 46px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}
.wp-chip.on {
    background: #16a085;
    border-color: #16a085;
    color: #fff;
}
.wp-meta {
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 10px;
    min-height: 1em;
}
.wp-sheet-actions {
    display: flex;
    gap: 8px;
}
.wp-sheet-actions .wp-btn { min-height: 50px; font-size: 1rem; }

/* ---- move bar ---- */
.wp-move-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 2400;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    max-width: 94vw;
}
.wp-move-text {
    font-size: 0.85rem;
    color: #2c3e50;
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- photo viewer ---- */
.wp-viewer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wp-viewer img {
    max-width: 92vw;
    max-height: 76vh;
    object-fit: contain;
}
.wp-viewer-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px;
}
.wp-viewer-count {
    margin-right: auto;
    color: #fff;
    font-size: 0.9rem;
}
.wp-viewer-nav {
    min-width: 56px;
    min-height: 88px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
}
.wp-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 480px) {
    .wp-sheet-inner { max-width: 100%; }
    .wp-pop-btn { min-width: 45%; }
}
