:root {
    /* Light Theme Palette */
    --primary-bg: #f5f5f7;
    --text-color: #1d1d1f;
    --text-on-dark: #ffffff;
    --accent-color: #ff2d55;
    --accent-secondary: #007aff;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --font-main: 'Montserrat', sans-serif;
    --font-heading: 'Oswald', sans-serif;
    --radius-lg: 30px;
    --radius-md: 20px;
}

#sc-calendar-root {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.5;
    background-color: transparent;
    text-align: left;
}

#sc-calendar-root * {
    box-sizing: border-box;
    font-family: 'Montserrat';
}

/* Scoped Styles */

#sc-calendar-root .finished-event {
    opacity: 0.6;
}

#sc-calendar-root .finished-badge {
    display: inline-block;
    background: #5e5e5e;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 700;
}

#sc-calendar-root .cancelled-badge {
    display: inline-block;
    background: #ffdddd;
    color: #c0392b;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 700;
}

#sc-calendar-root .info-badge-gradient {
    border: 1.5px solid #ff6363d1;
    color: #444;
    padding: 1px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
}

.sc-reg-closed {
    display: inline-block;
    border: 1px solid #ff2d55;
    color: #ff2d55;
    padding: 1px 11px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 10px;
    vertical-align: middle;
    text-transform: lowercase;
    font-weight: 600;
    white-space: nowrap;
}

.sc-live-badge {
    display: inline-block;
    background: #ff2d55;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    animation: sc-live-pulse 1.5s infinite ease-in-out;
    box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.4);
}

@keyframes sc-live-pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.6);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 45, 85, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 45, 85, 0);
    }
}

#sc-calendar-root .cancelled-event {
    opacity: 0.5;
}

#sc-calendar-root .btn-add-small {
    background: linear-gradient(41deg, #7a5d78, #835831);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(24, 24, 24, 0.16);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#sc-calendar-root .btn-add-small:hover {
    background: linear-gradient(41deg, #6f556e, #7a522f);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(24, 24, 24, 0.22);
}

#sc-calendar-root a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

#sc-calendar-root .btn-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f7;
    color: #333;
    transition: all 0.2s;
}

#sc-calendar-root .event-row:hover .btn-icon {
    background: var(--accent-color);
    color: #fff;
}

#sc-calendar-root .btn-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

#sc-calendar-root .empty-dash {
    color: #ccc;
    font-size: 20px;
}

#sc-calendar-root .events-section {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

#sc-calendar-root .filters-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 25px;
}

#sc-calendar-root .filters-row-toggles {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

#sc-calendar-root .filters-row-toggles .filters-row-completed {
    margin-top: 0;
}

#sc-calendar-root .filter-complete {
    margin-left: 15px;
}

#sc-calendar-root .special-events-panel {
    margin-left: auto;
    box-shadow: 0 0px 10px rgb(0 0 0 / 23%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

#sc-calendar-root .filters-row-special {
    margin-left: 0;
    padding: 10px 16px;
}

#sc-calendar-root .filters-bar .btn-add-small {
    margin-left: auto;
}

#sc-calendar-root .season-toggles {
    display: flex;
    gap: 5px;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 12px;
}

#sc-calendar-root .filter-btn {
    border: none;
    background: transparent;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

#sc-calendar-root .filter-btn:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}

#sc-calendar-root .filter-btn.active {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#sc-calendar-root select.city-select {
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
    font-family: var(--font-main);
}

#sc-calendar-root .table-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #eee;
}

#sc-calendar-root .table-header {
    display: flex;
    background: #f9f9f9;
    padding: 18px 25px;
    font-weight: 600;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #eee;
}

#sc-calendar-root .event-row {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 14px 25px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

#sc-calendar-root .event-row:last-child {
    border-bottom: none;
}

#sc-calendar-root .event-row:hover {
    background: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 2;
}
#sc-calendar-root .pro-event:hover {
        background: linear-gradient(90deg, #ffffef, #fdf3ce, #ffe0ca)!important;
}

#sc-calendar-root .event-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

#sc-calendar-root .event-row[data-season="winter"]::before {
    background: #00bbd439;
}

#sc-calendar-root .event-row[data-season="spring"]::before {
    background: #8bc34a39;
}

#sc-calendar-root .event-row[data-season="summer"]::before {
    background: #ffeb3b56;
}

#sc-calendar-root .event-row[data-season="autumn"]::before {
    background: #ff990046;
}

/* Month Separator */
#sc-calendar-root .month-separator {
    width: 100%;
    background-color: #f5f5f5;
    padding: 10px 20px;
    text-align: center;
}

#sc-calendar-root .month-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

#sc-calendar-root .special-events-section {
    margin-bottom: 0;
    padding: 0;
}

#sc-calendar-root .col-date {
    flex: 0 0 130px;
}

#sc-calendar-root .col-info {
    flex: 1;
    padding-right: 20px;
}

#sc-calendar-root .col-media-stack {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#sc-calendar-root .col-badge {
    flex: 0 0 50px;
    text-align: right;
}

@media (min-width: 769px) {
    #sc-calendar-root .event-row .col-media-stack {
        display: contents;
    }

    #sc-calendar-root .event-row .col-date {
        order: 1;
    }

    #sc-calendar-root .event-row .col-thumb {
        order: 2;
        margin: 0 16px 0 8px;
    }

    #sc-calendar-root .event-row .col-info {
        order: 3;
    }

    #sc-calendar-root .event-row .col-badge {
        order: 4;
        margin-left: auto;
        display: flex;
        justify-content: flex-end;
    }
}

#sc-calendar-root .date-main {
    font-weight: 800;
    color:#1d1d1d
    font-size: 15px;
}

#sc-calendar-root .date-sub {
        font-size: 13px;
        color: #888;
}

#sc-calendar-root .date-sub.sc-date-sub-inline {
    display: flex;
    align-items: flex-start;
}

#sc-calendar-root .duration-badge {
    display: inline-block;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 6px;
}

#sc-calendar-root .city-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    margin-bottom: 6px;
    display: block;
}

#sc-calendar-root .col-thumb {
    flex: 0 0 70px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0 5px;
    border-radius: 5px;
    overflow: hidden;
    background: #f9f9f9;
}

#sc-calendar-root .col-thumb img {
    width: 90px;
    height: 100%;
    object-fit: cover;
    transition: filter 0.4s ease;
    filter: grayscale(80%);
}

#sc-calendar-root .event-row:hover .col-thumb img {
    filter: grayscale(0%);
}

#sc-calendar-root .pro-event .col-thumb img,
#sc-calendar-root .pro-event:hover .col-thumb img,
#sc-calendar-root .pro-event.sc-is-centered .col-thumb img {
    filter: grayscale(0%) !important;
}

