/*
File: em_online_booking.css
Plugin: Emerald Booking System
Description: Frontend online booking styling.
Version: 1.1.0
Copyright: Vianke Ltd, 2025
*/

.em-online-booking-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.em-online-booking-wrapper,
.em-online-booking-wrapper * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.em-booking-header {
    text-align: center;
    margin-bottom: 4px;
}

.em-booking-subtitle {
    font-size: 18px;
    color: #1a1a1a;
    margin: 0;
    font-weight: 700;
}

.em-booking-main h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    margin: 0 0 8px 0;
}

/* ============================
   BREADCRUMB NAVIGATION
   ============================ */
.em-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.em-breadcrumb a {
    color: #999;
    text-decoration: none;
}

.em-breadcrumb a:hover {
    color: #000;
}

.em-breadcrumb span {
    margin: 0 4px;
}

.em-breadcrumb strong {
    color: #000;
}

/* ============================
   STEP INDICATOR
   ============================ */
.em-step-indicator {
    display: flex;
    justify-content: space-between;
    margin: 6px 0 8px 0;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.em-step-indicator::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.em-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.em-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
}

.em-step.active .em-step-number {
    background: #000;
    color: #fff;
}

.em-step.completed .em-step-number {
    background: #10b981;
    color: #fff;
}

.em-step-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.em-step.active .em-step-label {
    color: #000;
    font-weight: 600;
}

/* ============================
   LAYOUT
   ============================ */
.em-booking-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    margin-top: 10px;
}

.em-booking-main {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
}

.em-booking-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.em-booking-cart {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.em-booking-cart h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

/* ============================
   CATEGORY FILTERS
   ============================ */
.em-category-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.em-category-btn {
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.em-category-btn:hover {
    background: #e5e7eb;
}

.em-category-btn.active {
    background: #000;
    color: #fff;
}

/* ============================
   SERVICE CARDS - COMPACT
   ============================ */
.em-services-list {
    display: grid;
    gap: 0;
}

.em-service-card {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    overflow: hidden;
    transition: background 0.15s;
}

.em-service-card:last-child {
    border-bottom: none;
}

.em-service-card:hover {
    background: #fafafa;
}

.em-service-card-row {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    gap: 12px;
}

.em-service-card-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.em-service-card-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    display: inline;
}

.em-service-card-info .em-service-duration {
    display: inline;
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
    margin-left: 8px;
}

.em-service-card-info .em-service-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin: 2px 0 0 0;
}

.em-service-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.em-service-price {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.em-add-service-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.em-add-service-btn:hover {
    background: #374151;
    transform: scale(1.1);
}

/* Hide old card structure elements */
.em-service-card-content { display: none; }
.em-service-footer { display: none; }

/* ============================
   SERVICE MODAL
   ============================ */
.em-service-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.em-service-modal.show {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh;
}

.em-service-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    margin: 0 !important;
}

.em-service-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.em-service-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.em-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
}

.em-modal-close:hover {
    color: #000;
}

.em-modal-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
}

.em-modal-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.em-modal-tab:hover {
    color: #000;
}

.em-modal-tab.active {
    color: #000;
    border-bottom-color: #000;
}

.em-service-modal-body {
    padding: 24px;
}

.em-modal-tab-content {
    display: none;
}

.em-modal-tab-content.active {
    display: block;
}

.em-service-overview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.em-service-image-column img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.em-service-image-placeholder {
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.em-service-info-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.em-service-info-grid {
    display: grid;
    gap: 16px;
}

.em-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.em-info-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.em-info-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
}

