/* ========================================
   PLANPILOT - MAP STYLES
   Map container, markers, popups, controls
   ======================================== */

/* ----------------------------------------
   MAP CONTAINER
   ---------------------------------------- */
#map {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

/* ----------------------------------------
   TRIP SUMMARY - REDESIGNED
   ---------------------------------------- */
.trip-summary-container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 550px;
    min-width: 320px;
    min-height: 200px;
    max-height: 85vh;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    display: none;
    flex-direction: column;
    overflow: hidden;
    resize: both;
}

.trip-summary-container.visible {
    display: flex;
    animation: tripSummarySlideIn 0.3s ease-out;
}

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

.trip-summary-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-bottom: 2px solid var(--border-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.trip-summary-header:active {
    cursor: grabbing;
}

.trip-summary-container.dragging {
    opacity: 0.95;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(8, 145, 208, 0.3);
}

.trip-summary-container.dragging .trip-summary-header {
    cursor: grabbing;
    background: linear-gradient(135deg, #0a9de0 0%, #0780b0 100%);
}

.trip-summary-container.repositioned {
    /* Override default centering when repositioned */
}

/* Resize handle visual indicator */
.trip-summary-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: se-resize;
    z-index: 10;
    background: linear-gradient(135deg, transparent 50%, rgba(8, 145, 208, 0.3) 50%);
    border-radius: 0 0 var(--radius-lg) 0;
}

.trip-summary-header h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Drag indicator dots */
.trip-summary-header::after {
    content: '⋮⋮';
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.trip-summary-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trip-summary-edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Plus sign styling */
#editModeIcon {
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
}

.trip-summary-edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: scale(1.05);
}

.trip-summary-edit-btn.active {
    background: rgba(255, 167, 38, 0.9);
    border-color: rgba(255, 167, 38, 1);
}

.trip-summary-edit-btn.active:hover {
    background: rgba(255, 167, 38, 1);
}

/* Delete mode button active state - red color */
#trip-summary-delete-btn.active {
    background: rgba(231, 76, 60, 0.9);
    border-color: rgba(231, 76, 60, 1);
}

#trip-summary-delete-btn.active:hover {
    background: rgba(231, 76, 60, 1);
}

.trip-summary-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: 500;
}

.trip-summary-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: scale(1.05);
}

.trip-summary-body {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--bg-white);
}

/* Edit Trip Container within Trip Summary */
.trip-summary-edit-container {
    padding: 25px;
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.trip-summary-edit-container .control-group {
    margin-bottom: 20px;
}

.trip-summary-edit-container .control-group:last-of-type {
    margin-bottom: 20px;
}

.trip-summary-edit-container .control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.trip-summary-edit-container .control-group input,
.trip-summary-edit-container .control-group select,
.trip-summary-edit-container .control-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    background: var(--bg-white);
}

.trip-summary-edit-container .control-group input:focus,
.trip-summary-edit-container .control-group select:focus,
.trip-summary-edit-container .control-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.trip-summary-edit-container .control-group textarea {
    resize: vertical;
    min-height: 60px;
}

.trip-summary-edit-container .control-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 12px;
}

.trip-summary-edit-container .connection-mode {
    background: #fff3cd;
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

.trip-summary-edit-container .connection-mode p {
    font-size: 13px;
    color: #856404;
    margin: 0 0 10px 0;
}

.trip-summary-edit-actions {
    display: flex;
    gap: 10px;
    padding-top: 5px;
}

.trip-summary-edit-actions .btn {
    flex: 1;
    margin-bottom: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 800px;
        padding-top: 25px;
        padding-bottom: 25px;
    }
}

/* Stats Dashboard */
.trip-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.trip-summary-stat {
    background: var(--bg-white);
    padding: 16px 12px;
    text-align: center;
    transition: background 0.2s;
}

.trip-summary-stat:hover {
    background: var(--bg-light);
}