#sc-calendar-root .age-label {
    font-weight: 600;
    font-size: 11px;
    color: #fffdfd;
    background: linear-gradient(45deg, #ff5a3aab 0%, #ff348ead 100%);
    border: 1.5px solid #00000000;
    padding: 1px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    line-height: 1.35;
    white-space: nowrap;
    transition: filter 0.4s ease;
    filter: grayscale(40%);
}

#sc-calendar-root .event-row:hover .age-label {
    filter: grayscale(0%);
}

#sc-calendar-root .plus-event .age-label,
#sc-calendar-root .plus-event:hover .age-label,
#sc-calendar-root .plus-event.sc-is-centered .age-label,
#sc-calendar-root .pro-event .age-label,
#sc-calendar-root .pro-event:hover .age-label,
#sc-calendar-root .pro-event.sc-is-centered .age-label {
    filter: grayscale(0%) !important;
}

#sc-calendar-root .event-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 1.4;
}

#sc-calendar-root .title-bold,
#sc-calendar-root .title-bold-all {
    font-weight: 800;
    background-clip: text;
}

.naming-post {
    font-weight: 800;
    background: linear-gradient(110deg, #bb66ce, #e67151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.4rem;
}

#sc-calendar-root .btn-doc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #000;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 18px;
}

#sc-calendar-root .btn-doc:hover {
    background: #000;
    color: #fff;
}

/* Form Styles */
#sc-calendar-root .form-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

#sc-calendar-root .form-group {
    margin-bottom: 20px;
}

#sc-calendar-root .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

#sc-calendar-root .form-group input,
#sc-calendar-root .form-group textarea,
#sc-calendar-root .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    font-family: var(--font-main);
}

#sc-calendar-root .form-group input:focus,
#sc-calendar-root .form-group textarea:focus,
#sc-calendar-root .form-group select:focus {
    outline: none;
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

#sc-calendar-root textarea#modalEventTitle {
    height: 100px !important;
    min-height: 100px;
}

#sc-calendar-root textarea#modalInternalComments {
    height: 100px !important;
    min-height: 100px;
}

#sc-calendar-root .form-row {
    display: flex;
    gap: 20px;
}

#sc-calendar-root .form-row .form-group {
    flex: 1;
}

#sc-calendar-root .btn-primary {
    background: #000;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
}

#sc-calendar-root .btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* File Upload */
#sc-calendar-root .file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

#sc-calendar-root .file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

#sc-calendar-root .file-upload-btn {
    display: block;
    background: #e1e1e1;
    color: #333;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

#sc-calendar-root .file-input:hover+.file-upload-btn {
    background: #d4d4d4;
}

#sc-calendar-root .file-name {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Remove File Button - Minimalist Style */
#sc-calendar-root .remove-file-btn {
    position: absolute;
    right: 8px;
    top: 85%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
    font-weight: 300;
}

#sc-calendar-root .remove-file-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

#sc-calendar-root .remove-file-btn:active {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(0.95);
}

#sc-calendar-root .consent-group {
    margin-top: 20px;
    margin-bottom: 20px;
}

#sc-calendar-root .consent-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 400 !important;
    color: #666 !important;
    line-height: 1.5;
}

#sc-calendar-root .consent-label input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

#sc-calendar-root .consent-text {
    font-size: 13px;
}

#sc-calendar-root .consent-text a {
    color: var(--accent-secondary);
    text-decoration: underline;
    font-weight: 600;
}

#sc-calendar-root .consent-text a:hover {
    color: var(--accent-color);
}


/* Modal Styles */
/* Note: Modals are strictly direct children of wrapper in template, so this works. 
   If mounted to body by JS, it might lose scope. 
   Our valid structure shows modal inside #sc-calendar-root. */

#sc-calendar-root .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#sc-calendar-root .modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

#sc-calendar-root .modal-content {
    background: #f5f5f5;
    width: 95%;
    max-width: 1000px;
    height: auto;
    max-height: 95vh;
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

#sc-calendar-root .modal-overlay.active .modal-content {
    transform: translateY(0);
}

#sc-calendar-root .modal-header {
    padding: 15px 25px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#sc-calendar-root .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

#sc-calendar-root .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

#sc-calendar-root .modal-close:hover {
    color: #000;
}

#sc-calendar-root .modal-body {
    padding: 0;
    background: #f0f0f0;
    flex: 1;
    overflow-y: auto;
    /* Allow scrolling content */
    position: relative;
    max-height: calc(95vh - 70px);
    /* header approx height */
}

/* ... */

/* Filters Group */
#sc-calendar-root .filters-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

#sc-calendar-root select.city-select {
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
    width: auto;
    /* Prevent full width */
    max-width: 100%;
    font-family: var(--font-main);
    appearance: none;
    /* Normalize */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

#sc-calendar-root iframe#pdfFrame {
    width: 100%;
    height: 100%;
    border: none;
}

#sc-calendar-root .btn-doc.pdf-trigger {
    background: #fff0f0;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

#sc-calendar-root .btn-doc.pdf-trigger:hover {
    background: #d4d4d4;
    color: #fff;
    border-color: #bbbbbb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#sc-calendar-root .loader-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10;
}

#sc-calendar-root .loader {
    width: 48px;
    height: 48px;
    border: 5px solid #f3f3f3;
    border-bottom-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#sc-calendar-root .success-modal .modal-content {
    height: auto;
    max-width: 500px;
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 32px;
}

/* Success Animation */
.success-animation {
    margin: 0 auto 30px;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 50%;
    margin: 0 auto;
    background-color: #f8fcf9;
    border: 4px solid #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: circle-pulse 2s infinite ease-in-out;
}

.checkmark {
    width: 50px;
    height: 25px;
    border-left: 6px solid #4CAF50;
    border-bottom: 6px solid #4CAF50;
    transform: rotate(-45deg);
    margin-top: 25px;
}

.checkmark.draw {
    animation: checkmark-draw 0.8s ease forwards;
    transform-origin: left top;
    opacity: 0;
}

@keyframes checkmark-draw {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }

    50% {
        width: 50px;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 50px;
        height: 25px;
        opacity: 1;
    }
}

@keyframes circle-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

#sc-calendar-root .success-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

#sc-calendar-root .success-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Event Row - Col Flag Specific */
#sc-calendar-root .col-flag img {
    width: 25px;
    /* Updated for consistency */
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Lightbox support for content images */
.sc-additional-info-content img {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.sc-additional-info-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sc-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sc-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sc-lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.sc-lightbox-overlay.active img {
    transform: scale(1);
}

.sc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

#sc-calendar-root .event-location {
    font-size: 13px;
    font-weight: 600;
    color: #2b2b2b;
    text-transform: capitalize;
    margin-bottom: 4px;
}

#sc-calendar-root .event-location.sc-event-location-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.sc-country-flag {
    margin-right: 4px;
    border-radius: 3px !important;
    width: 25px !important;
    height: auto !important;
    max-width: none;
}

