/**
 * Public Stylesheet for Święta na Starówce Plugin
 * Only essential SVG map element styling
 *
 * @since      1.0.0
 * @package    Swieta_Na_Starowce
 * @subpackage Swieta_Na_Starowce/public/css
 */


@import url('page/utilities/region.css');
@import url('page/compositions/cluster.css');
@import url('page/compositions/flow.css');
@import url('page/compositions/grid.css');
@import url('page/compositions/repel.css');
@import url('page/compositions/sidebar.css');
@import url('page/compositions/switcher.css');
@import url('page/compositions/wrapper.css');
@import url('page/global/reset.css');
@import url('page/global/fonts.css');
@import url('page/global/global-styles.css');
@import url('page/global/variables.css');
@import url('page/blocks/button.css');
@import url('page/blocks/map.css');
@import url('page/blocks/swstrc.css');
@import url('page/blocks/checkout-blocks.css');
@import url('page/blocks/popup.css');
@import url('cf7-woocommerce-style.css');

:root {
    --swstrc-color-available: #5cb85c;
    --swstrc-color-in-cart: #f0ad4e;
    --region-space: var(--space-xl-2xl);
    --gutter: var(--space-s-m);
    --swstrc-color-reserved: #d9534f;
    --space-xl-2xl: clamp(3.375rem, 1.9304rem + 7.2231vw, 9rem);
    --space-s-m: clamp(1.125rem, .5472rem + 2.8892vw, 3.375rem);
}

.swstrc-map-container {
    overflow: hidden;
    position: relative;
    height: clamp(25rem, 4.661rem + 42.3729vw, 37.5rem);
    width: 100%;
}

.swstrc-map-elements {
    width: 100%;
    height: 100%;
    display: flex;
    background: #f8f9fa;
}

.swstrc-map-elements svg {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 600px;
    display: block;
    preserveAspectRatio: xMidYMid meet;
}

/* Responsive SVG sizing */
@media (max-width: 768px) {
    .swstrc-map-elements svg {
        height: 500px;
    }
}

@media (max-width: 480px) {
    .swstrc-map-elements svg {
        height: 400px;
    }
}

.swstrc-element-available circle,
.swstrc-element-available [fill] {
    fill: var(--swstrc-color-available) !important;
    transition: fill 0.2s ease;
}

.swstrc-element-in-cart circle,
.swstrc-element-in-cart [fill] {
    fill: var(--swstrc-color-in-cart) !important;
    transition: fill 0.2s ease;
}

/* Countdown Timer Section */
.swstrc-countdown-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: white;
}

.swstrc-countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.swstrc-countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.swstrc-countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.25);
}

.swstrc-countdown-item h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.swstrc-countdown-item p {
    margin: 10px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
}

/* Compact countdown timer styling within reservation map */
.swstrc-countdown-section .swstrc-countdown-timer {
    background: transparent;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

.swstrc-countdown-section .swstrc-timer-display {
    justify-content: center;
    gap: 8px;
}

.swstrc-countdown-section .swstrc-timer-block {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 50px;
    backdrop-filter: blur(5px);
}

.swstrc-countdown-section .swstrc-timer-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.swstrc-countdown-section .swstrc-timer-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
}

.swstrc-countdown-section .swstrc-timer-separator {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 700;
    animation: swstrc-timer-pulse 1s infinite alternate;
}

/* Responsive design for countdown section */
@media (max-width: 768px) {
    .swstrc-countdown-section {
        padding: 20px 15px;
        margin: 15px 0;
    }

    .swstrc-countdown-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .swstrc-countdown-item {
        padding: 15px 10px;
    }

    .swstrc-countdown-item h3 {
        font-size: 16px;
    }

    .swstrc-countdown-section .swstrc-timer-block {
        padding: 8px 10px;
        min-width: 40px;
    }

    .swstrc-countdown-section .swstrc-timer-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .swstrc-countdown-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .swstrc-countdown-item {
        padding: 12px 8px;
    }

    .swstrc-countdown-item h3 {
        font-size: 14px;
    }
}

.swstrc-element-reserved circle,
.swstrc-element-reserved [fill] {
    fill: var(--swstrc-color-reserved) !important;
    transition: fill 0.2s ease;
}

