﻿@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-Light_V3000.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-Regular_V3000.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-Medium_V3000.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-Bold_V3000.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-LightItalic_V3000.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-Italic_V3000.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-MediumItalic_V3000.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'Read';
    src: url('../fonts/Read-BoldItalic_V3000.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
#dateTimeSection {
    display: none;
}
    #dateTimeSection.visible {
        display: block;
    }

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: clip;
    max-width: 100%;
}

body {
    background: #f0f0f0;
    font-family: 'Read', Arial, sans-serif;
    color: #222;
    margin: 0;
}

/* ===== OUTER LAYOUT (CSS Grid) ===== */
.page-outer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 60px;
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-areas: "main sidebar" "submit sidebar";
    gap: 24px;
    align-items: start;
}

.main-content {
    grid-area: main;
}

.sticky-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 20px;
}

.submit-wrapper {
    grid-area: submit;
}

@media (max-width: 960px) {
    .page-outer {
        grid-template-columns: 1fr;
        grid-template-areas: "main" "sidebar" "submit";
    }

    .sticky-sidebar {
        position: static;
    }
}

/* ===== HEADER ===== */
.page-header {
    background: #6E7058;
    color: #fff;
    padding: 40px 36px 32px;
    margin-bottom: 24px;
}

    .page-header h1 {
        font-size: 2rem;
        font-weight: 800;
        margin: 0 0 8px;
    }

    .page-header p {
        font-size: 1.05rem;
        margin: 12px 0 0;
        opacity: .8;
    }

/* ===== SECTION CARD ===== */
.section-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 26px 26px 22px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #6E7058;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 4px solid #6E7058;
    line-height: 1.3;
}

/* ===== DROPDOWNS ===== */
.custom-dropdown {
    position: relative;
}

.dropdown-trigger {
    background: #fff;
    border: 2px solid #ddd;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .95rem;
    transition: border-color .2s;
    user-select: none;
}

    .dropdown-trigger:hover {
        border-color: #6E7058;
    }

    .dropdown-trigger.open {
        border-color: #6E7058;
    }

.dropdown-arrow {
    transition: transform .2s;
    font-size: .78rem;
    color: #666;
}

.dropdown-trigger.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #6E7058;
    z-index: 300;
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

    .dropdown-panel.open {
        display: block;
    }

.dropdown-search {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

    .dropdown-search input {
        width: 100%;
        border: 1px solid #ddd;
        padding: 8px 12px;
        font-size: .91rem;
        outline: none;
        transition: border-color .2s;
        font-family: inherit;
    }

        .dropdown-search input:focus {
            border-color: #6E7058;
        }

.dropdown-list {
    max-height: 280px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 13px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background .12s;
    font-size: .93rem;
}

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background: #f5f5f5;
    }

    .dropdown-item.selected {
        background: #EFDF00;
        font-weight: 600;
        border-left: 4px solid #6E7058;
    }

.branch-name {
    font-weight: 700;
    font-size: .94rem;
}

.branch-meta {
    font-size: .79rem;
    color: #666;
    margin-top: 3px;
    line-height: 1.6;
}

.dropdown-item.selected .branch-meta {
    color: #333;
}

/* ===== MAP ===== */
#serviceMap {
    height: 320px;
    border: 2px solid #ddd;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

/* ===== SERVICES ===== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.service-card {
    border: 2px solid #ccc;
    padding: 11px 14px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    font-size: .88rem;
    user-select: none;
    background: #fff;
    color: #6E7058;
    font-weight: 600;
}

    .service-card:hover {
        background: #f5f5f5;
        border-color: #6E7058;
    }

    .service-card.checked {
        background: #6E7058;
        border-color: #6E7058;
        border-left: 4px solid #6E7058;
        font-weight: 700;
        color: #ffffff;
    }

    .service-card input[type=checkbox] {
        display: none;
    }

.replacement-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8f8f8;
    cursor: pointer;
    font-size: .91rem;
    transition: background .15s;
}

    .replacement-row:hover {
        background: #f0f0f0;
    }

    .replacement-row input {
        width: 16px;
        height: 16px;
        accent-color: #6E7058;
    }

/* ===== TEXTAREA ===== */
.section-textarea {
    width: 100%;
    border: 2px solid #ddd;
    padding: 12px;
    font-size: .91rem;
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}

    .section-textarea:focus {
        border-color: #6E7058;
    }