#sc-calendar-root .sc-country-name {
    margin-right: 4px;
}

#sc-calendar-root .sc-ongoing-gif-desktop {
    width: 25px !important;
    height: 25px !important;
    margin-left: 6px;
    vertical-align: middle;
    border-radius: 30px;
    object-fit: cover;
}

#sc-calendar-root .date-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#sc-calendar-root .sc-ongoing-gif-mobile {
    display: none;
    width: 25px !important;
    height: 25px !important;
    border-radius: 30px;
    vertical-align: middle;
    flex: 0 0 auto;
    object-fit: cover;
}

#sc-calendar-root .sc-badge {
    margin-top: 4px;
}

#sc-calendar-root .col-badge .sc-badge {
    margin-top: 0;
}

#sc-calendar-root .sc-fig-badge-table {
    height: 50px;
    width: auto;
    max-width: 90px;
    border-radius: 4px;
    object-fit: contain;
    display: block;
    margin-left: auto;
    vertical-align: top;
}

#sc-calendar-root .sc-fig-badge-mobile-inline {
    display: none;
}

@media (max-width: 768px) {
    #sc-calendar-root {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    #sc-calendar-root .sc-fig-badge-table {
    height: 37px;
    max-width: 80px;
    }
    #sc-calendar-root .title-bold,
    #sc-calendar-root .title-bold-all {
    font-size: 14px;
}
    .naming-post {
    font-size: 1.6rem;
    }
    #sc-calendar-root .events-section {
        padding: 20px 15px;
    }
    #sc-calendar-root .date-sub {
        font-size: 12px;
        color: #888;
        margin-top: -10px;
        display: none !important;
}

    #sc-calendar-root .sc-ongoing-gif-mobile {
        display: inline-block;
    }

    #sc-calendar-root .sc-ongoing-gif-desktop {
        display: none !important;
    }

    #sc-calendar-root .sc-badge {
        display: block;
    }

    #sc-calendar-root .sc-fig-badge-mobile-inline {
        display: none;
    }

    #sc-calendar-root .special-event-duplicate {
        margin-bottom: 10px;
    }

    #sc-calendar-root .special-events-section .event-row.pro-event {
        margin-top: 0px;
        border-radius: 0px;
        border-top: 1px solid #e2b578b8;
        box-shadow: none !important;
    }

    #sc-calendar-root .plus-event .title-bold-all,
    #sc-calendar-root .plus-event .title-bold,
    #sc-calendar-root .pro-event .title-bold-all,
    #sc-calendar-root .pro-event .title-bold {
        font-size: 16px!important;
    }

    #sc-calendar-root .form-row {
        display: block;
    }

    #sc-calendar-root .table-container {
        background: transparent;
        box-shadow: none;
        border: none;
        border-radius: 12px;
    }

    #sc-calendar-root .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
    }

    #sc-calendar-root .season-toggles {
        order: -10;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: visible;
        margin-bottom: 5px;
        white-space: normal;
        background: transparent;
        padding: 0;
        margin-top: 0;
    }

    #sc-calendar-root .season-toggles .filter-btn {
        flex: 0 0 auto;
        min-width: 0;
        text-align: center;
        padding: 8px 12px;
        font-size: 14px;
        margin: 0;
    }

    #sc-calendar-root select.city-select {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        height: 44px;
    }

    #sc-calendar-root .filters-bar>div:not(.season-toggles) {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    /* Keep toggle content in row on mobile */
    #sc-calendar-root .filters-row-toggles .filters-row-completed {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }

    #sc-calendar-root .filters-row-completed {
        margin-top: 7px;
    }

  

    #sc-calendar-root .filters-row-toggles {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        max-width: 100%;
    }

    #sc-calendar-root .sc-toggle-wrapper {
        max-width: 100%;
    }

    #sc-calendar-root .sc-toggle-label {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #sc-calendar-root .special-events-panel {
        margin-left: 0;
        max-width: 100%;
    }

    #sc-calendar-root .filters-bar .btn-add-small {
        margin-left: 0;
        width: 100%;
        margin-top: 5px;
    }

    #sc-calendar-root .table-header {
        display: none;
    }

    #sc-calendar-root .event-row {
        align-items: flex-start;
        overflow: hidden;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "date media"
            "info media";
        padding: 7px 10px;
        position: relative;
        margin-bottom: 0px;
        margin-top: 10px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
        background: #fff;
    }

    #sc-calendar-root .event-row:last-child {
        border-bottom: 1px solid #eee;
    }

    #sc-calendar-root .col-date {
        grid-area: date;
        flex: 1 1 auto;
        width: auto;
        margin-bottom: 0;
        flex-direction: column;
        display: flex;
        gap: 7px;
        padding-bottom: 0;
        min-width: 0;
    }

    #sc-calendar-root .date-main {
        font-size: 14px;
        font-weight: 700;
    }

    #sc-calendar-root .duration-badge {
        display: none;
    }

    #sc-calendar-root .info-badge-gradient {
        display: none !important;
    }

    #sc-calendar-root .col-flag {
        position: static;
        flex: 0 0 40px;
        min-width: 40px;
        display: flex;
        align-items: flex-start;
        padding-top: 4px;
        order: 2;
        height: auto;
        padding-right: 0;
        margin-right: 10px;
        z-index: 5;
    }

    #sc-calendar-root .col-flag img {
        width: 24px;
        height: auto;
        border-radius: 4px;
        display: block;
    }

    #sc-calendar-root .col-info {
        grid-area: info;
        flex: 1 1 auto;
        width: auto;
        padding-left: 0;
        padding-right: 0px;
        /* Make space for right-aligned elements */
        margin-top: 6px;
        min-width: 0;
    }

    #sc-calendar-root .event-location {
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        color: #2b2b2b;
    }

    #sc-calendar-root .event-title {
        font-size: 13px;
        line-height: 1.3;
        font-weight: 500;
        padding-right: 5px;
    }

    #sc-calendar-root .col-media-stack {
        grid-area: media;
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        align-self: stretch;
    }

    #sc-calendar-root .col-badge {
        position: static;
        width: auto;
        padding: 0;
        margin-bottom: 6px;
        display: flex;
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    #sc-calendar-root .col-badge:empty {
        margin-bottom: 0;
    }

    #sc-calendar-root .btn-icon {
        background: #f5f5f5;
        border-radius: 20%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: -5px;
        margin-top: -10px;
    }

    #sc-calendar-root .col-thumb {
        order: initial;
        flex: 0 0 70px;
        width: 70px;
        border-radius: 5px;
        align-self: auto;
        margin: 0;
        background: transparent;
        /* No gray bg on mobile */
    }

    /* Hide empty thumb on mobile */
    #sc-calendar-root .col-thumb:empty {
        display: none;
    }

    #sc-calendar-root .col-thumb img {
        filter: grayscale(85%);
        /* Maintain grayscale on mobile too */
    }

    #sc-calendar-root .event-row:hover .col-thumb img,
    #sc-calendar-root .event-row.sc-is-centered .col-thumb img {
        filter: grayscale(0%);
    }

    #sc-calendar-root .event-row:hover .age-label,
    #sc-calendar-root .event-row.sc-is-centered .age-label {
        filter: grayscale(0%);
    }

    #sc-calendar-root .age-label {
        font-size: 10px;
        padding: 2px 8px;
        margin-left: 6px;
    }

    #sc-calendar-root .finished-badge {
        display: inline-block;
        margin-left: 0;
        margin-top: 8px;
        font-size: 11px;
    }
}

