/**
 * GeoReporter - Main Stylesheet
 * Shared styles across all pages
 *
 * NOTE: CSS variables are defined in variables.css (single source of truth)
 * This file contains component styles that extend the design system.
 */

/* ============== Additional Variables (extending variables.css) ============== */
:root {
    /* Scrollbar styling - not in variables.css */
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-hover: #94a3b8;

    /* Legacy aliases for backwards compatibility */
    --bg-hover: var(--bg-card-hover);
    --border-primary: var(--border-color);
    --border-secondary: var(--border-color-light);
    --text-faint: var(--text-muted);
    --card-radius: var(--radius-lg);
    --card-padding: var(--spacing-md);
    --card-shadow: var(--shadow-card);

    /* Status aliases (map to variables.css) */
    --status-pending-bg: var(--color-pending-bg-solid);
    --status-pending-text: var(--color-pending-text);
    --status-pending-border: var(--color-pending);
    --status-approved-bg: var(--color-approved-bg-solid);
    --status-approved-text: var(--color-approved-text);
    --status-approved-border: var(--color-approved);
    --status-rejected-bg: var(--color-rejected-bg-solid);
    --status-rejected-text: var(--color-rejected-text);
    --status-rejected-border: var(--color-rejected);

    /* Priority aliases (map to variables.css) */
    --priority-low-bg: #e0f2fe;
    --priority-low-text: #0369a1;
    --priority-normal-bg: #f0fdf4;
    --priority-normal-text: #15803d;
    --priority-high-bg: #fef3c7;
    --priority-high-text: #b45309;
    --priority-urgent-bg: #fee2e2;
    --priority-urgent-text: #dc2626;
}

.dark {
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: #475569;
    --scrollbar-hover: #64748b;

    /* Priority aliases - dark mode */
    --priority-low-bg: rgba(14, 165, 233, 0.2);
    --priority-low-text: #7dd3fc;
    --priority-normal-bg: rgba(34, 197, 94, 0.2);
    --priority-normal-text: #86efac;
    --priority-high-bg: rgba(245, 158, 11, 0.2);
    --priority-high-text: #fbbf24;
    --priority-urgent-bg: rgba(239, 68, 68, 0.2);
    --priority-urgent-text: #fca5a5;
}

/* ============== Dark Mode Overrides ============== */
/* Consistent color palette:
   #0f172a - slate-900 (darkest - page bg, inputs)
   #1e293b - slate-800 (cards, panels)
   #334155 - slate-700 (borders, secondary)
   #475569 - slate-600 (hover states)
   #64748b - slate-500 (kanban cards)
   #94a3b8 - slate-400 (muted text)
   #cbd5e1 - slate-300 (light accents)
*/

/* ============== Page Hero ============== */
.page-hero {
    width: 100%;
}