.other-textarea-wrap {
    margin-top: 16px;
    display: none;
}

    .other-textarea-wrap.visible {
        display: block;
    }

/* ===== CAMPAIGNS ===== */
.campaign-card {
    background: #fff;
    border: 2px solid #ccc;
    border-left: 4px solid #ccc;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}

    .campaign-card:hover {
        border-color: #6E7058;
        background: #f5f5f5;
    }

    .campaign-card.selected {
        background: #6E7058;
        border: 2px solid #6E7058;
        border-left: 4px solid #6E7058;
        color: #ffffff;
    }
        .campaign-card.selected .campaign-title {
            color: #ffffff;
        }
        .campaign-card.selected .campaign-period {
            color: #333;
        }

.campaign-title {
    font-weight: 700;
    color: #6E7058;
    font-size: .95rem;
}

.campaign-period {
    font-size: .79rem;
    color: #666;
    margin: 4px 0 6px;
}

.campaign-desc {
    font-size: .87rem;
    color: #444;
}

.no-campaigns {
    color: #aaa;
    font-size: .9rem;
    font-style: italic;
}

/* ===== CALENDAR ===== */
.calendar-wrap {
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #6E7058;
    color: #fff;
    padding: 14px 20px;
}

.cal-title {
    font-weight: 700;
    font-size: 1rem;
}

.cal-nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
    font-weight: 700;
    transition: color .15s;
}

    .cal-nav:hover {
        color: #fff;
    }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-day-name {
    text-align: center;
    padding: 10px 2px;
    font-size: .75rem;
    font-weight: 700;
    color: #555;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
}

.cal-cell {
    text-align: center;
    padding: 10px 2px;
    font-size: .87rem;
    cursor: default;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s;
}

    .cal-cell.empty {
        background: #fafafa;
    }

    .cal-cell.past {
        color: #ccc;
    }

    .cal-cell.available {
        background: #FFFDE7;
        color: #6E7058;
        cursor: pointer;
        font-weight: 700;
    }

        .cal-cell.available:hover {
            background: #6E7058;
            color: #fff;
        }

    .cal-cell.selected {
        background: #6E7058 !important;
        color: #fff !important;
        font-weight: 700;
        cursor: pointer;
        border-radius: 4px;
    }

    .cal-cell.today::after {
        content: '▪';
        display: block;
        font-size: .4rem;
        color: #EFDF00;
        margin-top: 2px;
        line-height: 0;
    }

/* ===== CALENDAR + TIME SLOTS SPLIT LAYOUT ===== */
.cal-time-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.cal-side {
}

.time-side {
}

