/**
 * SVG Image Cutter - Styles
 */

/* Regular SVG Image Cutter - inline styles in render override everything */
/* These are fallback styles only */
.custom-svg-image-cutter {
    position: relative;
    display: block;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
}

.svg-cutter-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0 auto;
    vertical-align: middle;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}

.svg-cutter-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: white !important;
    z-index: 10;
}

.svg-cutter-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #3b3b3b;
    border-top-color: #636363;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error message styling */
.custom-wpbakery-acf-error {
    padding: 20px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 20px 0;
}

.custom-wpbakery-acf-error p {
    margin: 0;
    color: #333;
}

/* Featured Image SVG Cutter - Always 60vh height */
.custom-featured-image-svg-cutter {
    position: relative;
    display: block;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
}

.custom-featured-image-svg-cutter .svg-cutter-container {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
}

.custom-featured-image-svg-cutter .svg-cutter-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0 auto;
    vertical-align: middle;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
    /* Ensure smooth, high-quality rendering */
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}

.custom-featured-image-svg-cutter .svg-cutter-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(243, 244, 246, 0.8);
    z-index: 10;
}

/* Featured Image Color Picker Fields - Fixed Size Square Boxes */
.featured-image-color-field {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 30px !important;
    min-height: 30px !important;
}

.featured-image-color-field::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 3px;
}

.featured-image-color-field::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.featured-image-color-field::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-svg-image-cutter,
    .custom-featured-image-svg-cutter {
        min-height: 300px;
    }
}

/**
 * Event Block - Styles
 */

.event-block {
    position: relative;
    width: 100%;
    margin: 20px 0;
    padding: 0;
}

.event-block__date-time {
    position: absolute;
    top: 0;
    left: -42%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1;
}

.event-block__date {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    color: #000;
    font-family: sans-serif;
    white-space: nowrap;
    margin-bottom: 0;
}

.event-block__time {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    color: #000;
    font-family: sans-serif;
    white-space: nowrap;
}

.event-block__content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-block__title {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    color: #000;
    margin: 0;
    padding: 0;
    padding-right: 200px;
    font-family: sans-serif;
}

.event-block__description {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.event-block__desc-left,
.event-block__desc-right {
    display: block;
    font-size: 1.25rem;
    line-height: 1.6;
    color: #000;
    font-family: sans-serif;
    min-width: 0;
}

.event-block__desc-left:empty,
.event-block__desc-right:empty {
    display: block;
}

.event-block__desc-left p,
.event-block__desc-right p {
    margin: 0 0 1em 0;
}

.event-block__desc-left p:last-child,
.event-block__desc-right p:last-child {
    margin-bottom: 0;
}

/* Responsive: date-time left offset by viewport width */
@media (min-width: 1024px) and (max-width: 1279px) {
    .event-block__date-time {
        left: -45%;
    }
}

@media (min-width: 1280px) and (max-width: 1439px) {
    .event-block__date-time {
        left: -37%;
    }
}

@media (min-width: 1440px) and (max-width: 1599px) {
    .event-block__date-time {
        left: -32%;
    }
}

@media (min-width: 1600px) {
    .event-block__date-time {
        left: -25%;
    }
}

/* Responsive: Stack vertically on mobile/tablet */
@media (max-width: 991px) {
    .event-block {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .event-block__date-time {
        position: static;
        left: auto;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .event-block__description {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .event-block__title {
        font-size: 2.5rem;
        font-weight: 700;
        max-width: 100%;
        padding-right: 0;
    }

    .event-block__date,
    .event-block__time {
        font-size: 2.5rem;
    }
}