.trip-summary-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.trip-summary-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Travel Info Section */
.trip-summary-travel {
    background: var(--bg-light);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.trip-summary-travel-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.trip-summary-travel-content {
    flex: 1;
    min-width: 0;
}

.trip-summary-travel-route {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trip-summary-travel-arrow {
    color: var(--primary-color);
    font-size: 14px;
}

/* Timeline Container */
.trip-summary-timeline {
    padding: 25px;
    background: var(--bg-white);
}

/* Location Card */
.trip-summary-card {
    position: relative;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-color);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: grab;
}

.trip-summary-card:hover {
    box-shadow: var(--shadow-sm);
}

.trip-summary-card.dragging {
    opacity: 0.6;
    transform: scale(1.02) rotate(1deg);
    box-shadow: var(--shadow-md);
    cursor: grabbing;
}

.trip-summary-card:last-child {
    margin-bottom: 0;
}

/* Timeline Line (visual connector) */
.trip-summary-card::before {
    display: none;
}

/* Card Header */
.trip-summary-card-header {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.trip-summary-card-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.trip-summary-card-number:hover {
    transform: scale(1.1);
}

.trip-summary-card-main {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.trip-summary-card-main:hover {
    opacity: 0.8;
}

.trip-summary-card-main:hover .trip-summary-card-title {
    color: var(--primary-color);
}

.trip-summary-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    transition: color 0.2s;
}

.trip-summary-card-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.trip-summary-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.trip-summary-card-duration {
    background: var(--bg-white);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

.trip-summary-card-actions {
    display: flex;
    gap: 6px;
}

.trip-summary-card-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.trip-summary-card-btn.zoom {
    background: var(--bg-white);
    color: var(--primary-color);
}

.trip-summary-card-btn.zoom:hover {
    background: var(--primary-color);
    color: white;
}

.trip-summary-card-btn.delete {
    background: var(--bg-white);
    color: var(--danger-color);
}

.trip-summary-card-btn.delete:hover {
    background: var(--danger-color);
    color: white;
}

/* Card Details (Expandable) */
.trip-summary-card-details {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trip-summary-card.expanded .trip-summary-card-details {
    max-height: 500px;
    padding: 12px;
}

.trip-summary-card-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.trip-summary-card-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.trip-summary-card-toggle-icon {
    transition: transform 0.3s;
}

.trip-summary-card.expanded .trip-summary-card-toggle-icon {
    transform: rotate(180deg);
}

/* Nearby Items List */
.trip-summary-nearby-section {
    margin-bottom: 10px;
}

.trip-summary-nearby-section:last-child {
    margin-bottom: 0;
}

.trip-summary-nearby-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trip-summary-nearby-list {
    /* Container for nearby items */
}

.trip-summary-nearby-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    border-left: 3px solid var(--success-color);
    transition: all 0.2s ease;
    cursor: grab;
}

.trip-summary-nearby-item:last-child {
    margin-bottom: 0;
}

.trip-summary-nearby-item:hover {
    background: var(--bg-hover);
}

.trip-summary-nearby-item:hover .trip-summary-nearby-drag-handle {
    opacity: 1;
}

.trip-summary-nearby-item.attraction {
    border-left-color: var(--accent-color);
}

.trip-summary-nearby-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
    cursor: grabbing;
    background: var(--bg-hover);
}

/* Drag handle for nearby items */
.trip-summary-nearby-drag-handle {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 2px;
    margin-right: 6px;
    cursor: grab;
    opacity: 0.4;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.trip-summary-nearby-drag-handle:hover {
    opacity: 1;
}

.trip-summary-nearby-item.dragging .trip-summary-nearby-drag-handle {
    cursor: grabbing;
}

/* Delete button for nearby items (hidden by default) */
.trip-summary-nearby-delete {
    display: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-white);
    color: var(--danger-color);
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 6px;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.trip-summary-nearby-delete:hover {
    background: var(--danger-color);
    color: white;
}

/* Delete mode - show all delete buttons */
.trip-summary-container.delete-mode .trip-summary-nearby-delete {
    display: flex;
}

/* Show delete buttons on key location cards in delete mode */
.trip-summary-container.delete-mode .trip-summary-card-btn.delete {
    display: flex;
}

/* Hide delete buttons on key location cards when NOT in delete mode */
.trip-summary-container:not(.delete-mode) .trip-summary-card-btn.delete {
    display: none;
}

.trip-summary-nearby-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.trip-summary-nearby-icon.accommodation {
    background: rgba(76, 175, 80, 0.15);
}

.trip-summary-nearby-icon.attraction {
    background: rgba(255, 167, 38, 0.15);
}

.trip-summary-nearby-info {
    flex: 1;
    min-width: 0;
}

.trip-summary-nearby-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trip-summary-nearby-detail {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.trip-summary-nearby-price {
    color: var(--success-color);
    font-weight: 600;
}

.trip-summary-nearby-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 11px;
    padding: 3px 8px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    flex-shrink: 0;
    font-weight: 600;
}

.trip-summary-nearby-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Empty State */
.trip-summary-empty {
    text-align: center;
    padding: 40px 25px;
    color: var(--text-muted);
}

.trip-summary-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.trip-summary-empty-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* No nearby items message */
.trip-summary-no-nearby {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

/* Hidden duration section - replaced by stats */
.trip-summary-duration {
    display: none;
}

/* Footer Actions */
.trip-summary-footer {
    padding: 20px 25px;
    background: var(--bg-light);
    border-top: 2px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.trip-summary-footer-btn {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trip-summary-footer-btn.primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
}

.trip-summary-footer-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
}

.trip-summary-footer-btn.secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.trip-summary-footer-btn.secondary:hover {
    background: var(--border-color);
}

/* ----------------------------------------
   MAP CONTROLS PANEL
   ---------------------------------------- */
.map-controls-toggle-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(8, 145, 208, 0.3);
    z-index: 1001;
    transition: all 0.3s;
}

.map-controls-toggle-btn:hover {
    box-shadow: 0 5px 15px rgba(8, 145, 208, 0.5);
    transform: translateY(-2px);
}

.map-controls-toggle-btn:active {
    transform: translateY(0);
}

.map-controls-panel {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 280px;
    max-width: 320px;
    display: none;
}

.map-controls-panel.visible {
    display: block;
    animation: slideInRight 0.3s ease-out;
}

.map-controls-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 15px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-controls-header h4 {
    margin: 0;
    font-size: 16px;
}

.map-controls-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.map-controls-close:hover {
    background: rgba(255,255,255,0.3);
}

.map-controls-section {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.map-controls-section:last-child {
    border-bottom: none;
}

.map-controls-section h5 {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.map-style-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-style-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.map-style-option:hover {
    background: var(--bg-primary);
}

.map-style-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.map-style-option label {
    cursor: pointer;
    font-size: 13px;
    flex: 1;
}

/* ----------------------------------------
   FILTER CONTROLS
   ---------------------------------------- */
/* Hide old filter control - replaced by map controls */
.filter-control {
    display: none;
}

.filter-control h4 {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.filter-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.filter-item:hover {
    background: var(--bg-primary);
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.filter-item .legend-color {
    margin-right: 10px;
}

.filter-item label {
    cursor: pointer;
    flex: 1;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item-count {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ----------------------------------------
   LEGEND
   ---------------------------------------- */
/* Hide old legend - replaced by map controls */
.legend {
    display: none;
}

.legend h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.legend-color {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.legend-color.key-location {
    background: var(--primary-color);
}

.legend-color.accommodation {
    background: var(--success-color);
}

.legend-color.attraction {
    background: var(--accent-color);
}

/* ----------------------------------------
   CUSTOM MARKERS
   ---------------------------------------- */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* ----------------------------------------
   LEAFLET POPUP STYLING
   ---------------------------------------- */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-xl) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.6 !important;
    min-width: 280px !important;
    max-width: 320px !important;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0,0,0,0.2) !important;
}

.popup-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 15px;
    color: white;
}

.popup-header.accommodation {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
}

.popup-header.attraction {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
}

.popup-header-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
    padding-right: 30px;
}

.popup-header-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.9;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
}

.popup-body {
    padding: 18px;
    background: white;
}

.popup-section {
    margin-bottom: 14px;
}

.popup-section:last-child {
    margin-bottom: 0;
}

.popup-section:first-child {
    margin-bottom: 16px;
}

.popup-description {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    margin: 0;
}

.popup-info-row {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.popup-info-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.popup-info-value {
    color: #555;
    flex: 1;
    font-weight: 500;
}

.popup-button-container {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}

.popup-body > .popup-section:only-child {
    margin-bottom: 0;
}

/* Leaflet popup close button styling */
.leaflet-popup-close-button {
    color: white !important;
    font-size: 22px !important;
    padding: 4px 8px !important;
    opacity: 0.85 !important;
    transition: all 0.2s !important;
    right: 5px !important;
    top: 5px !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.leaflet-popup-close-button:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: var(--radius-md) !important;
    transform: scale(1.1) !important;
}

.leaflet-popup-close-button span {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Popup animation */
.leaflet-popup {
    animation: popupSlideUp 0.3s ease-out;
}

/* ----------------------------------------
   LEAFLET LAYER CONTROL STYLING
   ---------------------------------------- */
.leaflet-control-layers {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    border: none !important;
    margin-top: 10px !important;
    margin-right: 10px !important;
}

.leaflet-top.leaflet-right {
    z-index: 1001 !important;
}

.leaflet-control-layers-expanded {
    padding: 12px 15px !important;
    background: white !important;
    min-width: 160px !important;
}

.leaflet-control-layers-expanded::before {
    content: "Map Style";
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.leaflet-control-layers-list {
    margin-bottom: 0 !important;
}

.leaflet-control-layers-base label {
    padding: 8px 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
}

.leaflet-control-layers-base label:hover {
    color: var(--primary-color) !important;
}

.leaflet-control-layers-base input[type="radio"] {
    margin-right: 8px !important;
    cursor: pointer !important;
    accent-color: var(--primary-color) !important;
}

.leaflet-control-layers-base input[type="radio"]:checked + span {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.leaflet-control-layers-base label:has(input:checked) {
    background: #E3F2FD !important;
    margin: 0 -8px !important;
    padding: 8px 8px !important;
    border-radius: var(--radius-sm) !important;
}

