﻿
/* ══════════════════════════════════════════════
    SHARED TRIGGER
══════════════════════════════════════════════ */
.superselect__wrap {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

    .superselect__wrap.ss_width_100 {
        width: 100%;
    }

.superselect__label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.2px;
}

.superselect__trigger {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 240px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid #dde3ea;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

    .superselect__trigger:hover {
        border-color: var(--main-color);
    }

    .superselect__trigger:focus-visible {
        outline: none;
        border-color: var(--main-color);
        box-shadow: 0 0 0 3px rgba(96,125,139,0.18);
    }

    .superselect__trigger.open {
        border-color: var(--main-color);
        box-shadow: 0 0 0 3px rgba(96,125,139,0.18);
    }

.superselect__trigger-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.superselect__trigger-placeholder {
    color: #333;
}

.superselect__trigger-chevron {
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.2s ease;
}

.superselect__trigger.open .superselect__trigger-chevron {
    transform: rotate(180deg);
}

.superselect__trigger.disabled {
    background: #f9f9f9;
    border-color: #e8eaed;
    color: #aab0b8;
    cursor: default;
}

/* ══════════════════════════════════════════════
    SHARED OVERLAY
══════════════════════════════════════════════ */
.ss__overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

    .ss__overlay.active {
        opacity: 1;
        pointer-events: all;
    }

/* ══════════════════════════════════════════════
    SHARED MODAL BOX
══════════════════════════════════════════════ */
.ss__modal-box {
    position: fixed;
    z-index: 901;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 601px) {
    .ss__modal-box {
        top: 50%;
        left: 50%;
        width: 420px;
        max-height: 560px;
        border-radius: 8px;
        box-shadow: 0 24px 64px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.08);
        transform: translate(-50%, -48%) scale(0.94);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.28s cubic-bezier(0.34, 1.36, 0.64, 1), opacity 0.22s ease;
    }

        .ss__modal-box.active {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            pointer-events: all;
        }
}

@media (max-width: 600px) {
    .ss__modal-box {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 78vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.14);
        transform: translateY(100%);
        pointer-events: none;
        transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    }

        .ss__modal-box.active {
            transform: translateY(0);
            pointer-events: all;
        }
}

.ss__modal-handle {
    display: none;
    justify-content: center;
    padding: 10px 0 0;
    flex-shrink: 0;
}

    .ss__modal-handle span {
        width: 38px;
        height: 4px;
        border-radius: 99px;
        background: #e0e5ea;
    }

@media (max-width: 600px) {
    .ss__modal-handle {
        display: flex;
    }
}

/* ── Header ── */
.ss__modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f3f6;
    flex-shrink: 0;
}

.ss__modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e2a35;
    letter-spacing: 0.15px;
}

.ss__modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f3f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 13px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    flex-shrink: 0;
}

    .ss__modal-close:hover {
        background: var(--main-color);
        color: #fff;
        transform: rotate(90deg);
    }

/* ── Search ── */
.ss__modal-search-wrap {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f3f6;
    flex-shrink: 0;
}

.ss__modal-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6f8fa;
    border: 1.5px solid #eaecf0;
    border-radius: 9px;
    padding: 8px 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

    .ss__modal-search-inner:focus-within {
        border-color: var(--main-color);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(96,125,139,0.12);
    }

    .ss__modal-search-inner .search-icon {
        color: var(--second-color);
        font-size: 13px;
        flex-shrink: 0;
    }

.ss__modal-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    min-width: 0;
}

    .ss__modal-search-input::placeholder {
        color: var(--second-color);
    }

.ss__search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--second-color);
    font-size: 12px;
    line-height: 1;
    display: none;
    align-items: center;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

    .ss__search-clear:hover {
        color: #333;
    }

    .ss__search-clear.visible {
        display: flex;
    }

/* ── Simple options (country) ── */
.ss__modal-options {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

    .ss__modal-options::-webkit-scrollbar {
        width: 5px;
    }

    .ss__modal-options::-webkit-scrollbar-track {
        background: transparent;
    }

    .ss__modal-options::-webkit-scrollbar-thumb {
        background: #dde3ea;
        border-radius: 99px;
    }

.ss__option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    cursor: pointer;
    transition: background 0.14s ease;
    position: relative;
}

    .ss__option-item::after {
        content: '';
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: 0;
        height: 1px;
        background: #f4f6f8;
    }

    .ss__option-item:last-child::after {
        display: none;
    }

    .ss__option-item:hover {
        background: #f6f8fa;
    }

    .ss__option-item.selected {
        background: rgba(96,125,139,0.07);
    }

.ss__option-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #d0d7de;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
    color: transparent;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.ss__option-item.selected .ss__option-check {
    background: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
}

