/*
Theme Name: Święta na Starówce
Description: Custom WordPress theme for Bielsko-Biała festival reservation system
Version: 1.0
Author: City of Bielsko-Biała
Text Domain: swieta-starówka
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
}

/* WCAG Compliance - Focus States */
*:focus {
    outline: 3px solid #3182ce;
    outline-offset: 2px;
}

/* Skip Links for Accessibility */
.skip-links {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000000;
    color: #ffffff;
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
    border-radius: 4px;
}

.skip-links:focus {
    top: 6px;
}

/* Header */
.site-header {
    background: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin: 0;
}

/* Navigation */
.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
    color: #3182ce;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Interactive Map Section */
.map-section {
    margin: 2rem 0;
}

.map-container {
    background: #f7fafc;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.map-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: center;
}

.venue-maps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .venue-maps {
        grid-template-columns: 1fr 1fr;
    }
}

.map-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-svg {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Interactive Map Spots - Legacy support */
.map-spot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-spot:hover,
.map-spot:focus {
    stroke: #3182ce;
    stroke-width: 3px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.map-spot.available {
    fill: #48bb78;
    opacity: 0.7;
}

.map-spot.reserved {
    fill: #ed8936;
    opacity: 0.7;
}

.map-spot.booked {
    fill: #e53e3e;
    opacity: 0.7;
}

.map-spot.selected {
    fill: #3182ce;
    stroke: #2b6cb0;
    stroke-width: 2px;
}

/* Festival Spots - Real SVG elements */
.festival-spot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.festival-spot:hover,
.festival-spot:focus,
.festival-spot.festival-spot-hover {
    stroke: #3182ce !important;
    stroke-width: 2px !important;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.festival-spot.festival-spot-focused {
    outline: 3px solid #3182ce;
    outline-offset: 2px;
}

.festival-spot.festival-spot-available {
    fill: #48bb78 !important;
    opacity: 0.7;
}

.festival-spot.festival-spot-reserved {
    fill: #ed8936 !important;
    opacity: 0.8;
}

.festival-spot.festival-spot-booked {
    fill: #e53e3e !important;
    opacity: 0.8;
}

.festival-spot.festival-spot-selected {
    fill: #3182ce !important;
    stroke: #2b6cb0 !important;
    stroke-width: 3px !important;
    opacity: 1;
}

/* Festival Map Containers */
.festival-map {
    width: 100%;
    height: auto;
    max-width: 100%;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #718096;
    font-style: italic;
}

.error, .warning {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-weight: 500;
}

.error {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.warning {
    background-color: #fefcbf;
    color: #d69e2e;
    border: 1px solid #f6e05e;
}

.error .btn, .warning .btn {
    margin-top: 0.5rem;
    margin-left: 0.5rem;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reservation Form */
.reservation-form {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.form-label.required::after {
    content: " *";
    color: #e53e3e;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #3182ce;
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3182ce;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover,
.btn:focus {
    background-color: #2b6cb0;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #718096;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #4a5568;
}

/* Status Legend */
.status-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #cbd5e0;
}

.legend-color.available {
    background-color: #48bb78;
}

.legend-color.reserved {
    background-color: #ed8936;
}

.legend-color.booked {
    background-color: #e53e3e;
}

/* Reservation Summary */
.reservation-summary {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-total {
    border-top: 2px solid #e2e8f0;
    padding-top: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Footer */
.site-footer {
    background: #2d3748;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.accessibility-link {
    color: #90cdf4;
    text-decoration: underline;
    margin-top: 1rem;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-navigation ul {
        gap: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .status-legend {
        gap: 1rem;
        justify-content: center;
    }

    .summary-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Mobile-friendly map containers */
    .venue-maps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .map-wrapper {
        padding: 0.5rem;
    }

    .festival-map {
        max-height: 400px;
        object-fit: contain;
    }

    /* Form improvements for mobile */
    .form-group {
        margin-bottom: 1rem;
    }

    .reservation-form {
        padding: 1rem;
    }

    /* Touch-friendly buttons */
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        min-height: 44px;
    }
}

/* Tablet specific styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .venue-maps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .container {
        max-width: 900px;
    }
}

/* Mobile landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .venue-maps {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .festival-map {
        max-height: 300px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .map-title {
        font-size: 1.2rem;
    }

    .legend-item {
        font-size: 0.9rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid #000000;
    }

    .form-input,
    .form-select,
    .form-textarea {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000000;
        background: #ffffff;
    }
}