.time-side-title {
    font-size: .82rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.time-side-empty {
    color: #aaa;
    font-size: .88rem;
    font-style: italic;
    margin-top: 8px;
}

/* ===== TIME SLOTS ===== */
.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.time-btn {
    border: 2px solid #6E7058;
    padding: 9px 6px;
    background: #fff;
    color: #6E7058;
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    text-align: center;
    font-weight: 600;
    position: relative;
}

    .time-btn:hover {
        background: #6E7058;
        color: #fff;
    }

    .time-btn.active {
        background: #6E7058;
        color: #fff;
        border-color: #6E7058;
        font-weight: 700;
    }

        .time-btn.active:hover {
            background: #333;
        }

        .time-btn.active::after {
            content: '✓';
            position: absolute;
            top: -8px;
            right: -8px;
            width: 18px;
            height: 18px;
            background: #fff;
            color: #6E7058;
            border-radius: 50%;
            font-size: .65rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 18px;
            border: 2px solid #6e7058;
        }

.no-slots {
    color: #aaa;
    font-size: .9rem;
    font-style: italic;
    margin-top: 8px;
}

@media (max-width: 680px) {
    .cal-time-wrap {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== FORM ===== */
.form-label {
    font-size: .84rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.req {
    color: #6E7058;
}

.form-control-custom {
    width: 100%;
    border: 2px solid #ddd;
    padding: 11px 14px;
    font-size: .91rem;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}

    .form-control-custom:focus {
        border-color: #6E7058;
    }

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ===== TERMS + REPLACEMENT (еднакъв стил) ===== */
.terms-row, .replacement-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .91rem;
    padding: 12px 14px;
    background: #f8f8f8;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 10px;
}

    .terms-row:hover, .replacement-row:hover {
        background: #f0f0f0;
    }

    .terms-row input, .replacement-row input {
        width: 16px;
        height: 16px;
        accent-color: #6E7058;
        flex-shrink: 0;
    }

.terms-link {
    color: #6E7058;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ===== TERMS MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .modal-overlay.open {
        display: flex;
    }

.modal-box {
    background: #fff;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    overflow: hidden;
}

.modal-head {
    background: #6E7058;
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

    .modal-head h2 {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
    }

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    font-weight: 700;
    transition: color .15s;
}

    .modal-close:hover {
        color: #fff;
    }

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
    font-size: .91rem;
    line-height: 1.7;
    color: #222;
}

    .modal-body h3 {
        font-size: .97rem;
        font-weight: 700;
        color: #6E7058;
        margin: 20px 0 6px;
        border-left: 3px solid #6E7058;
        padding-left: 10px;
    }

        .modal-body h3:first-child {
            margin-top: 0;
        }

    .modal-body p {
        margin: 0 0 10px;
    }

    .modal-body ul {
        margin: 0 0 10px;
        padding-left: 20px;
    }

        .modal-body ul li {
            margin-bottom: 4px;
        }

.modal-foot {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.modal-accept-btn {
    background: #6E7058;
    color: #fff;
    border: 2px solid #6E7058;
    padding: 10px 28px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}

    .modal-accept-btn:hover {
        background: #fff;
        color: #6E7058;
    }

/* ===== SUPER PRIMARY BUTTON (SUBMIT) ===== */
.btn-submit {
    background: #6E7058;
    color: #fff;
    border: 2px solid #6E7058;
    padding: 15px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    transition: background .15s, color .15s;
    font-family: inherit;
}

    .btn-submit:hover {
        background: #fff;
        color: #6E7058;
    }

/* ===== FIELD ERRORS ===== */
.field-error {
    display: none;
    margin-top: 6px;
    color: #d32f2f;
    font-size: .85rem;
    font-weight: 500;
}

.input-error {
    border: 1px solid #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211,47,47,.12);
}

    .input-error:focus {
        outline: none;
        border-color: #d32f2f !important;
        box-shadow: 0 0 0 3px rgba(211,47,47,.18);
    }


.step-note {
    font-size: .82rem;
    color: #aaa;
    margin-top: -10px;
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

/* ===== SUCCESS PAGE ===== */
.success-page {
    display: none;
    max-width: 640px;
    margin: 40px auto 80px;
    padding: 0 16px;
}

    .success-page.visible {
        display: block;
    }

.success-card {
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    overflow: hidden;
}

.success-card-head {
    background: #6E7058;
    color: #fff;
    padding: 32px 28px 24px;
}

    .success-card-head h2 {
        margin: 0 0 6px;
        font-size: 1.6rem;
        font-weight: 800;
    }

    .success-card-head p {
        margin: 0;
        font-size: .95rem;
        opacity: .8;
        font-weight: 600;
    }

.success-card-body {
    padding: 24px 28px;
}

.success-row {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

    .success-row:last-child {
        border-bottom: none;
    }

.success-row-label {
    font-size: .73rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 3px;
}

.success-row-value {
    font-size: .93rem;
    color: #6E7058;
    font-weight: 600;
    line-height: 1.5;
}

.success-note {
    border-top: 1px solid #eee;
    padding: 16px 0 0;
    font-size: .86rem;
    color: #666;
    margin-top: 4px;
    line-height: 1.6;
}

.success-back-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    background: #6E7058;
    color: #fff;
    border: 2px solid #6E7058;
    padding: 15px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
    text-align: center;
}

    .success-back-btn:hover {
        background: #fff;
        color: #6E7058;
    }
.success-badge {
    display: block;
}

.form-error-summary {
    display: none;
    margin: 18px 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fdeaea;
    border: 1px solid #e25b5b;
    color: #b40000;
    font-weight: 600;
}

@media (max-width: 600px) {
    .success-card-head {
        padding: 24px 18px 18px;
    }

    .success-card-body {
        padding: 16px 18px;
    }
}

/* ===== STICKY SIDEBAR ===== */
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    overflow: hidden;
}

.sidebar-header {
    background: #6E7058;
    color: #fff;
    padding: 18px 20px;
}

    .sidebar-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
    }

    .sidebar-header p {
        margin: 4px 0 0;
        font-size: .78rem;
        opacity: .6;
    }

.sidebar-body {
    padding: 16px 20px;
}

.sidebar-row {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

    .sidebar-row:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.sidebar-label {
    font-size: .72rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.sidebar-value {
    font-size: .88rem;
    color: #6E7058;
    font-weight: 500;
    margin-top: 3px;
    line-height: 1.4;
}

.sidebar-empty {
    color: #ccc;
    font-size: .85rem;
    font-style: italic;
    text-align: center;
    padding: 24px 0;
}

.sidebar-badge {
    display: inline;
    font-size: .85rem;
    font-weight: 600;
    color: #6E7058;
}

.map-tooltip {
    padding: 0;
    margin: 0;
}

.map-tooltip-city {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.map-tooltip-center {
    margin-bottom: 8px;
}

    .map-tooltip-center:last-child {
        margin-bottom: 0;
    }

.map-tooltip-name {
    font-weight: 600;
    font-size: .85rem;
}

.map-tooltip-address {
    font-size: .8rem;
    color: #555;
    line-height: 1.2;
}

/* ===== MOBILE (≤ 600px / iPhone 12 Pro = 390px) ===== */
@media (max-width: 600px) {
    .page-outer {
        padding: 0 10px 32px;
        gap: 14px;
    }

    .page-header {
        padding: 22px 16px 18px;
        margin-bottom: 14px;
    }

        .page-header h1 {
            font-size: 1.3rem;
        }

        .page-header p {
            font-size: .9rem;
        }

    .section-card {
        padding: 16px 14px 14px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    .section-title {
        font-size: .93rem;
        margin-bottom: 14px;
    }

    #serviceMap {
        height: 220px;
    }

    .service-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr;
    }

    .dropdown-trigger {
        font-size: .88rem;
        padding: 11px 12px;
    }

    .branch-meta {
        font-size: .76rem;
    }

    .time-slots {
        gap: 8px;
    }

    .time-btn {
        padding: 8px 14px;
        font-size: .85rem;
    }

    .cal-cell {
        font-size: .78rem;
        min-height: 36px;
    }

    .cal-day-name {
        font-size: .68rem;
        padding: 8px 1px;
    }

    .btn-submit {
        font-size: .97rem;
        padding: 14px 20px;
    }

    .sidebar-body {
        padding: 14px 16px;
    }
}
.marker-cluster-small {
    background-color: rgba(0, 0, 0, 0.6) !important;
}
.marker-cluster-small div {
    background-color: rgba(0, 0, 0, 0.6) !important;
    color: #fff;
}

/* ===== RATE LIMIT MODAL ===== */

.rate-limit-modal-box {
    width: calc(100% - 32px);
    max-width: 440px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
}

    .rate-limit-modal-box .modal-body {
        padding: 20px 24px;
        line-height: 1.6;
    }

        .rate-limit-modal-box .modal-body p {
            margin: 0;
        }

.rate-limit-note {
    margin-top: 12px !important;
    font-size: 0.85rem;
    color: #777;
}

@media (max-width: 600px) {
    .rate-limit-modal-box .modal-body {
        padding: 16px;
    }
}