.em-service-description-full {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.em-service-description-full h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.em-service-description-full p {
    margin: 0;
    line-height: 1.6;
    color: #374151;
}

.em-treatment-content { padding: 16px 0; }
.em-treatment-content h4 { margin: 0 0 16px 0; font-size: 16px; font-weight: 600; color: #1a1a1a; }
.em-treatment-content ul { list-style: none; padding: 0; margin: 0; }
.em-treatment-content li { padding: 8px 0; line-height: 1.5; color: #374151; border-bottom: 1px solid #f3f4f6; }
.em-treatment-content li:last-child { border-bottom: none; }
.em-aftercare-content { padding: 16px 0; }
.em-aftercare-content h4 { margin: 0 0 16px 0; font-size: 16px; font-weight: 600; color: #1a1a1a; }
.em-aftercare-content p { line-height: 1.7; color: #374151; }
.em-service-modal-footer { padding: 16px 24px; border-top: 1px solid #e5e7eb; }

@media (max-width: 768px) {
    .em-service-overview { grid-template-columns: 1fr; }
    .em-service-image-column img, .em-service-image-placeholder { height: 200px; }
}

/* ============================
   CART
   ============================ */
.em-cart-items { margin-bottom: 16px; }
.em-cart-empty { text-align: center; color: #9ca3af; padding: 16px; }
.em-cart-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.em-cart-item:last-child { border-bottom: none; }
.em-cart-item-details h5 { margin: 0 0 4px 0; font-size: 14px; font-weight: 600; }
.em-cart-item-details p { margin: 0; font-size: 12px; color: #6b7280; }
.em-cart-item-actions { display: flex; align-items: center; gap: 8px; }
.em-cart-item-price { font-weight: 600; }
.em-cart-remove { background: none; border: none; font-size: 22px; color: #9ca3af; cursor: pointer; line-height: 1; }
.em-cart-remove:hover { color: #ef4444; }
.em-cart-total-section { border-top: 2px solid #e5e7eb; padding-top: 16px; margin-top: 16px; }
.em-cart-total-row { display: flex; justify-content: space-between; align-items: flex-start; }
.em-cart-total-with-time { display: flex; flex-direction: column; gap: 2px; }
.em-cart-total-label { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.em-cart-total-time { font-size: 13px; font-weight: 600; color: #6b7280; }
.em-cart-total-price { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.em-cart-total { color: #1a1a1a; }

/* ============================
   BUTTONS
   ============================ */
.em-btn { padding: 12px 24px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.em-btn-primary { background: #000; color: #fff; }
.em-btn-primary:hover { background: #374151; }
.em-btn-disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.em-continue-btn { width: 100%; margin-top: 16px; }
.em-back-btn { background: #f3f4f6; color: #374151; padding: 8px 16px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 12px; }
.em-back-btn:hover { background: #e5e7eb; }

/* ============================
   STAFF SELECTION
   ============================ */
.em-booking-step-2 { display: none; }
.em-staff-list { display: grid; gap: 12px; }
.em-staff-card { background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 16px; display: flex; align-items: flex-start; gap: 16px; transition: all 0.2s; }
.em-staff-card:hover { border-color: #000; }
.em-staff-icon { width: 50px; height: 50px; background: #f3f4f6; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.em-staff-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.em-staff-avatar-placeholder { width: 50px; height: 50px; background: #e5e7eb; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.em-staff-info { flex: 1; }
.em-staff-info h4 { margin: 0 0 8px 0; font-size: 16px; font-weight: 600; }
.em-staff-info p { margin: 0; font-size: 13px; color: #6b7280; }
.em-staff-services { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.em-service-checkbox { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; padding: 2px 0; }
.em-service-checkbox.em-service-disabled { opacity: 0.4; cursor: not-allowed; }
.em-service-checkbox input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.em-service-checkbox.em-service-disabled input[type="checkbox"] { cursor: not-allowed; }
.em-staff-select-btn { background: #000; color: #fff; border: none; padding: 8px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; flex-shrink: 0; align-self: flex-start; font-size: 13px; }
.em-staff-select-btn:hover { background: #374151; }
.em-continue-to-time-btn.em-btn-disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================
   DATE/TIME SELECTION
   ============================ */
.em-booking-step-3 { display: none; }
.em-datetime-selection-title { font-size: 20px; font-weight: 700; margin: 0 0 16px 0; letter-spacing: -0.3px; }
.em-calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.em-calendar-month-year { font-size: 18px; font-weight: 600; }
.em-calendar-nav { display: flex; gap: 8px; }
.em-calendar-prev, .em-calendar-next { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; border: none; cursor: pointer; font-size: 16px; }
.em-calendar-prev:hover, .em-calendar-next:hover { background: #e5e7eb; }
.em-calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.em-calendar-day-col { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; cursor: pointer; transition: all 0.2s; text-align: center; }
.em-calendar-day-col:hover:not(.em-calendar-day-disabled) { border-color: #000; background: #f9fafb; }
.em-calendar-day-col.em-calendar-day-selected { background: #000; color: #fff; border-color: #000; }
.em-calendar-day-col.em-calendar-day-disabled { opacity: 0.3; cursor: not-allowed; }
.em-calendar-day-col.em-calendar-day-disabled:hover { border-color: #e5e7eb; background: transparent; }
.em-calendar-day-header { display: flex; flex-direction: column; gap: 2px; }
.em-day-name { font-size: 12px; font-weight: 500; color: #6b7280; }
.em-calendar-day-selected .em-day-name { color: #fff; }
.em-day-number { font-size: 20px; font-weight: 700; }
.em-time-selection { display: none; margin-top: 20px; }
.em-time-selection h4 { font-size: 16px; font-weight: 600; margin: 0 0 12px 0; }
.em-time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.em-time-slot { padding: 10px; background: #fff; border: 2px solid #e5e7eb; border-radius: 8px; text-align: center; cursor: pointer; font-weight: 500; transition: all 0.2s; font-size: 14px; }
.em-time-slot:hover { border-color: #000; }
.em-time-slot-selected { background: #000; color: #fff; border-color: #000; }

/* ============================
   CONFIRMATION
   ============================ */
.em-booking-step-4 { display: none; }
.em-confirmation-title { font-size: 20px; margin: 0 0 20px 0; }
.em-confirmation-summary { background: #f9fafb; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.em-confirmation-business h3 { margin: 0 0 6px 0; font-size: 18px; }
.em-confirmation-business p { margin: 0; color: #6b7280; }
.em-confirmation-datetime { margin: 16px 0; padding: 16px 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.em-confirmation-datetime p { margin: 6px 0; font-size: 15px; }
.em-confirmation-services { margin: 16px 0; }
.em-confirmation-service { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e5e7eb; }
.em-confirmation-service:last-child { border-bottom: none; }
.em-confirmation-service-details h5 { margin: 0 0 2px 0; font-size: 15px; }
.em-confirmation-service-details p { margin: 0; font-size: 13px; color: #6b7280; }
.em-confirmation-service-price { font-weight: 700; font-size: 15px; }
.em-confirmation-total { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 2px solid #e5e7eb; font-size: 18px; font-weight: 700; }
.em-customer-form { background: #fff; border-radius: 12px; padding: 20px; }
.em-customer-form h4 { margin: 0 0 16px 0; font-size: 16px; }
.em-form-group { margin-bottom: 16px; }
.em-form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.em-form-group input { width: 100%; padding: 10px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; }
.em-form-group input:focus { outline: none; border-color: #000; }
.em-submit-booking-btn { width: 100%; margin-top: 8px; }

/* ============================
   SUCCESS
   ============================ */
.em-booking-success { display: none; text-align: center; padding: 40px 30px; min-height: 50vh; flex-direction: column; align-items: center; justify-content: center; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; max-width: 500px; background: white; z-index: 9999; }
.em-booking-success.active { display: flex !important; }
.em-booking-success .em-success-icon { width: 100px; height: 100px; background: #10b981; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 52px; color: #fff; margin-bottom: 30px; }
.em-booking-success h2 { font-size: 28px; margin: 0 0 16px 0; }
.em-booking-success p { font-size: 16px; color: #6b7280; margin-bottom: 30px; max-width: 500px; }

/* ============================
   SPINNER
   ============================ */
.em-loading-spinner { text-align: center; padding: 30px 16px; }
.em-spinner { border: 3px solid #f3f4f6; border-top: 3px solid #000; border-radius: 50%; width: 32px; height: 32px; animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.em-loading-spinner p { color: #6b7280; font-size: 13px; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .em-booking-content { grid-template-columns: 1fr; }
    .em-booking-sidebar { position: static; }
}

@media (max-width: 768px) {
    .em-online-booking-wrapper { padding: 10px 12px; }
    .em-booking-header h1 { font-size: 20px; }
    .em-step-label { display: none; }
    .em-category-filters { flex-wrap: nowrap; overflow-x: auto; }
    .em-time-slots { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .em-service-card-row { padding: 8px 2px; }
}

/* ============================
   MORE INFO LINK & EXPAND
   ============================ */
.em-more-info-link {
    display: inline-block;
    font-size: 12px;
    color: #999;
    text-decoration: none;
    margin-top: 3px;
    cursor: pointer;
    transition: color 0.15s;
}

.em-more-info-link:hover {
    color: #000;
}

.em-service-expand {
    padding: 0 4px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.em-expand-section {
    margin-bottom: 8px;
}

.em-expand-section strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.em-expand-section p {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.em-expand-meta {
    font-size: 12px;
    color: #999;
}

/* Tjänstebild (AI-bilder 2026-10-12) */
.em-service-thumb{flex:0 0 72px;width:72px;height:72px;border-radius:12px;overflow:hidden;cursor:pointer;background:#f3efe9}
.em-service-thumb img{width:100%;height:100%;object-fit:cover;display:block}
@media (max-width:600px){.em-service-thumb{flex-basis:56px;width:56px;height:56px}}

/* Kampanjer (2026-10-14) */
.em-campaign-banner{display:flex;gap:12px;align-items:center;background:#fff8e6;border:1px solid #f1d58a;border-radius:12px;padding:12px 16px;margin:0 0 14px;font-size:14px;color:#5b4300;line-height:1.4}
.em-campaign-badge{display:inline-block;background:#e11d48;color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px;letter-spacing:.03em;white-space:nowrap}
.em-service-price.em-has-campaign{display:flex;flex-direction:column;align-items:flex-end;gap:2px;line-height:1.2}
.em-service-price.em-has-campaign s{color:#9ca3af;font-weight:400;font-size:13px}
.em-service-price.em-has-campaign b{color:#e11d48}
.em-service-price.em-has-campaign .em-campaign-badge{font-size:10px;padding:2px 7px}
