/**
 * Festival Starówka - Interactive Maps Styles
 */

/* Map Container */
.festival-map-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.festival-map-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: auto;
    border: 2px solid #dee2e6;
}

.festival-map {
    width: 100%;
    height: 100%;
    min-width: 800px;
    min-height: 600px;
}

.festival-map svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.festival-map svg:active {
    cursor: grabbing;
}

/* Spot Styles */
.festival-spot {
    cursor: pointer;
    transition: all 0.2s ease;
    stroke-width: 2;
}

/* Available spots */
.festival-spot.available {
    fill: #28a745;
    stroke: #155724;
}

.festival-spot.available:hover {
    fill: #34ce57;
    stroke: #0f3d1a;
    stroke-width: 3;
}

/* Reserved spots */
.festival-spot.reserved {
    fill: #ffc107;
    stroke: #856404;
}

.festival-spot.reserved:hover {
    fill: #ffcd39;
    stroke: #533f03;
    stroke-width: 3;
}

/* Booked spots */
.festival-spot.booked {
    fill: #dc3545;
    stroke: #721c24;
    cursor: not-allowed;
}

.festival-spot.booked:hover {
    fill: #e15663;
    stroke: #4a1317;
}

/* Selected spots */
.festival-spot.selected {
    fill: #007bff;
    stroke: #0056b3;
    stroke-width: 4;
    filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.5));
}

/* Spot Labels */
.spot-label {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-anchor: middle;
    pointer-events: none;
    fill: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Map Legend */
.map-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
    min-width: 180px;
}

.map-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
}

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

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #dee2e6;
}

.legend-color.available { background: #28a745; }
.legend-color.reserved { background: #ffc107; }
.legend-color.booked { background: #dc3545; }
.legend-color.selected { background: #007bff; }

.legend-text {
    font-size: 13px;
    color: #495057;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 100;
}

.map-control-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.map-control-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.map-control-btn:active {
    transform: scale(0.95);
}

/* Venue Tabs */
.venue-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin: 0;
    padding: 0;
    list-style: none;
}

.venue-tab {
    flex: 1;
    text-align: center;
}

.venue-tab button {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.venue-tab button:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.venue-tab button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #fff;
}

/* Spot Info Tooltip */
.spot-tooltip {
    position: absolute;
    background: #343a40;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 1000;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -8px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.spot-tooltip.show {
    opacity: 1;
}

.spot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #343a40;
}

/* Selection Summary */
.selection-summary {
    background: #e9ecef;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.selection-summary h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
}

.selected-spots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.selected-spot-item {
    background: #007bff;
    color: #fff;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-spot {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
}

.remove-spot:hover {
    color: #ffc107;
}

.total-price {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .festival-map-wrapper {
        height: 400px;
    }

    .map-legend,
    .map-controls {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 10px 0;
    }

    .map-legend {
        text-align: center;
    }

    .map-controls {
        flex-direction: row;
        justify-content: center;
    }

    .venue-tab button {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Loading State */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 16px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dee2e6;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Error State */
.map-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8f9fa;
}

.map-error h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.map-error p {
    margin-bottom: 0;
    color: #6c757d;
}