/* =============================================
   SERVICE PAGE — Full screen layout
============================================= */
body.page-template-page-service {
    overflow: hidden;
}
body.page-template-page-service .ebs-desktop-footer {
    display: none !important;
}

@media (min-width: 769px) {
    body.page-template-page-service .mobile-bottom-nav {
        display: none !important;
    }
}

.ebs-service-page {
    display: flex;
    height: calc(100vh - 155px);
    overflow: hidden;
    font-family: Arial, sans-serif;
    background: #f5f6fa;
}

/* =============================================
   LEFT — Bicycle List
============================================= */
.ebs-service-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #e5e5e5;
    background: #fff;
    position: relative;
}

.ebs-service-left-inner {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

.ebs-bicycle-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    gap: 14px;
    color: #888;
}
.ebs-bicycle-empty img {
    width: 120px;
    opacity: 0.6;
}
.ebs-bicycle-empty p {
    font-size: 15px;
    color: #888;
    margin: 0;
}

.ebs-add-bicycle-btn {
    background: #0c232c;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.ebs-add-bicycle-btn:hover { background: #77b32f; }

.ebs-add-bicycle-bar {
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}
.ebs-add-bicycle-btn-float {
    background: #0c232c;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .2s;
}
.ebs-add-bicycle-btn-float:hover { background: #77b32f; }

/* Bicycle cards */
.ebs-bicycle-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ebs-bicycle-card {
    border-radius: 12px;
    border: 1.5px solid #e5e5e5;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.ebs-bicycle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ebs-bicycle-card-num {
    font-size: 13px;
    font-weight: 700;
    color: #0c232c;
}
.ebs-bicycle-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #e53935;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s, color .2s;
    line-height: 1;
}
.ebs-bicycle-delete-btn:hover {
    background: #e53935;
    color: #fff;
}

.ebs-bicycle-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.ebs-bicycle-card-tag {
    background: #0c232c;
    color: #fff;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
}
.ebs-bicycle-card-tag.light {
    background: #f0f4f8;
    color: #555;
}
.ebs-bicycle-card-problem {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}
.ebs-bicycle-card-problem strong {
    color: #333;
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

/* =============================================
   RIGHT — Booking Panel
============================================= */
.ebs-service-right {
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #f5f6fa;
    overflow: hidden;
}

.ebs-service-right-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.ebs-svc-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.ebs-svc-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #0c232c;
    margin-bottom: 12px;
}

.ebs-svc-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ebs-svc-section-title-row .ebs-svc-section-title { margin-bottom: 0; }

/* Mode tabs */
.ebs-svc-mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.ebs-svc-mode-tab {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s;
}
.ebs-svc-mode-tab.active {
    border-color: #0c232c;
    background: #0c232c;
    color: #fff;
}
.ebs-svc-mode-tab:not(.active):hover {
    border-color: #77b32f;
    background: #77b32f;
    color: #fff;
}

.ebs-svc-book-now-link {
    font-size: 13px;
    color: #77b32f;
    font-weight: 700;
    cursor: pointer;
}
.ebs-svc-book-now-link:hover { text-decoration: underline; }

/* Address */
.ebs-svc-address-action-btn {
    background: #0c232c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.ebs-svc-address-action-btn:hover { background: #77b32f; }

.ebs-svc-address-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f0f4f8;
    border-radius: 8px;
    border: 2px solid #0c232c;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}
.ebs-svc-address-card i { color: #0c232c; margin-top: 2px; flex-shrink: 0; }
.ebs-svc-address-card span { flex: 1; }
#ebs-svc-address-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #0c232c;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
#ebs-svc-address-edit-btn:hover { background: #77b32f; color: #fff; }

.ebs-svc-select-store-btn {
    width: 100%;
    padding: 10px;
    background: #f0f4f8;
    border: 2px dashed #0c232c;
    border-radius: 8px;
    color: #0c232c;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: all .2s;
    box-sizing: border-box;
}
.ebs-svc-select-store-btn:hover { background: #77b32f; color: #fff; border-color: #77b32f; }

.ebs-svc-selected-store-card {
    background: #f0f4f8;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #333;
    line-height: 1.8;
}

/* ── Calendar ── */
.ebs-svc-calendar {
    font-size: 13px;
    position: relative;
}

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

.ebs-cal-month-label {
    font-size: 14px;
    font-weight: 700;
    color: #0c232c;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.ebs-cal-nav {
    display: flex;
    gap: 6px;
}
.ebs-cal-nav button {
    background: none;
    border: none;
    cursor: pointer;
    color: #0c232c;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s;
}
.ebs-cal-nav button:hover { background: #f0f4f8; color: #0c232c;}

/* ── Year Picker Dropdown ── */
#ebs-cal-year-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 200;
    padding: 6px 0;
    min-width: 120px;
    border: 1px solid #e0e0e0;
}
.ebs-cal-year-item {
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ebs-cal-year-item:hover {
    background: #f0f4f8;
    color: #0c232c;
}
.ebs-cal-year-item.active {
    background: #0c232c;
    color: #fff;
    font-weight: 700;
}

.ebs-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    margin-bottom: 6px;
}

.ebs-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.ebs-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    transition: background .15s, color .15s;
}
.ebs-cal-day:hover:not(.past):not(.empty) { background: #f0f4f8; color: #0c232c; }
.ebs-cal-day.today { color: #77b32f; font-weight: 700; }
.ebs-cal-day.selected { background: #0c232c; color: #fff !important; border-radius: 50%; }
.ebs-cal-day.selected:hover {background: #0c232c !important; color: #fff !important;}
.ebs-cal-day:hover:not(.past):not(.empty) {
    background: #f0f4f8;
    color: #0c232c;
}
.ebs-cal-day.past { color: #ccc; cursor: not-allowed; }
.ebs-cal-day.empty { cursor: default; }

/* ── Time slots ── */
.ebs-svc-timeslots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ebs-timeslot {
    padding: 8px 4px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    color: #333;
    transition: all .2s;
    line-height: 1.4;
}
.ebs-timeslot:hover:not(.past) { border-color: #77b32f; color: #77b32f; }
.ebs-timeslot.selected, .ebs-timeslot.selected:hover { background: #0c232c; color: #fff; border-color: #0c232c; }
.ebs-timeslot.past { color: #ccc; border-color: #f0f0f0; cursor: not-allowed; }

/* ── Bottom bar ── */
.ebs-svc-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
.ebs-svc-charge-label {
    font-size: 13px;
    font-weight: 700;
    color: #0c232c;
}
.ebs-svc-charge-val {
    font-size: 13px;
    color: #555;
}
.ebs-svc-submit-btn {
    background: #0c232c;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 36px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.ebs-svc-submit-btn:hover { background: #77b32f; }
.ebs-svc-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* =============================================
   POPUPS — shared
============================================= */
.ebs-svc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
}
.ebs-svc-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 460px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
.ebs-svc-popup h5 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0c232c;
}
.ebs-svc-popup input,
.ebs-svc-popup select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    color: #333;
}
.ebs-svc-popup input:focus,
.ebs-svc-popup select:focus { border-color: #0c232c; }

.ebs-svc-select-wrap {
    position: relative;
    margin-bottom: 12px;
}
.ebs-svc-select-wrap select {
    margin-bottom: 0;
    padding-right: 36px;
    cursor: pointer;
}
.ebs-svc-select-wrap i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    font-size: 12px;
}

.ebs-svc-row {
    display: flex;
    gap: 10px;
}
.ebs-svc-row input { flex: 1; }

.ebs-svc-popup-close {
    display: block;
    background: none;
    border: none;
    color: #e53935;
    font-size: 14px;
    cursor: pointer;
    float: right;
    margin-top: 8px;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.ebs-svc-popup-close:hover { background: #ecf8f6; color: #e53935; }

.ebs-svc-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 8px;
}
.ebs-svc-popup-actions button {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
#ebs-bicycle-close,
#ebs-svc-addr-close,
#ebs-svc-edit-addr-close,
#ebs-svc-store-close { color: #e53935; }
#ebs-bicycle-next,
#ebs-svc-edit-addr-confirm { color: #2e7d32; }
.ebs-svc-popup-actions button:hover { background: #0c232c; color: #fff; }

/* Address picker items */
.ebs-svc-addr-item {
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}
.ebs-svc-addr-item:hover { border-color: #77b32f; }
.ebs-svc-addr-item-name { font-size: 14px; font-weight: 700; color: #0c232c; margin-bottom: 4px; }
.ebs-svc-addr-item-text { font-size: 12px; color: #666; }

/* Store picker items */
.ebs-svc-store-item {
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}
.ebs-svc-store-item:hover { border-color: #77b32f; }
.ebs-svc-store-item-name { font-size: 14px; font-weight: 700; color: #0c232c; margin-bottom: 4px; }
.ebs-svc-store-item-addr { font-size: 12px; color: #666; }

/* Bicycle popup */
.ebs-bicycle-popup { width: 520px; }
.ebs-bicycle-divider {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    margin: 8px 0 12px;
}
.ebs-just-book-btn {
    width: 100%;
    padding: 12px;
    background: #77b32f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background .2s;
}
.ebs-just-book-btn:hover { background: #5e9124; }

.ebs-bike-service-price {
    font-size: 13px;
    color: #77b32f;
    font-weight: 700;
    margin-top: -6px;
    margin-bottom: 10px;
    padding-left: 4px;
}

/* =============================================
   RESPONSIVE
============================================= */

/* Tablet */
@media (max-width: 900px) {
    .ebs-service-right { width: 320px; }
    .ebs-svc-timeslots { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    body.page-template-page-service { overflow: auto; }

    .ebs-service-page {
        flex-direction: column;
        height: auto;
        overflow: visible;
      	padding-bottom: 64px;
    }

    .ebs-service-left {
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid #eee;
        min-height: 260px;
    }
    .ebs-service-left-inner {
        overflow: visible;
        padding: 16px;
    }

    .ebs-service-right {
        width: 100%;
        overflow: visible;
    }
    .ebs-service-right-scroll {
        overflow: visible;
        padding: 12px;
    }

    .ebs-svc-bottom-bar {
        position: sticky;
        bottom: 64;
        z-index: 100;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    }

    .ebs-svc-timeslots { grid-template-columns: repeat(2, 1fr); }

    .ebs-svc-submit-btn { padding: 11px 24px; font-size: 14px; }

    .ebs-bicycle-card-tags { gap: 6px; }
    .ebs-bicycle-card-tag { font-size: 11px; padding: 2px 10px; }

    .ebs-svc-popup {
        width: 96vw;
        max-width: 96vw;
        padding: 18px 14px;
        max-height: 92vh;
    }
    .ebs-bicycle-popup { width: 96vw; }

    .ebs-svc-row { flex-direction: column; gap: 0; }

    .ebs-cal-day { font-size: 12px; }

    #ebs-cal-year-dropdown { min-width: 100px; }

    .ebs-svc-section { padding: 12px; }
}

/* Very small phones */
@media (max-width: 380px) {
    .ebs-svc-timeslots { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .ebs-timeslot { font-size: 11px; padding: 7px 2px; }
    .ebs-cal-weekdays span,
    .ebs-cal-day { font-size: 11px; }
    .ebs-svc-submit-btn { padding: 10px 16px; font-size: 13px; }
    .ebs-add-bicycle-btn { padding: 10px 20px; font-size: 14px; }
}