#sc-calendar-root .btn-add-mini {
    background: #000;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    line-height: 1;
}

#sc-calendar-root .btn-add-mini:hover {
    background: #333;
    transform: scale(1.1);
}

#sc-calendar-root .form-modal-content {
    max-width: 600px !important;
    padding: 30px;
    height: auto !important;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#sc-calendar-root .close-modal {
    position: absolute;
    top: 0px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

#sc-calendar-root .close-modal:hover {
    color: #000;
}

/* iOS/mobile stability for Add Event modal */
#sc-calendar-root #addEventModal {
    width: 100vw;
    min-height: 100vh;
    height: 100dvh;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#sc-calendar-root #addEventModal .form-modal-content {
    width: 100%;
    max-height: calc(100dvh - 24px);
}

#sc-calendar-root #addEventModal #addEventFormModal,
#sc-calendar-root #addEventModal #addEventFormModal .form-row,
#sc-calendar-root #addEventModal #addEventFormModal .form-group {
    min-width: 0;
    max-width: 100%;
}

#sc-calendar-root #addEventModal #addEventFormModal input,
#sc-calendar-root #addEventModal #addEventFormModal textarea,
#sc-calendar-root #addEventModal #addEventFormModal select,
#sc-calendar-root #addEventModal #addEventFormModal .sc-select-trigger,
#sc-calendar-root #addEventModal #addEventFormModal .sc-dropdown-search {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 768px) {
    #sc-calendar-root #addEventModal {
        align-items: flex-start;
        padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
        padding-right: 10px;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        padding-left: 10px;
    }

    #sc-calendar-root #addEventModal .form-modal-content {
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 18px);
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        border-radius: 14px;
        margin: 0 auto;
    }

    /* Keep all two-column rows strictly stacked in Safari mobile */
    #sc-calendar-root #addEventModal #addEventFormModal .form-row {
        display: block !important;
        width: 100%;
    }

    #sc-calendar-root #addEventModal #addEventFormModal .form-row>.form-group {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        flex: none !important;
    }

    /* Explicit fix for "Регистрация участников до" field and flatpickr mobile clone */
    #sc-calendar-root #addEventModal #modalRegEndDate,
    #sc-calendar-root #addEventModal input[name="reg_end_date"],
    #sc-calendar-root #addEventModal .flatpickr-mobile {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
    }
}

@supports (-webkit-touch-callout: none) {
    #sc-calendar-root #addEventModal #addEventFormModal input,
    #sc-calendar-root #addEventModal #addEventFormModal textarea,
    #sc-calendar-root #addEventModal #addEventFormModal select,
    #sc-calendar-root #addEventModal #addEventFormModal .sc-select-trigger,
    #sc-calendar-root #addEventModal #addEventFormModal .sc-dropdown-search {
        font-size: 16px;
    }
}

/* Featured Event Styles */
#sc-calendar-root .featured-event {
    background: #fffcf0;
    border: 1px solid #e6c86e;
    box-shadow: 0 4px 15px rgba(230, 200, 110, 0.2);
}

#sc-calendar-root .featured-event:hover {
    background: #fff9e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 200, 110, 0.3);
}

/* Plus Event Styles */
#sc-calendar-root .plus-event .title-bold-all,
#sc-calendar-root .plus-event .title-bold {
    display: table;
    background: linear-gradient(100deg, #a33eb9, #cf5b3b) !important;
    -webkit-text-fill-color: transparent !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    font-size: 18px;
    margin-top: 2px;
}

#sc-calendar-root .plus-event .date-main,
#sc-calendar-root .pro-event .date-main {
    background: linear-gradient(250deg, #781e8c, #bc4e18, #802810) !important;
    -webkit-text-fill-color: transparent !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Pro Event Styles */
#sc-calendar-root .pro-event .title-bold-all,
#sc-calendar-root .pro-event .title-bold {
    display: table;
    background: linear-gradient(100deg, #a33eb9, #cf5b3b) !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 18px;
    margin-top: 2px;
}
#sc-calendar-root .pro-event {
    background: linear-gradient(90deg, #ffffef, #fffbec, #ffd5b7);
}
div#specialEventsToggleRow {
    background: linear-gradient(90deg, #ffffef, #fffbec, #ffd5b7);
}
#sc-calendar-root .icon-star {
    color: #ffd700;
    font-size: 16px;
    margin-left: 5px;
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Event Info Label */
#sc-calendar-root .event-info-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    border: 1px solid #e0e0e0;
}

/* Стили для десктопов */
@media (min-width: 992px) {
    #sc-calendar-root .filters-row-toggles {
        flex-wrap: wrap;
        align-items: center;
    }

    #sc-calendar-root .special-events-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    /* Настраиваем нижний ряд: фильтры слева, кнопка справа */
    #sc-calendar-root .filters-row-bottom {
        display: flex;
        justify-content: space-between;
        /* Разносит элементы по краям */
        align-items: center;
        /* Выравнивает их по вертикальному центру */
        width: 100%;
        margin-top: 20px;
        /* Отступ от сезонов, если нужно */
    }

    /* Убедимся, что сами фильтры стоят в ряд */
    #sc-calendar-root .filters-group {
        display: flex;
        gap: 10px;
        /* Расстояние между селектами */
    }

    /* Сбрасываем огромный margin-left, если он остался от старой верстки */
    #sc-calendar-root .btn-add-small {
        margin-left: 0 !important;
        white-space: nowrap;
        /* Чтобы текст кнопки не переносился */
    }
}

/* Для мобильных (до 992px) можно оставить столбиком */
@media (max-width: 991px) {
    #sc-calendar-root .filters-row-bottom {
        display: flex;
        gap: 15px;
    }

    #sc-calendar-root .filters-group {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* --- Custom Country Dropdown --- */
.sc-custom-select {
    position: relative;
    width: 100%;
}

.sc-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 15px;
    color: #333;
    transition: all 0.3s;
    font-family: var(--font-main);
}

.sc-select-trigger:hover {
    border-color: #bbb;
}