.ss__option-label {
    flex: 1;
    font-size: 14px;
    color: #333;
    transition: color 0.15s ease;
}

.ss__option-item.selected .ss__option-label {
    color: var(--main-color);
    font-weight: 500;
}

/* ── No results (shared) ── */
.ss__no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    color: var(--second-color);
    font-size: 13px;
    text-align: center;
}

    .ss__no-results i {
        font-size: 30px;
        opacity: 0.35;
    }

    .ss__no-results.visible {
        display: flex;
    }

/* ── Footer ── */
.ss__modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #f0f3f6;
    flex-shrink: 0;
}

.ss__footer-action {
    padding: 9px 22px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

    .ss__footer-action:active {
        transform: scale(0.96);
    }

.ss__footer-cancel {
    background: #f0f3f6;
    color: #555;
}

    .ss__footer-cancel:hover {
        background: #e4e8ed;
    }

.ss__footer-confirm {
    background: var(--main-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(96,125,139,0.35);
}

    .ss__footer-confirm:hover {
        background: #546e7a;
        box-shadow: 0 4px 14px rgba(96,125,139,0.45);
    }


/* ══════════════════════════════════════════════
    EVENT FUNCTION MODAL  (-efm)
══════════════════════════════════════════════ */
@media (min-width: 601px) {
    .ss__modal-box.ss__tariff-wide {
        width: 500px;
        max-height: 600px;
    }
}

.ss__tariff-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .ss__tariff-list::-webkit-scrollbar {
        width: 5px;
    }

    .ss__tariff-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .ss__tariff-list::-webkit-scrollbar-thumb {
        background: #dde3ea;
        border-radius: 99px;
    }

/* Card */
.ss__tariff-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border: 1.5px solid #eaecf0;
    border-radius: 11px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.14s ease;
    position: relative;
}

    .ss__tariff-card:hover {
        border-color: #b5c3cc;
        box-shadow: 0 3px 12px rgba(96,125,139,0.1);
    }

    .ss__tariff-card.selected {
        border-color: var(--main-color);
        background: rgba(96,125,139,0.04);
        box-shadow: 0 0 0 3px rgba(96,125,139,0.12), 0 3px 12px rgba(96,125,139,0.1);
    }

/* Body */
.ss__tariff-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.ss__tariff-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e2a35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.ss__tariff-card.selected .ss__tariff-name {
    color: var(--main-color);
}

.ss__tariff-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.ss__tariff-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6b7a87;
    white-space: nowrap;
}

    .ss__tariff-meta-item i {
        font-size: 11px;
        color: var(--second-color);
        flex-shrink: 0;
    }

.ss__tariff-tariff {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--main-color);
    padding: 2px 9px;
    border-radius: 99px;
    white-space: nowrap;
}

    .ss__tariff-tariff i {
        font-size: 10px;
    }

/* Selection badge */
.ss__tariff-select-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--main-color);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ss__tariff-card.selected .ss__tariff-select-badge {
    opacity: 1;
    transform: scale(1);
}

/* Sold out */
.ss__tariff-card.soldout {
    cursor: not-allowed;
    background: #fafafa;
    border-color: #e8eaed;
}

    .ss__tariff-card.soldout:hover {
        border-color: #e8eaed;
        box-shadow: none;
    }

    .ss__tariff-card.soldout .ss__tariff-name {
        color: #aab0b8;
        text-decoration: line-through;
    }

    .ss__tariff-card.soldout .ss__tariff-meta-item {
        color: #bcc2c8;
    }

        .ss__tariff-card.soldout .ss__tariff-meta-item i {
            color: #cdd2d7;
        }

    .ss__tariff-card.soldout .ss__tariff-tariff {
        background: #d8dde2;
        color: #8f979e;
    }

.ss__tariff-soldout-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 99px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    flex-shrink: 0;
    pointer-events: none;
}

    .ss__tariff-soldout-badge i {
        font-size: 9px;
    }

/* EFM no results */
.ss__tariff-no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    color: var(--second-color);
    font-size: 13px;
    text-align: center;
}

    .ss__tariff-no-results i {
        font-size: 30px;
        opacity: 0.35;
    }

    .ss__tariff-no-results.visible {
        display: flex;
    }

