/* ===== RESET (scoped to popup) ===== */
.srpopup-overlay *,
.srpopup-overlay *::before,
.srpopup-overlay *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== HERO (demo page only) ===== */
.srpopup-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 24px;
    text-align: center;
    gap: 16px;
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;*/
}

.srpopup-hero h1 {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.srpopup-hero p {
    font-size: 16px;
    color: #555;
}

.srpopup-btn-open-popup {
    background: #e53535;
    color: #fff;
    border: none;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 700;
    /*border-radius: 12px;*/
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    border: 2px solid #ef0001;
}

.srpopup-btn-open-popup:hover  {
    background-color: #fff;
    color: #ef0001;
    border-color: #ef0001;

}
.srpopup-btn-open-popup:active { transform: scale(0.97); }

/* ===== OVERLAY ===== */
.srpopup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    /*align-items: flex-end;*/
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.4;
}

.srpopup-overlay.srpopup-active {
    opacity: 1;
    pointer-events: all;
}

/* ===== POPUP ===== */
.srpopup-popup {
    background: #fff;
    /*border-radius: 18px 18px 0 0;*/
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    transform: translateY(60px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.srpopup-overlay.srpopup-active .srpopup-popup {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 499px) {
    .srpopup-overlay {
        padding-bottom: 20px;
    }
}

@media (min-width: 500px) {
    .srpopup-overlay { align-items: center; }

    .srpopup-popup {
        /*border-radius: 18px;*/
        max-height: 90vh;
        transform: scale(0.94) translateY(12px);
    }

    .srpopup-overlay.srpopup-active .srpopup-popup {
        transform: scale(1) translateY(0);
    }
}

/* ===== TOPBAR ===== */
.srpopup-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    padding: 10px 10px 0;
    border-radius: 18px 18px 0 0;
}

.srpopup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
}

.srpopup-close:hover {
    color: #555;
    background: #f0f0f0;
}

/* ===== SUCCESS SCREEN ===== */
.srpopup-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px 56px;
    text-align: center;
    gap: 14px;
}

.srpopup-success-icon {
    width: 68px;
    height: 68px;
}

.srpopup-success-icon svg {
    width: 100%;
    height: 100%;
}

.srpopup-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.srpopup-success-text {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    max-width: 280px;
}

/* ===== UTILITY ===== */
.srpopup-hidden { display: none !important; }

/* ===== FORM CONTENT ===== */
.srpopup-content {
    padding: 0 16px 8px;
}

/* ===== PRODUCT HEADER ===== */
.srpopup-product-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 14px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