.sc-select-trigger:focus,
.sc-select-trigger.active {
    border-color: #000;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.sc-select-value {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-select-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s;
}

.sc-select-trigger.active .sc-select-arrow {
    transform: rotate(180deg);
}

.sc-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

.sc-select-dropdown.active {
    display: block;
}

.sc-search-wrapper {
    padding: 8px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    position: sticky;
    top: 0;
}

.sc-dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: var(--font-main);
}

.sc-dropdown-search:focus {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.sc-select-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sc-option-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background 0.1s;
}

.sc-option-item:hover,
.sc-option-item.selected {
    background-color: #f3f4f6;
}

.sc-option-item img {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Toggle Switch Styling --- */
.sc-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    user-select: none;
}

.sc-toggle-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.sc-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-right: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sc-toggle-switch::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sc-toggle-wrapper input:checked+.sc-toggle-switch {
    background-color: #ff2d55;
    /* Accent color */
}

.sc-toggle-wrapper input:checked+.sc-toggle-switch::before {
    transform: translateX(20px);
}

.sc-toggle-wrapper:hover .sc-toggle-switch {
    background-color: #b3b3b3;
}

.sc-toggle-wrapper:hover input:checked+.sc-toggle-switch {
    background-color: #ff5e7d;
}

/* Animations active state pulse */
.sc-toggle-wrapper input:active+.sc-toggle-switch::before {
    width: 24px;
}

/* 
 * Auto-Created Post Styles 
 * Used for single post view of events created by the plugin
 */
.sc-post-header {
    padding: 10px;
    margin-bottom: 30px;
}

.sc-post-header.has-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.sc-post-header-content {
    flex: 1;
    min-width: 300px;
}

.sc-post-banner-col {
    flex: 0 0 30%;
    max-width: 30%;
}

@media (min-width: 992px) {
    .sc-post-banner-col {
        position: sticky;
        top: 110px;
        align-self: flex-start;
    }
}

.sc-post-banner-col img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
    display: block;
}

.sc-post-banner-col img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@media (max-width: 991px) {
    .sc-post-header.has-banner {
        flex-direction: column;
    }

    /* Flatten .sc-post-header-content so its children become direct flex items */
    .sc-post-header-content {
        display: contents;
    }

    /* 1. Banner image first */
    .sc-post-banner-col {
        order: 1;
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    /* 2. Title after the banner */
    .sc-post-title {
        order: 2;
    }

    /* 3. Everything else from header content (subtitle, details, etc.) */
    .sc-post-subtitle,
    .sc-details-grid,
    .sc-post-header-content>*:not(.sc-post-title):not(.sc-post-subtitle):not(.sc-details-grid) {
        order: 3;
    }

    /* 4. Discussion button last */
    .sc-discussion-container {
        order: 4;
        width: 100%;
    }
}

.sc-post-title {
    margin-top: 0;
    color: #1c1c1e;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 25px;
    font-family: var(--font-main);
    /* Premium feel with Inter */
}

/* Unified iOS 16 Glassmorphism Details Card */
.sc-details-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: rgb(0 0 0 / 2%);
    /* Separator line color */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    margin: 25px 0;
}

.sc-detail-item {
    display: flex;
    align-items: center;
    background: rgb(255 255 255 / 43%);
    /* Item background */
    padding: 20px 24px;
    transition: background 0.2s ease;
    flex: 1 1 280px;
    /* Stretch to fill, but aim for ~280px min */
}

@media (max-width: 768px) {
    .sc-detail-item {
        padding: 15px 10px;
    }
}

.sc-detail-item:hover {
    background: rgba(255, 255, 255, 0.85);
}

.sc-post-header.has-banner {
    gap: 10px;
}

.sc-icon {
    width: 38px;
    height: 38px;
    margin-right: 18px;
    color: #ff2d55;
    flex-shrink: 0;
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.sc-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8e8e93;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.sc-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1c1c1e;
    line-height: 1.3;
}

.sc-value img:not(.sc-fig-badge-detail) {
    width: 25px !important;
    max-width: 25px !important;
    height: auto !important;
    margin-right: 8px;
    border-radius: 2px;
}

.sc-fig-badge-item {
    align-items: center;
}

.sc-fig-badge-item .sc-value {
    display: flex;
    align-items: center;
}

.sc-fig-badge-item .sc-value img.sc-fig-badge-detail {
    width: auto !important;
    max-width: 140px !important;
    height: auto !important;
    margin-right: 0 !important;
    max-height: 50px;
    border-radius: 2px!important;
    object-fit: contain;
}

.sc-days-count {
    font-size: 0.85rem;
    color: #8e8e93;
    font-weight: 400;
    margin-left: 6px;
}

.sc-post-subtitle {
    margin-bottom: 0px;
    color: #555;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.sc-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.sc-breadcrumb-item {
    display: flex;
    align-items: center;
}

.sc-subtitle-sport {
    font-weight: 600;
    color: #000;
}

.sc-sport-link {
    font-weight: 600 !important;
    color: black !important;
    text-decoration: none;
}

.sc-sport-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sc-subtitle-type {
    margin-top: 2px;
}

.sc-type-link {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    transition: opacity 0.2s ease;
}

.sc-type-link:hover {
    opacity: 0.85;
}

.sc-type-label {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sc-type-button {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 15px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff !important;
    background: linear-gradient(130deg, #ac55bf, #d97053);
    /* border: 1.5px solid #1f2937; */
    border-radius: 13px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sc-type-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 121, 86, 0.3);
    color: #fff !important;
}

.sc-discussion-container {
    align-items: center;
    margin: -10px 0 30px;
    display: flex;
    justify-content: flex-start;
    flex: 0 0 100%;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
}

.sc-discussion-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(#f8f8f8, #f8f8f8) padding-box, linear-gradient(to right, #fa709a 0%, #fee140 100%) border-box;
    border: 1px solid #0808081c;
    border-radius: 22px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.15, 0.75, 0.5, 1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
    letter-spacing: -0.2px;

    /* Gradient text in site style */
    background-image: linear-gradient(to right, #fa709a 0%, #e49d00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sc-discussion-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgb(177 177 177 / 57%);
    opacity: 0.85;
}

.sc-discussion-btn:active {
    transform: translateY(-1px);
    transition: all 0.1s;
}

.sc-discussion-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    stroke: #fa709a;
    stroke-width: 2.3;
}

.sc-discussion-hint {
    font-size: 14px;
    color: #666;
    margin: 0 0 0 10px;
    line-height: 1.4;
}

/* ==============================
   iOS 26 Countdown Timer (compact)
   ============================== */
.sc-timer-item {
    align-items: center !important;
}

.sc-timer-display {
    flex-direction: column;
    gap: 2px;
}

.sc-timer-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.sc-timer-units {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-wrap: nowrap;
}

.sc-timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 38px;
}