.page-hero > div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 640px) {
    .page-hero > div {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .page-hero > div {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* ============== Main Navigation (Mobile-friendly) ============== */

/* Ensure main nav is always sticky */
.main-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    /* Bigger touch targets for nav links */
    .main-nav a,
    .main-nav button {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0.5rem !important;
    }

    /* Bigger icons on mobile - 20px */
    .main-nav i.fas,
    .main-nav i.far,
    .main-nav i.fab {
        font-size: 1.25rem !important;
    }

    /* Logo icon stays same size */
    .main-nav > div > div > a:first-child i.fas {
        font-size: 1rem !important;
    }

    /* Tighter gaps to fit items */
    .main-nav .gap-2,
    .main-nav .gap-4 {
        gap: 0.25rem !important;
    }
}

/* Cards and containers */
.dark .card,
.dark .stat-card,
.dark .issue-card,
.dark .issue-row,
.dark .user-card,
.dark .invite-card,
.dark .modal-content,
.dark .issue-detail-modal {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

/* Kanban */
.dark .kanban-column {
    background-color: #0f172a !important; /* slate-900 - darkest */
}

.dark .kanban-card {
    background-color: var(--bg-secondary) !important; /* slate-800 - lighter than column */
    border-color: var(--border-color) !important;
}

/* Input fields */
.dark .input-field,
.dark select,
.dark textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark .input-field option,
.dark select option {
    background-color: #1e293b;
    color: #f1f5f9;
}

.dark .input-field::placeholder,
.dark textarea::placeholder {
    color: #64748b !important;
}

/* Tailwind background overrides */
.dark [class*="bg-white"],
.dark [class*="bg-gray-50"],
.dark [class*="bg-gray-100"] {
    background-color: #1e293b !important;
}

.dark [class*="bg-yellow-50"],
.dark [class*="bg-indigo-50"],
.dark [class*="bg-blue-50"],
.dark [class*="bg-green-50"],
.dark [class*="bg-purple-50"] {
    background-color: rgba(51, 65, 85, 0.5) !important;
}

/* ============== Base & Reset ============== */
* { box-sizing: border-box; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

/* ============== Global Cursor Fixes ============== */
body { cursor: default; }
button, [role="button"], .clickable { cursor: pointer; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], textarea { cursor: text; }
select { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { cursor: pointer; }
input[type="file"] { cursor: pointer; }
input:disabled, textarea:disabled, select:disabled, button:disabled { cursor: not-allowed; }
a { cursor: pointer; }
p, span, div, h1, h2, h3, h4, h5, h6, label { cursor: default; }
[x-cloak] { display: none !important; }

/* ============== Scrollbar ============== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }

/* ============== Animations ============== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease-out; }

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ============== Buttons ============== */
.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: 1px solid var(--border-primary);
    transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg-tertiary); }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

/* ============== Form Elements ============== */
.input-field {
    width: 100%;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    transition: all 0.2s;
    outline: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Allow Tailwind padding utilities to override for icon inputs */
.input-field.pl-10 {
    padding-left: 2.5rem;
}
.input-field.pr-10 {
    padding-right: 2.5rem;
}

.input-field:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.input-field::placeholder {
    color: var(--text-faint);
}

/* ============== Cards ============== */
.card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    box-shadow: 0 1px 3px var(--shadow-md);
    border: 1px solid var(--border-secondary);
}
.dark .card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* ============== Toast Notifications ============== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.toast-error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.toast-info { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }

/* ============== Loading Spinner ============== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============== Status Badges (using CSS variables) ============== */
.status-pending { background: var(--status-pending-bg); color: var(--status-pending-text); }
.status-approved { background: var(--status-approved-bg); color: var(--status-approved-text); }
.status-rejected { background: var(--status-rejected-bg); color: var(--status-rejected-text); }

/* Legacy status names - map to new system */
.status-in_progress { background: var(--status-approved-bg); color: var(--status-approved-text); }
.status-in-progress { background: var(--status-approved-bg); color: var(--status-approved-text); }
.status-resolved { background: var(--status-approved-bg); color: var(--status-approved-text); }

/* ============== Map Markers ============== */
.marker-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
.marker-dot:hover { transform: scale(1.2); }
.marker-dot.urgent { animation: pulse 1.5s infinite; }

#map { height: 100%; width: 100%; }

/* Dark mode map tiles - only invert street map tiles, not satellite */
.dark #map.street-mode .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* ============== Lightbox ============== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}
.lightbox.active { display: flex; }

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-50%) scale(1.1);
}
.lightbox-nav.prev { left: -70px; }
.lightbox-nav.next { right: -70px; }

.lightbox-info {
    margin-top: 1rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
}
.lightbox-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.lightbox-info p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

.lightbox-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 0.5rem;
}

.lightbox-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.lightbox-thumb:hover { opacity: 0.8; }
.lightbox-thumb.active { opacity: 1; border-color: white; }

/* Lightbox responsive */
@media (max-width: 768px) {
    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
    .lightbox-close { top: 10px; right: 10px; }
}

/* ============== Issue Detail Modal (Expanded View) ============== */
.issue-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
}

.issue-detail-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px var(--shadow-lg);
    animation: modalSlideUp 0.2s ease-out;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header - compact and clean */
.issue-detail-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-secondary);
    display: flex;
    align-items: center;
    gap: 14px;
}

.issue-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.issue-detail-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.issue-detail-title h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.issue-detail-title .subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header link (clickable icon + title) */
.issue-detail-header-link {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 4px;
    margin: -4px;
    transition: background 0.15s;
}
.issue-detail-header-link:hover {
    background: var(--bg-tertiary);
}
.issue-detail-header-link:hover h2 {
    color: var(--color-primary-600);
}