/* EFM trigger preview */
.ss__tariff-trigger-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ss__tariff-trigger-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ss__tariff-trigger-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e2a35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss__tariff-trigger-sub {
    font-size: 11px;
    color: var(--second-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ══════════════════════════════════════════════
    FUNCTION DATE MODAL  (-fdm)
══════════════════════════════════════════════ */
@media (min-width: 601px) {
    .ss__modal-box.ss__function-wide {
        width: 480px;
        max-height: 600px;
    }
}

.ss__function-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

    .ss__function-list::-webkit-scrollbar {
        width: 5px;
    }

    .ss__function-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .ss__function-list::-webkit-scrollbar-thumb {
        background: #dde3ea;
        border-radius: 99px;
    }

/* Card */
.ss__function-card {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #eaecf0;
    border-radius: 11px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.14s ease;
    position: relative;
    width: 100%;
    min-height: 96px;
}

    .ss__function-card:hover {
        border-color: #b5c3cc;
        box-shadow: 0 3px 12px rgba(96,125,139,0.1);
    }

    .ss__function-card.selected {
        border-color: var(--main-color);
        background: rgba(96,125,139,0.04);
        box-shadow: 0 0 0 3px rgba(96,125,139,0.12), 0 3px 12px rgba(96,125,139,0.1);
    }

/* Thumbnail */
.ss__function-thumb {
    width: 88px;
    flex-shrink: 0;
    background: #eef1f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

    .ss__function-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

.ss__function-card:hover .ss__function-thumb img {
    transform: scale(1.05);
}

/* Date block shown when no image */
.ss__function-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 100%;
    min-height: 90px;
    padding: 12px 8px;
    box-sizing: border-box;
}

.ss__function-date-day {
    font-size: 26px;
    font-weight: 700;
    color: var(--main-color);
    line-height: 1;
}

.ss__function-date-month {
    font-size: 11px;
    font-weight: 600;
    color: var(--second-color);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.ss__function-date-year {
    font-size: 11px;
    color: #b0bec5;
    letter-spacing: 0.3px;
}

/* When card has image, show a date pill overlay on the thumb */
.ss__function-thumb.has-img .ss__function-date-block {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: unset;
    padding: 4px 6px 6px;
    background: linear-gradient(transparent, rgba(15,23,42,0.72));
    gap: 0;
}

.ss__function-thumb.has-img .ss__function-date-day {
    font-size: 20px;
    color: #fff;
}

.ss__function-thumb.has-img .ss__function-date-month {
    color: rgba(255,255,255,0.8);
}

.ss__function-thumb.has-img .ss__function-date-year {
    color: rgba(255,255,255,0.55);
}

/* Body */
.ss__function-body {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

/* Function name badge (shown only when not null) */
.ss__function-fn-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--main-color);
    background: rgba(96,125,139,0.1);
    padding: 2px 9px;
    border-radius: 99px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    align-self: flex-start;
}

    .ss__function-fn-name i {
        font-size: 10px;
        flex-shrink: 0;
    }

/* Date text row */
.ss__function-date-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #1e2a35;
    transition: color 0.15s ease;
}

.ss__function-card.selected .ss__function-date-row {
    color: var(--main-color);
}

.ss__function-date-row i {
    font-size: 13px;
    color: var(--second-color);
    flex-shrink: 0;
}

/* Time row */
.ss__function-time-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6b7a87;
}

    .ss__function-time-row i {
        font-size: 11px;
        color: var(--second-color);
        flex-shrink: 0;
    }

/* Selection badge */
.ss__function-select-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--main-color);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.ss__function-card.selected .ss__function-select-badge {
    opacity: 1;
    transform: scale(1);
}

/* FDM no results */
.ss__function-no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    color: var(--second-color);
    font-size: 13px;
    text-align: center;
}

    .ss__function-no-results i {
        font-size: 30px;
        opacity: 0.35;
    }

    .ss__function-no-results.visible {
        display: flex;
    }

/* FDM trigger preview */
.ss__function-trigger-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ss__function-trigger-thumb {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eef1f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ss__function-trigger-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Date mini-block shown in trigger when no image */
.ss__function-trigger-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    padding: 2px 0;
}

    .ss__function-trigger-date-block .ss__function-tdb-day {
        font-size: 14px;
        font-weight: 700;
        color: var(--main-color);
    }

    .ss__function-trigger-date-block .ss__function-tdb-mon {
        font-size: 9px;
        font-weight: 600;
        color: var(--second-color);
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

.ss__function-trigger-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ss__function-trigger-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e2a35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss__function-trigger-sub {
    font-size: 11px;
    color: var(--second-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════
            SHARED GROUP HEADER
══════════════════════════════════════════════ */
.ss__group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--second-color);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    user-select: none;
    /* push first header flush, subsequent ones get breathing room */
    margin-top: 10px;
}

    .ss__group-header:first-child {
        margin-top: 0;
    }

    .ss__group-header i {
        font-size: 10px;
        flex-shrink: 0;
    }

    .ss__group-header::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #eaecf0;
    }