.sc-timer-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c1c1e;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.15;
    font-family: inherit;
}

.sc-timer-lbl {
    font-size: 0.6rem;
    font-weight: 500;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

.sc-timer-sep {
    font-size: 1rem;
    font-weight: 600;
    color: #c7c7cc;
    line-height: 1;
    padding-bottom: 10px;
    user-select: none;
}

.sc-timer-done {
    display: inline-flex;
    align-items: center;
    color: #111;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 20px;
    border-radius: 20px;
    background: linear-gradient(#f8f8f8, #f8f8f8) padding-box, linear-gradient(to right, #fa709a 0%, #fee140 100%) border-box;
    border: 2px solid transparent;
    letter-spacing: -0.2px;
}

.sc-timer-gathering {
    display: inline-flex;
    align-items: center;
    color: #111;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 20px;
    border-radius: 20px;
    background: linear-gradient(#f8f8f8, #f8f8f8) padding-box, linear-gradient(to right, #fa709a 0%, #fee140 100%) border-box;
    border: 2px solid transparent;
    letter-spacing: -0.2px;
}

.sc-gradient-text-link {
    background: linear-gradient(to right, #e05f87 0%, #d39710 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-weight: 700 !important;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.sc-gradient-text-link:hover {
    opacity: 0.7;
}


.sc-pdf-title {
    font-size: 1.5rem;
    text-align: center;
    margin: 40px 0 20px;
    font-weight: 700;
    color: #1c1c1e;
}


/* iOS Style PDF Loader */
.sc-pdf-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    margin: 20px auto;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.sc-ios-spinner {
    width: 36px;
    height: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.9166s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(30 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.8333s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(60 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.75s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(90 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.6666s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(120 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.5833s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(150 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.5s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(180 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.4166s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(210 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.3333s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(240 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.25s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(270 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.1666s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(300 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='-0.0833s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='46' y='10' rx='4' ry='4' width='8' height='20' fill='%238e8e93' transform='rotate(330 50 50)'%3E%3Canimate attributeName='opacity' values='1;0' keyTimes='0;1' dur='1s' begin='0s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.sc-pdf-loader span {
    margin-top: 15px;
    font-size: 14px;
    color: #8e8e93;
    font-weight: 500;
    letter-spacing: -0.2px;
    animation: sc-pdf-pulse-text 2s ease-in-out infinite;
}

@keyframes sc-pdf-pulse-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.sc-pdf-viewer {
    width: 100vw !important;
    height: 100vh !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: none !important;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
    background: #f0f0f0;
}

/* Additional Info Block (Published Post) */
.sc-additional-info {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.sc-additional-info h2 {
    margin: 0 0 15px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1c1c1e;
    letter-spacing: -0.5px;
}

.sc-additional-info-content {
    font-size: 0.9rem;
    color: #353535;
    line-height: 1.6;
}

/* Protect event rich-text blocks from global theme resets. */
.sc-additional-info-content p {
    display: block !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.sc-additional-info-content p + p {
    margin-top: 0.9em !important;
}

.sc-additional-info-content br {
    display: inline !important;
}

.sc-additional-info-content ul,
.sc-additional-info-content ol {
    margin: 0.9em 0 !important;
    padding-left: 1.2em !important;
}

.sc-additional-info-content li {
    margin: 0.25em 0 !important;
}

/* Gender Filter Buttons */
.gender-toggle-group {
    display: flex;
    gap: 10px;
}

.gender-btn-check {
    position: relative;
    cursor: pointer;
    margin: 0;
    user-select: none;
    display: inline-block;
}

.gender-btn-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.btn-visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    /* Thin border */
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #bbb;
    /* Faded text */
    transition: all 0.2s ease;
    background: transparent;
}

/* Hover effect */
.gender-btn-check:hover .btn-visual {
    border-color: #999;
    color: #888;
}

/* Active State - Male */
.gender-btn-check input[value="m"]:checked+.btn-visual.m-btn {
    background-color: #2196F3;
    /* Beautiful Blue */
    border-color: #2196F3;
    color: #fff;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
    transform: scale(1.05);
}

/* Active State - Female */
.gender-btn-check input[value="f"]:checked+.btn-visual.f-btn {
    background-color: #E91E63;
    /* Beautiful Pink */
    border-color: #E91E63;
    color: #fff;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
    transform: scale(1.05);
}

/* Calendar Event Icon Styling */
.gender-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 20%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
}

.gender-icon.m {
    background-color: #56aef4;
}

.gender-icon.f {
    background-color: #f877a3;
}

/* Skeleton Loading Animation */
#sc-calendar-root .skeleton-row {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 20px 25px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    overflow: hidden;
}

#sc-calendar-root .skeleton-block {
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

#sc-calendar-root .skeleton-row .col-date {
    flex: 0 0 160px;
    padding-right: 20px;
}

#sc-calendar-root .skeleton-row .col-info {
    flex: 1;
    padding-right: 20px;
}

#sc-calendar-root .skeleton-date-main {
    width: 100px;
    height: 18px;
    margin-bottom: 8px;
}

#sc-calendar-root .skeleton-date-sub {
    width: 60px;
    height: 14px;
}

#sc-calendar-root .skeleton-location {
    width: 150px;
    height: 14px;
    margin-bottom: 8px;
}

#sc-calendar-root .skeleton-title {
    width: 80%;
    height: 20px;
}

#sc-calendar-root .skeleton-age {
    width: 60px;
    height: 24px;
    margin: 0 auto;
    border-radius: 8px;
}

#sc-calendar-root .loading-status-text {
    text-align: center;
    padding: 20px;
    color: #888;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#sc-calendar-root .loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
    #sc-calendar-root .skeleton-row {
        flex-direction: column;
        padding: 15px;
    }

    #sc-calendar-root .skeleton-row .col-date {
        flex: 0 0 100%;
        margin-bottom: 10px;
        width: 100%;
    }

}


/* --- New Loading Animation Styles --- */

#sc-calendar-root .sc-loader-wrapper {
    padding: 10px 20px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
}

#sc-calendar-root .sc-loading-phrase {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: sc-pulse-text 2s ease-in-out infinite;
}

#sc-calendar-root .sc-loading-dots {
    display: inline-flex;
    gap: 4px;
}

#sc-calendar-root .sc-loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: sc-dot-blink 1.4s infinite both;
}

#sc-calendar-root .sc-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

#sc-calendar-root .sc-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

#sc-calendar-root .sc-skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

#sc-calendar-root .sc-skeleton-row {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 20px 25px;
    gap: 20px;
}

#sc-calendar-root .sc-skeleton-item {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: sc-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

#sc-calendar-root .sc-skel-date {
    width: 100px;
    height: 18px;
}