.swstrc-map-elements g[class*="swstrc-element-"]:hover circle,
.swstrc-map-elements g[class*="swstrc-element-"]:hover [fill],
.swstrc-map-elements g[class*="swstrc-element-"]:focus-visible circle,
.swstrc-map-elements g[class*="swstrc-element-"]:focus-visible [fill] {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.swstrc-map-elements .swstrc-element-available circle,
.swstrc-map-elements .swstrc-element-available text {
    fill: var(--swstrc-color-available) !important;
}

.swstrc-map-elements .swstrc-element-in-cart circle,
.swstrc-map-elements .swstrc-element-in-cart text {
    fill: var(--swstrc-color-in-cart) !important;
}

.swstrc-map-elements .swstrc-element-reserved circle,
.swstrc-map-elements .swstrc-element-reserved text {
    fill: var(--swstrc-color-reserved) !important;
}

.swstrc-map-elements svg g.swstrc-element-available circle,
.swstrc-map-elements svg g.swstrc-element-available text {
    fill: var(--swstrc-color-available) !important;
}

.swstrc-map-elements svg g.swstrc-element-in-cart circle,
.swstrc-map-elements svg g.swstrc-element-in-cart text {
    fill: var(--swstrc-color-in-cart) !important;
}

.swstrc-map-elements svg g.swstrc-element-reserved circle,
.swstrc-map-elements svg g.swstrc-element-reserved text {
    fill: var(--swstrc-color-reserved) !important;
}

/* SVG element styling for dynamically generated SVG */
.swstrc-map-element {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hide ugly SVG text labels */
.swstrc-map-elements text {
    display: none;
    visibility: hidden;
}

.swstrc-map-elements .swstrc-element-available text,
.swstrc-map-elements .swstrc-element-in-cart text,
.swstrc-map-elements .swstrc-element-reserved text {
    display: none;
    visibility: hidden;
}

.swstrc-element-available {
    fill: #2e7d32;
    cursor: pointer;
}

.swstrc-element-reserved {
    fill: #d32f2f;
    cursor: not-allowed;
}

.swstrc-map-element:hover {
    opacity: 0.8;
}

.swstrc-element-available {
    fill: #2e7d32;
}

.swstrc-element-reserved {
    fill: #d32f2f;
}

.swstrc-element-in-cart {
    fill: #ff9800;
    opacity: 0.7;
    pointer-events: none;
    cursor: pointer;
}

.swstrc-element-in-cart.swstrc-processing {
    cursor: wait;
}

.swstrc-element-processing {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

.swstrc-element-disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.swstrc-reservation-page {
    --wp--preset--spacing--60: 0px;
    --wp--style--root--padding-right: 0px;
    --wp--style--root--padding-left: 0px;
    --wp--style--global--content-size: 100%;

    .entry-content {
        margin-block-start: 0px;
    }
}

/* Selection Display Styles */
.map-container__selection-list {
    --flow-space: var(--space-xs);
}

.map-container__selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2xs) 0;
    border-bottom: 1px solid var(--color-mid, #e0e0e0);
}

.map-container__selection-info {
    display: flex;
    align-items: center;
    gap: var(--space-3xs);
}

.map-container__checkout-actions {
    padding-block: var(--space-2xs) 0;
}

.map-container__selection-legend {
    flex-shrink: 0;
    display: inline-flex;
}

.map-container__selection-details {
    display: flex;
    align-items: center;
    gap: var(--space-3xs);
    flex-wrap: wrap;
}

.map-container__selection-id {
    font-weight: var(--font-medium, 500);
    color: var(--color-dark, #333);
}

.map-container__selection-price {
    font-weight: var(--font-bold, 600);
    white-space: nowrap;
}

.map-container__selection-empty {
    text-align: center;
    color: var(--color-mid, #666);
    font-style: italic;
    padding: var(--space-s) 0;
}

#swstrc-mobile-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Better visibility for map points on mobile */
@media (max-width: 768px) {
    .swstrc-map-elements circle {
        stroke-width: 3px !important;
        opacity: 0.8 !important;
    }

    .swstrc-map-elements text {
        font-size: 12px !important;
        font-weight: bold !important;
        opacity: 1 !important;
    }

    .swstrc-element-available circle {
        fill: #5cb85c !important;
        opacity: 0.9 !important;
    }

    .swstrc-element-reserved circle {
        fill: #d9534f !important;
        opacity: 0.9 !important;
    }

    .swstrc-element-in-cart circle {
        fill: #f0ad4e !important;
        opacity: 0.9 !important;
    }
}

/* Even better visibility for touch devices */
@media (hover: none) and (pointer: coarse) {
    .swstrc-map-elements circle {
        stroke-width: 4px !important;
        opacity: 0.85 !important;
        cursor: pointer !important;
    }

    .swstrc-map-elements text {
        font-size: 14px !important;
        font-weight: bold !important;
        opacity: 1 !important;
        pointer-events: none;
    }

    .swstrc-element-available circle {
        fill: #5cb85c !important;
        opacity: 0.95 !important;
    }

    .swstrc-element-reserved circle {
        fill: #d9534f !important;
        opacity: 0.95 !important;
    }

    .swstrc-element-in-cart circle {
        fill: #f0ad4e !important;
        opacity: 0.95 !important;
    }
}

.swstrc-map-elements svg g[data-transparent="true"] {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.swstrc-map-elements svg g[data-transparent="true"]:hover {
    opacity: 0.6;
}