.issue-detail-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    transition: all 0.15s;
    flex-shrink: 0;
}
.issue-detail-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Body */
.issue-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    cursor: default;
}

/* Status/Priority row */
.issue-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.detail-badge i { font-size: 10px; }
/* Status badges using CSS variables */
.detail-badge-pending { background: var(--status-pending-bg); color: var(--status-pending-text); }
.detail-badge-approved { background: var(--status-approved-bg); color: var(--status-approved-text); }
.detail-badge-rejected { background: var(--status-rejected-bg); color: var(--status-rejected-text); }
/* Legacy mappings */
.detail-badge-in_progress { background: var(--status-approved-bg); color: var(--status-approved-text); }
.detail-badge-resolved { background: var(--status-approved-bg); color: var(--status-approved-text); }
/* Priority badges using CSS variables */
.detail-badge-low { background: var(--priority-low-bg); color: var(--priority-low-text); }
.detail-badge-normal { background: var(--priority-normal-bg); color: var(--priority-normal-text); }
.detail-badge-high { background: var(--priority-high-bg); color: var(--priority-high-text); }
.detail-badge-urgent { background: var(--priority-urgent-bg); color: var(--priority-urgent-text); }

/* Sections */
.issue-detail-section {
    margin-bottom: 20px;
}
.issue-detail-section:last-child {
    margin-bottom: 0;
}
.issue-detail-section h4 {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin: 0 0 8px 0;
}
.issue-detail-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.875rem;
}

/* Meta grid - simple list */
.issue-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.issue-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}
.issue-detail-meta-item .icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}
.issue-detail-meta-item .info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.issue-detail-meta-item .label {
    color: var(--text-muted);
}
.issue-detail-meta-item .value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.8125rem;
}
.issue-detail-meta-item .value a {
    color: var(--primary-500);
    text-decoration: none;
}
.issue-detail-meta-item .value a:hover {
    text-decoration: underline;
}

/* Images grid */
.issue-detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    cursor: default;
}
.issue-detail-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.15s;
    cursor: pointer !important;
}
.issue-detail-images img:hover {
    opacity: 0.85;
}

/* Hero image - large featured photo */
.issue-detail-hero {
    position: relative;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}
.issue-detail-hero-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: opacity 0.15s;
}
.issue-detail-hero:hover .issue-detail-hero-img {
    opacity: 0.9;
}
.issue-detail-hero-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Hero overlay for zoom icon */
.issue-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.issue-detail-hero-overlay i {
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
}
.issue-detail-hero:hover .issue-detail-hero-overlay {
    background: rgba(0, 0, 0, 0.3);
}
.issue-detail-hero:hover .issue-detail-hero-overlay i {
    opacity: 1;
    transform: scale(1);
}

/* Gallery container */
.issue-detail-gallery {
    margin-bottom: 16px;
}

/* Thumbnail strip */
.issue-detail-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.issue-detail-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    opacity: 0.7;
}
.issue-detail-thumb:hover {
    opacity: 1;
    border-color: var(--primary-400);
}
.issue-detail-thumb.active {
    opacity: 1;
    border-color: var(--primary-500);
}
.issue-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Voting section */
.issue-detail-vote-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 16px;
}

.issue-detail-vote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.issue-detail-vote-btn i {
    font-size: 0.75rem;
}
.issue-detail-vote-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-primary);
}
.issue-detail-vote-btn.vote-up:hover {
    color: #22c55e;
    border-color: #bbf7d0;
}
.issue-detail-vote-btn.vote-down:hover {
    color: #ef4444;
    border-color: #fecaca;
}
.issue-detail-vote-btn.vote-up.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: transparent;
}
.issue-detail-vote-btn.vote-down.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: transparent;
}

.dark .issue-detail-vote-btn.vote-up:hover {
    border-color: #166534;
}
.dark .issue-detail-vote-btn.vote-down:hover {
    border-color: #991b1b;
}

.issue-detail-vote-score {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
    color: var(--text-muted);
}
.issue-detail-vote-score.positive {
    color: #22c55e;
}
.issue-detail-vote-score.negative {
    color: #ef4444;
}