#sc-calendar-root .sc-skel-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
}

#sc-calendar-root .sc-skel-title {
    flex: 1;
    height: 18px;
}

#sc-calendar-root .sc-skel-thumb {
    width: 60px;
    height: 40px;
    border-radius: 5px;
}

#sc-calendar-root .sc-skel-age {
    width: 80px;
    height: 18px;
}

#sc-calendar-root .sc-skel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

@keyframes sc-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes sc-pulse-text {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.88;
        transform: scale(1.03);
    }
}

@keyframes sc-dot-blink {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

@media (max-width: 768px) {
    #sc-calendar-root .sc-skeleton-row {
        flex-direction: column;
        padding: 15px;
        align-items: flex-start;
        gap: 10px;
    }

    #sc-calendar-root .sc-skel-date {
        width: 50%;
    }

    #sc-calendar-root .sc-skel-age {
        display: none;
    }

    #sc-calendar-root .sc-skel-btn {
        height: 18px;
        width: 36px;
        border-radius: 4px;
    }
}

/* --- End New Loading Animation Styles --- */
/* --- Improved Loading Animation Styles --- */

#sc-calendar-root .sc-loader-wrapper {
    padding: 10px 20px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
}

#sc-calendar-root .sc-loading-phrase {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: sc-pulse-text 2s ease-in-out infinite;
}

#sc-calendar-root .sc-loading-dots {
    display: inline-flex;
    gap: 4px;
}

#sc-calendar-root .sc-loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: sc-dot-blink 1.4s infinite both;
}

#sc-calendar-root .sc-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

#sc-calendar-root .sc-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

#sc-calendar-root .sc-skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #eee;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}

#sc-calendar-root .sc-skeleton-row {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 20px 25px;
    gap: 20px;
}

#sc-calendar-root .sc-skeleton-item {
    background: linear-gradient(90deg, #e5e5e5 25%, #f2f2f2 50%, #e5e5e5 75%);
    background-size: 200% 100%;
    animation: sc-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

#sc-calendar-root .sc-skel-date {
    width: 120px;
    height: 20px;
}

#sc-calendar-root .sc-skel-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
}

#sc-calendar-root .sc-skel-title {
    flex: 1;
    height: 20px;
}

#sc-calendar-root .sc-skel-age {
    width: 80px;
    height: 20px;
}

#sc-calendar-root .sc-skel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

@keyframes sc-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes sc-pulse-text {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

@keyframes sc-dot-blink {

    0%,
    80%,
    100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #sc-calendar-root .sc-skeleton-row {
        flex-direction: column;
        padding: 15px;
        align-items: flex-start;
        gap: 12px;
    }

    #sc-calendar-root .sc-skel-date {
        width: 140px;
    }

    #sc-calendar-root .sc-skel-title {
        width: 100%;
    }

    #sc-calendar-root .sc-skel-age {
        display: none;
    }

    #sc-calendar-root .sc-skel-btn {
        height: 18px;
        width: 36px;
        border-radius: 4px;
    }
}

/* --- End Improved Loading Animation Styles --- */
/* --- Final Loading Animation Styles --- */

#sc-calendar-root .sc-loader-wrapper {
    padding: 10px 20px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
}

#sc-calendar-root .sc-loading-phrase {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1b;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: sc-pulse-text 2s ease-in-out infinite;
}

#sc-calendar-root .sc-loading-dots {
    display: inline-flex;
    gap: 5px;
}

#sc-calendar-root .sc-loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: sc-dot-blink 1.4s infinite both;
}

#sc-calendar-root .sc-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

#sc-calendar-root .sc-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

#sc-calendar-root .sc-skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #ddd;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ddd;
    max-width: 900px;
    margin: 0 auto;
}

#sc-calendar-root .sc-skeleton-row {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 22px 25px;
    gap: 20px;
}

#sc-calendar-root .sc-skeleton-item {
    background: linear-gradient(90deg, #dfdfdf 25%, #ececec 50%, #dfdfdf 75%);
    background-size: 200% 100%;
    animation: sc-skeleton-loading 1.2s infinite linear;
    border-radius: 6px;
    border: 1px solid #eee;
}

#sc-calendar-root .sc-skel-date {
    width: 130px;
    height: 22px;
}

#sc-calendar-root .sc-skel-flag {
    width: 28px;
    height: 20px;
    border-radius: 3px;
}

#sc-calendar-root .sc-skel-title {
    flex: 1;
    height: 22px;
    min-width: 200px;
}

#sc-calendar-root .sc-skel-age {
    width: 90px;
    height: 22px;
}

#sc-calendar-root .sc-skel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 0.6;
}



@media (max-width: 768px) {
    #sc-calendar-root .sc-skeleton-row {
        flex-direction: column;
        padding: 18px;
        align-items: flex-start;
        gap: 12px;
    }

    #sc-calendar-root .sc-skel-date {
        width: 140px;
    }

    #sc-calendar-root .sc-skel-title {
        width: 100%;
        height: 35px;
    }

    #sc-calendar-root .sc-skel-thumb {
        width: 60px;
        height: 40px;
        margin-top: 5px;
    }

    #sc-calendar-root .sc-skel-age {
        display: none;
    }

    #sc-calendar-root .sc-skel-btn {
        height: 20px;
        width: 40px;
        border-radius: 4px;
    }
}

/* --- End Final Loading Animation Styles --- */

/* Validation Styles */
#sc-calendar-root .field-error {
    box-shadow: 0 0 10px 2px rgba(237, 142, 235, 0.4) !important;
    border-color: #ed8eeb !important;
    background: #fffafa !important;
}

#sc-calendar-root .ios-validation-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 10px;
    background: rgba(255, 45, 85, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 8px 15px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    border: 1px solid rgba(255, 45, 85, 0.3);
    box-shadow: 0 8px 32px 0 rgba(255, 45, 85, 0.3);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

@media (max-width: 768px) {
    #sc-calendar-root .ios-validation-tip {
        font-size: 12px;
        padding: 6px 10px;
        left: 5px;
        right: 5px;
        white-space: normal;
        max-width: calc(100% - 10px);
    }
}

#sc-calendar-root .ios-validation-tip.active {
    opacity: 1;
    transform: translateY(0);
}

#sc-calendar-root .ios-validation-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.7);
}

#sc-calendar-root .form-group {
    position: relative;
    /* Ensure tip is positioned relative to group */
}

/* --- Filter Dropdown Specifics --- */
.sc-filter-dropdown {
    width: auto !important;
    /* Override the 100% from .sc-custom-select */
    min-width: 180px;
    /* Reasonable minimum width */
    max-width: 100%;
    /* Allow shrinking on very small screens if needed */
}

.sc-filter-dropdown .sc-select-trigger {
    padding: 8px 12px;
    /* Slightly more compact than the full modal input */
    height: 40px;
    /* Consistent height */
}