.srpopup-product-thumb {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.srpopup-product-name {
    font-size: 16px;
    font-weight: 500;
    color: #193867;
    line-height: 1.3;
}

.srpopup-product-price {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ===== SECTION TITLE ===== */
.srpopup-section-title {
    text-align: center;
    color: #193867;
    font-size: 15px;
    font-weight: 400;
    margin: 14px 0 10px;
}

/* ===== TOGGLE BUTTONS ===== */
.srpopup-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.srpopup-toggle-btn {
    border: 1.5px solid #dcdcdc;
    background: #fff;
    color: #1a1a1a;
    padding: 11px 8px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.srpopup-toggle-btn.srpopup-active {
    background: #1a3463;
    color: #fff;
    border-color: #1a3463;
}

/* ===== LOCATIONS LIST ===== */
.srpopup-locations-list {
    border: 1.5px solid #dcdcdc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.srpopup-location-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #dcdcdc;
    transition: background 0.15s;
}

.srpopup-location-item:last-child { border-bottom: none; }

.srpopup-location-item:hover { background: #f4f8fd; }

.srpopup-location-item.srpopup-selected { background: #e8f1fb; }

.srpopup-location-name {
    font-size: 14px;
    font-weight: 700;
}

.srpopup-location-addr {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* ===== SELECTED LOCATION INFO ===== */
.srpopup-sel-loc-info {
    background: #e8f1fb;
    border: 1.5px solid #c4d9f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.srpopup-sel-loc-info:hover { background: #d8ebf8; }

.srpopup-sel-loc-name {
    font-size: 14px;
    font-weight: 700;
}

.srpopup-sel-loc-addr {
    font-size: 14px;
    margin-top: 2px;
}

.srpopup-sel-loc-hours {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

/* ===== DELIVERY ADDRESS ===== */
#srpopup-deliverySection { margin-bottom: 4px; }

/* ===== FIELD LABELS ===== */
.srpopup-field-label {
    font-size: 15px;
    color: #1a1a1a;
    margin: 12px 0 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 400;
}

.srpopup-label-blue { color: #193867; }

.srpopup-check-icon { flex-shrink: 0; }

.srpopup-optional {
    color: #888;
    font-size: 14px;
    font-weight: 400;
}

/* ===== INPUTS ===== */
.srpopup-input {
    width: 100%!important;
    border: 1.5px solid #dcdcdc!important;
    border-radius: 8px!important;
    padding: 12px 14px!important;
    font-size: 15px!important;
    color: #1a1a1a!important;
    background: #fff!important;
    outline: none!important;
    transition: border-color 0.15s!important;
    margin-bottom: 2px!important;
    font-family: inherit!important;
}

.srpopup-input:focus { border-color: #193867; }

/* ===== PHONE ===== */
.srpopup-phone-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #dcdcdc;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 2px;
    transition: border-color 0.15s;
}

.srpopup-phone-wrap:focus-within { border-color: #193867; }

.srpopup-phone-prefix {
    padding: 12px 8px 12px 14px;
    font-size: 15px;
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.srpopup-phone-sep {
    width: 1.5px;
    height: 20px;
    background: #dcdcdc;
    flex-shrink: 0;
}

.srpopup-phone-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 14px;
    font-size: 15px;
    color: #1a1a1a;
    background: transparent;
    font-family: inherit;
    min-width: 0;
}

/* ===== TERM DROPDOWN ===== */
.srpopup-term-dropdown {
    border: 1.5px solid #dcdcdc;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}

.srpopup-term-dropdown.srpopup-open { border-color: #193867; }

.srpopup-term-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    min-height: 48px;
    gap: 8px;
}

.srpopup-term-placeholder {
    color: #888;
    font-size: 15px;
    flex: 1;
}

.srpopup-term-value {
    color: #1a1a1a;
    font-size: 15px;
    flex: 1;
}

.srpopup-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.srpopup-chevron.srpopup-open { transform: rotate(180deg); }

/* ===== CALENDAR ===== */
.srpopup-calendar {
    border-top: 1.5px solid #dcdcdc;
    padding: 12px 10px 14px;
    border-radius: 0 0 8px 8px;
}

.srpopup-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.srpopup-cal-month {
    font-size: 13px;
    font-weight: 500;
    background: #efefef;
    padding: 5px 14px;
    border-radius: 6px;
    color: #1a1a1a;
}

.srpopup-cal-nav {
    background: none;
    border: none;
    font-size: 26px;
    color: #888;
    cursor: pointer;
    padding: 2px 10px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    border-radius: 6px;
    font-family: inherit;
}

.srpopup-cal-nav:hover {
    color: #193867;
    background: #f0f0f0;
}

.srpopup-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}

.srpopup-cal-weekdays span {
    font-size: 12px;
    color: #193867;
    font-weight: 500;
    padding: 3px 0;
}

.srpopup-cal-weekdays span.srpopup-weekend { color: #c0392b; }

.srpopup-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.srpopup-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.srpopup-cal-day.srpopup-cal-empty,
.srpopup-cal-day.srpopup-cal-disabled {
    cursor: default;
    color: #ccc;
    pointer-events: none;
}

.srpopup-cal-day:not(.srpopup-cal-empty):not(.srpopup-cal-disabled):hover {
    background: #d8eaf8;
}

.srpopup-cal-day.srpopup-cal-today {
    font-weight: 700;
    color: #193867;
}

.srpopup-cal-day.srpopup-in-range {
    background: #deeaf8;
    border-radius: 0;
}

.srpopup-cal-day.srpopup-sel-start {
    background: #5a9fd4;
    color: #fff;
    border-radius: 50% 0 0 50%;
    font-weight: 700;
}

.srpopup-cal-day.srpopup-sel-end {
    background: #5a9fd4;
    color: #fff;
    border-radius: 0 50% 50% 0;
    font-weight: 700;
}

.srpopup-cal-day.srpopup-sel-start.srpopup-sel-end {
    border-radius: 50%;
}

/* ===== VALIDATION ===== */
.srpopup-input.srpopup-input-error {
    border-color: #e53535;
}

.srpopup-phone-wrap.srpopup-input-error {
    border-color: #e53535;
}

.srpopup-error {
    display: block;
    font-size: 12px;
    color: #e53535;
    margin-top: 4px;
    margin-bottom: 2px;
}

/* ===== EDRPOU ===== */
.srpopup-edrpou { margin-bottom: 2px; }

/* ===== SUBMIT BUTTON ===== */
.srpopup-btn-submit {
    display: block;
    width: 100%;
    background: #e53535;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 17px 16px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 8px;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

.srpopup-btn-submit:hover  { background: #c82020; }
.srpopup-btn-submit:active { transform: scale(0.98); }

/* ===== SCROLLBAR ===== */
.srpopup-popup::-webkit-scrollbar { width: 4px; }
.srpopup-popup::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

#srpopup-form input.error {
    border: 1px solid brown!important;
}