/* Compact voting section (at bottom of modal) */
.issue-detail-vote-section.compact {
    padding: 8px 12px;
    margin-bottom: 0;
    margin-top: 12px;
    background: transparent;
    border-top: 1px solid var(--border-secondary);
    border-radius: 0;
    gap: 8px;
}
.issue-detail-vote-section.compact .issue-detail-vote-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}
.issue-detail-vote-section.compact .issue-detail-vote-btn i {
    font-size: 0.625rem;
}
.issue-detail-vote-section.compact .issue-detail-vote-score {
    font-size: 0.9375rem;
    min-width: 32px;
}

/* Description section styling */
.issue-detail-description {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px 14px !important;
}
.issue-detail-description p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Footer - clean buttons */
.issue-detail-footer {
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-secondary);
    display: flex;
    gap: 10px;
}
.issue-detail-footer button,
.issue-detail-footer a {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
    text-decoration: none;
}
.issue-detail-footer .btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
}
.issue-detail-footer .btn-primary:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}
.issue-detail-footer .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}
.issue-detail-footer .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-primary);
}
.issue-detail-footer .btn-danger {
    background: var(--bg-secondary);
    color: #dc2626;
    border: 1px solid #fecaca;
}
.issue-detail-footer .btn-danger:hover {
    background: #fef2f2;
}
.dark .issue-detail-footer .btn-danger {
    border-color: #7f1d1d;
}
.dark .issue-detail-footer .btn-danger:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* Reporter info */
.reporter-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}
.reporter-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    font-size: 12px;
}
.dark .reporter-avatar {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}
.reporter-details {
    flex: 1;
}
.reporter-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.8125rem;
}
.reporter-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .issue-detail-overlay {
        padding: 10px;
    }
    .issue-detail-modal {
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }
    .issue-detail-header {
        padding: 16px 18px;
    }
    .issue-detail-body {
        padding: 16px 18px;
    }
    .issue-detail-footer {
        padding: 14px 18px;
        flex-wrap: wrap;
    }
    .issue-detail-footer button,
    .issue-detail-footer a {
        min-width: calc(50% - 5px);
    }
    /* Voting section mobile */
    .issue-detail-vote-section {
        padding: 10px 12px;
        gap: 8px;
    }
    .issue-detail-vote-btn {
        padding: 6px 10px;
        font-size: 0.8125rem;
    }
    .issue-detail-vote-score {
        font-size: 1.125rem;
        min-width: 40px;
    }
    /* Gallery thumbnails mobile */
    .issue-detail-thumb {
        width: 48px;
        height: 48px;
    }
    .issue-detail-hero-img {
        height: 150px;
    }
}

/* ============================================= */
/* REUSABLE COMPONENT STYLES                      */
/* ============================================= */

/* ============== Status Badge Component ============== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.status-badge i { font-size: 0.625rem; }
.status-badge-xs { padding: 0.125rem 0.5rem; font-size: 0.625rem; }
.status-badge-sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.status-badge-md { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

/* ============== Priority Badge Component ============== */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: capitalize;
}
.priority-badge i { font-size: 0.5rem; }
.priority-low { background: var(--priority-low-bg); color: var(--priority-low-text); }
.priority-normal { background: var(--priority-normal-bg); color: var(--priority-normal-text); }
.priority-high { background: var(--priority-high-bg); color: var(--priority-high-text); }
.priority-urgent { background: var(--priority-urgent-bg); color: var(--priority-urgent-text); }