/* Ensure mobile stacking works */
@media (max-width: 768px) {
    #sc-calendar-root .filters-bar>.filters-row-bottom {
        flex-direction: row !important;
        align-items: stretch;
        flex-wrap: wrap;
        gap: 10px;
    }

    #sc-calendar-root .filters-row-bottom .filters-group {
        display: contents;
    }

    .sc-filter-dropdown {
        width: 100% !important;
        /* Full width on mobile */
    }

    #sc-calendar-root #countryFilterWrapper.sc-filter-dropdown,
    #sc-calendar-root #cityFilterWrapper.sc-filter-dropdown {
        width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px);
        min-width: 0;
    }

    #sc-calendar-root #ageFilter.city-select {
        width: auto;
        flex: 0 0 auto;
        min-width: max-content;
    }

    #sc-calendar-root .filters-row-bottom .btn-add-small {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        margin-top: 0;
    }

    #sc-calendar-root .filters-row-bottom .sc-reset-filters-btn {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        margin-top: 0;
    }

    #sc-calendar-root .filters-row-bottom.sc-mobile-reset-visible>.btn-add-small {
        display: none !important;
    }

    #sc-calendar-root .filters-row-bottom.sc-mobile-reset-visible .sc-reset-filters-btn {
        display: inline-flex !important;
    }
}

/* --- Reset Filters Button --- */
.sc-reset-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(225deg, #7a5d78, #835831);
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(24, 24, 24, 0.16);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-family: var(--font-main);
    white-space: nowrap;
    justify-content: center;
    text-decoration: none;
}

.sc-reset-filters-btn:hover {
    background: linear-gradient(225deg, #6f556e, #7a522f);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(24, 24, 24, 0.22);
}

.sc-reset-filters-btn .sc-cross-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
}

/* ---------------------------------------------------------
   Masonry Gallery for Results Images
   --------------------------------------------------------- */

.sc-masonry-gallery,
.single-sc_event .sc-additional-info-content .sc-masonry-gallery,
div.sc-masonry-gallery {
    column-count: 4 !important;
    -webkit-column-count: 4 !important;
    -moz-column-count: 4 !important;
    column-gap: 16px !important;
    -webkit-column-gap: 16px !important;
    -moz-column-gap: 16px !important;
    margin: 24px 0 !important;
    display: block !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 1024px) {

    .single-sc_event .sc-masonry-gallery,
    .single-sc_event .sc-additional-info-content .sc-masonry-gallery {
        column-count: 3 !important;
        -webkit-column-count: 3 !important;
        -moz-column-count: 3 !important;
    }
}

@media (max-width: 768px) {

    .sc-masonry-gallery,
    .single-sc_event .sc-additional-info-content .sc-masonry-gallery,
    div.sc-masonry-gallery {
        column-count: 2 !important;
        -webkit-column-count: 2 !important;
        -moz-column-count: 2 !important;
        column-gap: 10px !important;
        -webkit-column-gap: 10px !important;
        -moz-column-gap: 10px !important;
    }
}

@media (max-width: 480px) {

    .sc-masonry-gallery,
    .single-sc_event .sc-additional-info-content .sc-masonry-gallery,
    div.sc-masonry-gallery {
        column-count: 2 !important;
        -webkit-column-count: 2 !important;
        -moz-column-count: 2 !important;
        column-gap: 8px !important;
        -webkit-column-gap: 8px !important;
        -moz-column-gap: 8px !important;
    }
}

.sc-masonry-gallery .gallery-item {
    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    page-break-inside: avoid !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    vertical-align: top !important;
    line-height: 0 !important;
}

@media (max-width: 768px) {
    .sc-masonry-gallery .gallery-item {
        margin-bottom: 10px;
        border-radius: 6px;
    }
}

.sc-masonry-gallery .gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sc-masonry-gallery .gallery-item>a,
.sc-masonry-gallery .gallery-item>.gallery-link {
    display: block !important;
    line-height: 0 !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sc-masonry-gallery .gallery-item img {
    display: block !important;
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    border: none !important;
    outline: none !important;
}

@media (max-width: 768px) {
    .sc-masonry-gallery .gallery-item img {
        object-fit: cover;
    }
}

.sc-masonry-gallery .gallery-item:hover img {
    transform: scale(1.03);
}

.sc-masonry-gallery .gallery-caption {
    display: none;
}

/* ---------------------------------------------------------
   Event Post Entrance Animations (Premium Fade Up)
   --------------------------------------------------------- */

@keyframes scFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Base state for animated elements - ensures they are hidden before start */
.sc-post-header-content .sc-post-subtitle,
.sc-post-header-content .sc-detail-item,
.sc-discussion-container,
.sc-post-header-content .sc-additional-info,
.sc-post-banner-col img {
    opacity: 0;
    animation: scFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity, filter;
}

/* Staggered Delay System (Top to Bottom flow) */

/* 1. Subtitle (Sport & Event Type) */
.sc-post-header-content .sc-post-subtitle {
    animation-delay: 0.15s;
}

/* 2. Details Grid Items (Sequential appearance) */
.sc-post-header-content .sc-detail-item:nth-child(1) {
    animation-delay: 0.3s;
}

.sc-post-header-content .sc-detail-item:nth-child(2) {
    animation-delay: 0.38s;
}

.sc-post-header-content .sc-detail-item:nth-child(3) {
    animation-delay: 0.46s;
}

.sc-post-header-content .sc-detail-item:nth-child(4) {
    animation-delay: 0.54s;
}

.sc-post-header-content .sc-detail-item:nth-child(5) {
    animation-delay: 0.62s;
}

.sc-post-header-content .sc-detail-item:nth-child(6) {
    animation-delay: 0.70s;
}

.sc-post-header-content .sc-detail-item:nth-child(7) {
    animation-delay: 0.78s;
}

.sc-post-header-content .sc-detail-item:nth-child(8) {
    animation-delay: 0.86s;
}

/* 3. Discussion Button */
.sc-discussion-container {
    animation-delay: 0.95s;
}

/* 4. Additional Info Sections (Results, Description) */
.sc-post-header-content .sc-additional-info:nth-of-type(1) {
    animation-delay: 1.1s;
}

.sc-post-header-content .sc-additional-info:nth-of-type(2) {
    animation-delay: 1.2s;
}

/* 5. Banner Image (Appears early but subtle) */
.sc-post-banner-col img {
    animation-delay: 0.4s;
}

/* Optimization: reduce motion preference support */
@media (prefers-reduced-motion: reduce) {

    .sc-post-header-content .sc-post-subtitle,
    .sc-post-header-content .sc-detail-item,
    .sc-discussion-container,
    .sc-post-header-content .sc-additional-info,
    .sc-post-banner-col img {
        animation: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
}