/* Priority dot (small indicator) */
.priority-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}
.priority-dot.priority-low { background: #0ea5e9; }
.priority-dot.priority-normal { background: #22c55e; }
.priority-dot.priority-high { background: #f59e0b; }
.priority-dot.priority-urgent { background: #ef4444; }

/* ============== Category Icon Component ============== */
.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}
.category-icon-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.category-icon-md { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
.category-icon-lg { width: 3rem; height: 3rem; font-size: 1.25rem; }

/* ============== Vote Buttons Component ============== */
.vote-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.vote-btn {
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: var(--text-faint);
    transition: color 0.15s;
    cursor: pointer;
}
.vote-btn:hover { color: var(--text-secondary); }
.vote-btn.vote-active-up { color: #22c55e; }
.vote-btn.vote-active-down { color: #ef4444; }
.vote-score {
    min-width: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============== Issue Card Base Styles ============== */
.issue-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--card-radius);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}
.issue-card:hover {
    border-color: var(--border-primary);
    box-shadow: var(--card-shadow);
}

/* Card ID */
.card-id {
    font-family: monospace;
    font-size: 0.6875rem;
    color: var(--text-faint);
}

/* ============== Grid Card Variant ============== */
.issue-card-grid {
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.issue-card-grid .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.issue-card-grid .card-status-row {
    margin-bottom: 0.25rem;
}
.issue-card-grid .card-title-row {
    margin-bottom: 0.25rem;
}
.issue-card-grid .card-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}
.issue-card-grid .card-subtype {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}
.issue-card-grid .card-location {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 0.5rem;
}
.issue-card-grid .card-location i {
    color: #ef4444;
    margin-top: 0.125rem;
}
.issue-card-grid .card-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.issue-card-grid .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-secondary);
    margin-top: auto;
}
.issue-card-grid .card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.issue-card-grid .meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
}
.issue-card-grid .card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.issue-card-grid .meta-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
}

/* Admin overlay */
.card-admin-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s;
}
.issue-card:hover .card-admin-overlay {
    opacity: 1;
}
.admin-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.admin-btn-danger:hover {
    background: var(--status-rejected-bg);
    color: var(--status-rejected-text);
    border-color: var(--status-rejected-border);
}

/* ============== List Card Variant ============== */
.issue-card-list {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
    overflow: hidden;
}
.list-priority-bar {
    width: 0.25rem;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--card-radius) 0 0 var(--card-radius);
}
.list-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    width: 100%;
}
.list-id-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.list-main {
    flex: 1;
    min-width: 0;
}
.list-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    color: var(--text-primary);
}
.list-separator {
    color: var(--text-faint);
}
.list-subtype {
    color: var(--text-muted);
}
.list-address {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.list-status {
    flex-shrink: 0;
}
.list-votes {
    flex-shrink: 0;
}
.list-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 5rem;
    text-align: right;
}
.list-arrow {
    color: var(--text-faint);
    transition: color 0.15s;
}
.issue-card-list:hover .list-arrow {
    color: var(--primary-500);
}

/* ============== Compact Card Variant ============== */
.issue-card-compact {
    display: flex;
    text-decoration: none;
    color: inherit;
}
.compact-priority-bar {
    width: 0.25rem;
    flex-shrink: 0;
    border-radius: var(--card-radius) 0 0 var(--card-radius);
}
.compact-content {
    flex: 1;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.compact-category {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}
.compact-separator {
    color: var(--text-faint);
}
.compact-location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.compact-location i {
    color: #ef4444;
    font-size: 0.6875rem;
}
.compact-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.compact-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
}
.compact-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.compact-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
}
.compact-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============== Kanban Card Variant ============== */
.issue-card-kanban {
    padding: 0;
    overflow: hidden;
    cursor: grab;
}
.issue-card-kanban:active {
    cursor: grabbing;
}
.kanban-thumbnail {
    width: 100%;
    height: 6rem;
    overflow: hidden;
}
.kanban-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kanban-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kanban-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text-primary);
}
.kanban-address {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kanban-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
}
.kanban-time {
    font-size: 0.6875rem;
    color: var(--text-faint);
}
.kanban-actions {
    display: flex;
    gap: 0.25rem;
}
.kanban-btn {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.kanban-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ============== Filter Chips ============== */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.filter-chip:hover {
    background: var(--bg-hover);
}
.filter-chip.active {
    background: var(--primary-100);
    color: var(--primary-700);
    border-color: var(--primary-500);
}
.dark .filter-chip.active {
    background: rgba(14, 165, 233, 0.2);
    color: var(--primary-500);
}
.filter-chip i {
    font-size: 0.6875rem;
}
.chip-count {
    background: var(--bg-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

/* Status-specific chip colors when active */
.filter-chip-pending.active {
    background: var(--status-pending-bg);
    color: var(--status-pending-text);
    border-color: var(--status-pending-border);
}
.filter-chip-approved.active {
    background: var(--status-approved-bg);
    color: var(--status-approved-text);
    border-color: var(--status-approved-border);
}
.filter-chip-rejected.active {
    background: var(--status-rejected-bg);
    color: var(--status-rejected-text);
    border-color: var(--status-rejected-border);
}
.filter-chip-urgent.active {
    background: var(--priority-urgent-bg);
    color: var(--priority-urgent-text);
}

/* ============== Status Modal Component ============== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.modal-content {
    background: var(--bg-secondary);
    border-radius: 1rem;
    max-width: 28rem;
    width: 100%;
    box-shadow: 0 20px 40px var(--shadow-lg);
    animation: modalSlideUp 0.2s ease-out;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-secondary);
}
.modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}
.modal-title i {
    color: var(--primary-500);
}
.modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    transition: all 0.15s;
}
.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}
.modal-body {
    padding: 1.25rem;
}
.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Status options in modal */
.status-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.status-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
}
.status-option:hover {
    border-color: var(--border-primary);
}
.status-option-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.status-option-text {
    flex: 1;
}
.status-option-label {
    font-weight: 600;
    font-size: 0.9375rem;
}
.status-option-desc {
    font-size: 0.75rem;
    opacity: 0.7;
}
.status-option-arrow {
    color: var(--text-faint);
    font-size: 0.75rem;
}

/* Status option colors */
.status-option-pending {
    background: var(--status-pending-bg);
}
.status-option-pending .status-option-icon {
    background: var(--status-pending-border);
    color: white;
}
.status-option-pending .status-option-label,
.status-option-pending .status-option-desc {
    color: var(--status-pending-text);
}
.status-option-pending:hover {
    border-color: var(--status-pending-border);
}

.status-option-approved {
    background: var(--status-approved-bg);
}
.status-option-approved .status-option-icon {
    background: var(--status-approved-border);
    color: white;
}
.status-option-approved .status-option-label,
.status-option-approved .status-option-desc {
    color: var(--status-approved-text);
}
.status-option-approved:hover {
    border-color: var(--status-approved-border);
}

.status-option-rejected {
    background: var(--status-rejected-bg);
}
.status-option-rejected .status-option-icon {
    background: var(--status-rejected-border);
    color: white;
}
.status-option-rejected .status-option-label,
.status-option-rejected .status-option-desc {
    color: var(--status-rejected-text);
}
.status-option-rejected:hover {
    border-color: var(--status-rejected-border);
}

/* ============== Filter Drawer (Mobile) ============== */
.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1500;
}
.filter-drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.filter-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 1501;
    overflow: hidden;
}
.filter-drawer.show {
    transform: translateY(0);
}
.drawer-handle {
    width: 2.5rem;
    height: 0.25rem;
    background: var(--border-primary);
    border-radius: 9999px;
    margin: 0.75rem auto;
}
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-secondary);
}
.drawer-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}
.drawer-clear-btn {
    font-size: 0.8125rem;
    color: var(--primary-500);
    background: none;
    border: none;
    cursor: pointer;
}
.drawer-body {
    padding: 1rem 1.25rem 2rem;
    overflow-y: auto;
    max-height: calc(80vh - 6rem);
}
.drawer-section {
    margin-bottom: 1.25rem;
}
.drawer-section:last-child {
    margin-bottom: 0;
}
.drawer-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 0.5rem;
}

/* ============== Filter Select (Dropdown) ============== */
.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
.filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* ============== Geo-Boundary & Restricted Area ============== */

/* Restricted area overlay with diagonal stripe pattern */
.restricted-area-overlay {
    pointer-events: none !important;
}

/* Campaign boundary indicator on map */
.boundary-warning {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
    max-width: calc(100% - 40px);
    text-align: center;
}

.boundary-warning i {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .boundary-warning {
        /* Position well above mobile nav (70px) and layer control button */
        bottom: calc(150px + env(safe-area-inset-bottom));
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Inside boundary indicator (green) */
.boundary-info {
    position: absolute;
    top: 10px;
    right: 60px;
    z-index: 1000;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.boundary-info.outside {
    background: rgba(239, 68, 68, 0.9);
}

/* Map crosshair/reticle styling when outside boundary */
.map-crosshair-warning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.2s;
}

.map-crosshair-warning svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Submit button disabled state when outside boundary */
.submit-btn-geo-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    position: relative;
}

.submit-btn-geo-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(239, 68, 68, 0.1) 5px,
        rgba(239, 68, 68, 0.1) 10px
    );
    border-radius: inherit;
    pointer-events: none;
}
