/* New Booking - Calendar grid, day timeline, booking form */

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   New Booking Page
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.new-booking-page {
    max-width: 1100px;
    margin: 0 auto;
}

/* Page header */
.nb-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.nb-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}
.nb-page-subtitle {
    color: var(--gray-500, #6b7280);
    font-size: 0.875rem;
}

/* 2-column layout: form + preview */
.nb-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Form card */
.nb-form-card {
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 14px;
    padding: 1.75rem 1.75rem 1.5rem;
}

.nb-section {
    margin-bottom: 1.75rem;
}
.nb-section:last-of-type {
    margin-bottom: 1.25rem;
}

.nb-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-700, #374151);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.nb-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.nb-field {
    display: flex;
    flex-direction: column;
}

.nb-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
}

.nb-required {
    color: #ef4444;
    margin-left: 1px;
}

.nb-input {
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--gray-900, #111827);
    background: var(--gray-50, #f9fafb);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.nb-input:focus {
    border-color: var(--blue, #c2714a);
    box-shadow: 0 0 0 3px rgba(194, 113, 74, 0.10);
    background: #fff;
}
.nb-input::placeholder {
    color: var(--gray-400, #9ca3af);
}

/* Phone validation error */
.nb-phone-error {
    display: none;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.25rem;
    line-height: 1.3;
}
.nb-input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10) !important;
}
.nb-input-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

/* Address autocomplete hint */
.nb-address-hint {
    display: none;
    font-size: 0.75rem;
    color: var(--gray-400, #9ca3af);
    margin-top: 0.25rem;
}

/* Google Places Autocomplete dropdown styling */
.pac-container {
    font-family: inherit;
    border-radius: 10px;
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin-top: 4px;
    z-index: 10000;
}
.pac-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--gray-800, #1f2937);
    border-top: 1px solid var(--gray-100, #f3f4f6);
    cursor: pointer;
    line-height: 1.4;
}
.pac-item:first-child {
    border-top: none;
}
.pac-item:hover,
.pac-item-selected {
    background: var(--blue-50, #eff3ff);
}
.pac-item-query {
    font-weight: 600;
    color: var(--gray-900, #111827);
}
.pac-icon {
    display: none; /* hide the default pin icon for cleaner look */
}
.pac-matched {
    font-weight: 600;
    color: var(--blue, #c2714a);
}

.nb-textarea {
    height: auto;
    padding: 0.625rem 0.75rem;
    resize: vertical;
    min-height: 56px;
}

.nb-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.nb-duration-wrap {
    position: relative;
}
.nb-duration-hint {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--gray-400, #9ca3af);
    pointer-events: none;
}

.nb-submit-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.nb-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
    justify-content: center;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
}

/* â”€â”€ Google Calendar-style Preview â”€â”€ */
.nb-preview-card {
    position: sticky;
    top: 1.5rem;
}

.nb-preview-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400, #9ca3af);
    margin-bottom: 0.625rem;
}

.nb-gcal-event {
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    display: flex;
}

.nb-gcal-stripe {
    width: 5px;
    flex-shrink: 0;
    background: var(--blue, #c2714a);
    border-radius: 12px 0 0 12px;
}

.nb-gcal-body {
    flex: 1;
    padding: 1rem 1.125rem;
}

.nb-gcal-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.nb-gcal-time,
.nb-gcal-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-600, #4b5563);
    margin-bottom: 0.375rem;
}

.nb-gcal-details {
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.nb-gcal-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.25rem 0;
}

.nb-gcal-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nb-gcal-detail-value {
    font-size: 0.8125rem;
    color: var(--gray-700, #374151);
    text-align: right;
}

.nb-gcal-footer {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.875rem;
    padding-top: 0.625rem;
    border-top: 1px dashed var(--gray-200, #e5e7eb);
    font-size: 0.6875rem;
    color: var(--gray-400, #9ca3af);
}

/* â”€â”€ Confirmation Screen â”€â”€ */
.nb-confirmation {
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nb-conf-icon {
    margin-bottom: 1rem;
}

.nb-conf-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900, #111827);
    margin-bottom: 0.25rem;
}

.nb-conf-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500, #6b7280);
    margin-bottom: 1.5rem;
}

.nb-conf-details {
    text-align: left;
    background: var(--gray-50, #f9fafb);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.nb-conf-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700, #374151);
    padding: 0.375rem 0;
}

.nb-conf-cal-synced {
    color: var(--green-600, #16a34a);
    font-weight: 500;
}

.nb-conf-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading spinner for submit button */
.spinner-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin-sm 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes spin-sm {
    to { transform: rotate(360deg); }
}

/* â”€â”€ New Booking Mobile â”€â”€ */
@media (max-width: 768px) {
    .nb-layout {
        grid-template-columns: 1fr;
    }
    .nb-preview-card {
        position: static;
        order: -1;
    }
    .nb-grid-2 {
        grid-template-columns: 1fr;
    }
    .nb-form-card {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }
    .nb-page-title {
        font-size: 1.25rem;
    }
    .nb-page-subtitle {
        font-size: 0.8rem;
    }
    .nb-page-header {
        margin-bottom: 1rem;
    }
    .nb-input {
        height: 46px;
        font-size: 1rem;
        border-radius: 10px;
    }
    .nb-textarea {
        min-height: 64px;
    }
    .nb-label {
        font-size: 0.72rem;
    }
    .nb-section-header {
        font-size: 0.78rem;
    }
    .nb-submit-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    .nb-submit-btn {
        width: 100%;
        height: 48px;
        font-size: 0.95rem;
    }
    .nb-confirmation {
        padding: 1.5rem 1rem;
    }
    .nb-gcal-body {
        padding: 0.875rem;
    }
    .nb-gcal-title {
        font-size: 0.875rem;
    }
    .nb-gcal-time,
    .nb-gcal-location {
        font-size: 0.78rem;
    }
    .nb-gcal-detail-label {
        font-size: 0.7rem;
    }
    .nb-gcal-detail-value {
        font-size: 0.78rem;
    }
}

/* â”€â”€ New Booking â€“ Narrow phones â”€â”€ */
@media (max-width: 480px) {
    .nb-form-card {
        padding: 1rem 0.75rem;
    }
    .nb-page-title {
        font-size: 1.15rem;
    }
    .nb-page-title i {
        width: 20px !important;
        height: 20px !important;
    }
    .nb-section {
        margin-bottom: 1.25rem;
    }
    .nb-section-header {
        font-size: 0.72rem;
        gap: 0.35rem;
    }
    .nb-grid-2 {
        gap: 0.65rem;
    }
    .nb-input {
        height: 48px;
        font-size: 1rem;
        padding: 0 0.875rem;
    }
    .nb-submit-btn {
        height: 50px;
        border-radius: 12px;
    }
    .nb-conf-actions {
        flex-direction: column;
    }
    .nb-conf-actions .btn {
        width: 100%;
    }
    .nb-preview-header {
        font-size: 0.625rem;
    }
}

/* â”€â”€ New Booking â€“ Day Timeline â”€â”€ */
.nb-timeline-wrap {
    margin-top: 1rem;
    padding: 1.15rem 1.35rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.nb-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}
.nb-timeline-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
}
.nb-timeline-title i { color: var(--blue, #c2714a); }
.nb-timeline-date-label {
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.85rem;
}
.nb-timeline { min-height: 20px; }

/* â”€â”€ Bar section â”€â”€ */
.nb-tl-bar-section { margin-bottom: 0.75rem; }
.nb-tl-bar-hint {
    text-align: center;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 6px;
    letter-spacing: 0.2px;
}
.nb-tl-track {
    position: relative;
    user-select: none;
}
.nb-tl-hours {
    position: relative;
    height: 24px;
    margin-bottom: 3px;
}
.nb-tl-hour {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}
.nb-tl-hour-major span {
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}
.nb-tl-hour-minor span {
    font-size: 0.65rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}
.nb-tl-bar {
    position: relative;
    height: 64px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.04);
}
.nb-tl-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e2e8f0;
    z-index: 0;
}

/* â”€â”€ Booked blocks â”€â”€ */
.nb-tl-block {
    position: absolute;
    top: 5px;
    bottom: 5px;
    background: #1c1917;
    border-radius: 8px;
    overflow: hidden;
    z-index: 2;
    cursor: default;
    transition: filter 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 6px rgba(194, 113, 74, 0.3);
}
.nb-tl-block:hover {
    filter: brightness(1.08);
    box-shadow: 0 3px 10px rgba(194, 113, 74, 0.4);
    z-index: 5;
}
.nb-tl-block-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 10px;
    height: 100%;
    gap: 2px;
}
.nb-tl-block-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nb-tl-block-job {
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* â”€â”€ New booking preview marker â”€â”€ */
.nb-tl-new {
    position: absolute;
    top: 5px;
    bottom: 5px;
    background: rgba(16, 185, 129, 0.12);
    border: 2.5px dashed #10b981;
    border-radius: 8px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.nb-tl-new span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nb-tl-new-overlap {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}
.nb-tl-new-overlap span { color: #dc2626; }

/* â”€â”€ Clickable gap slots â”€â”€ */
.nb-tl-gap {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, outline 0.15s;
}
.nb-tl-gap:hover {
    background: rgba(16, 185, 129, 0.12);
    outline: 2px solid rgba(16, 185, 129, 0.35);
    outline-offset: -2px;
}

/* â”€â”€ Now marker â”€â”€ */
.nb-tl-now {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: #ef4444;
    z-index: 4;
    pointer-events: none;
}
.nb-tl-now-dot {
    position: absolute;
    top: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* â”€â”€ Booking list cards below bar â”€â”€ */
.nb-tl-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0.75rem;
}
.nb-tl-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--blue, #c2714a);
    border-radius: 8px;
    transition: box-shadow 0.15s;
}
.nb-tl-list-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nb-tl-list-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--blue, #c2714a);
    white-space: nowrap;
    min-width: 60px;
}
.nb-tl-list-end {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.74rem;
    margin-left: 3px;
}
.nb-tl-list-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.nb-tl-list-job {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nb-tl-list-name {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nb-tl-demo-tag {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 600;
    color: #f59e0b;
    background: #fef3c7;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* â”€â”€ Footer row â”€â”€ */
.nb-tl-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid #e2e8f0;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.nb-tl-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.nb-tl-badge-empty { background: #ecfdf5; color: #059669; }
.nb-tl-badge-busy { background: #fdf5f1; color: var(--blue, #c2714a); }
.nb-tl-badge-demo { background: #fef3c7; color: #d97706; }
.nb-tl-legend {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.nb-tl-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #64748b;
}
.nb-tl-legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
}
.nb-tl-legend-booked { background: var(--blue, #c2714a); }
.nb-tl-legend-new { background: #10b981; border: 2px dashed #059669; box-sizing: border-box; }
.nb-tl-legend-free { background: #e2e8f0; }

@media (max-width: 768px) {
    .nb-timeline-wrap {
        padding: 0.85rem 0.75rem 0.75rem;
        border-radius: 10px;
    }
    .nb-timeline-title {
        font-size: 0.84rem;
    }
    .nb-tl-bar {
        height: 56px;
        border-radius: 10px;
    }
    .nb-tl-hours {
        height: 20px;
    }
    .nb-tl-hour-major span {
        font-size: 0.68rem;
    }
    .nb-tl-hour-minor span {
        font-size: 0.6rem;
    }
    .nb-tl-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .nb-tl-list-item {
        padding: 10px 10px;
        gap: 10px;
    }
    .nb-tl-list-time {
        font-size: 0.82rem;
        min-width: 55px;
    }
    .nb-tl-list-job {
        font-size: 0.78rem;
    }
    .nb-tl-list-name {
        font-size: 0.7rem;
    }
    .nb-tl-bar-hint {
        font-size: 0.68rem;
    }
    .nb-tl-block-time {
        font-size: 0.62rem;
    }
    .nb-tl-block-job {
        font-size: 0.56rem;
    }
    .nb-tl-new span {
        font-size: 0.62rem;
    }
}

@media (max-width: 480px) {
    .nb-timeline-wrap {
        padding: 0.75rem 0.6rem 0.65rem;
        margin-top: 0.75rem;
    }
    .nb-timeline-title {
        font-size: 0.8rem;
        gap: 0.35rem;
    }
    .nb-timeline-date-label {
        font-size: 0.75rem;
    }
    .nb-tl-bar {
        height: 52px;
    }
    .nb-tl-hours {
        height: 18px;
        margin-bottom: 2px;
    }
    .nb-tl-hour-major span {
        font-size: 0.62rem;
    }
    .nb-tl-hour-minor {
        display: none;
    }
    .nb-tl-list-item {
        padding: 8px;
        gap: 8px;
        border-left-width: 3px;
    }
    .nb-tl-list-time {
        font-size: 0.78rem;
        min-width: 48px;
    }
    .nb-tl-list-end {
        display: none;
    }
    .nb-tl-list-job {
        font-size: 0.75rem;
    }
    .nb-tl-list-name {
        font-size: 0.68rem;
    }
    .nb-tl-legend {
        gap: 0.5rem;
    }
    .nb-tl-legend-item {
        font-size: 0.65rem;
        gap: 3px;
    }
    .nb-tl-legend-swatch {
        width: 10px;
        height: 10px;
    }
    .nb-tl-badge {
        font-size: 0.62rem;
        padding: 2px 8px;
    }
    .nb-tl-bar-hint {
        font-size: 0.65rem;
    }
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Calendar Header (month nav + quick-nav buttons) */
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.cal-nav-btn {
    flex-shrink: 0;
}

.cal-quick-nav {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Day name headers */
.cal-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--gray-600);
    padding: 0.375rem;
}

.cal-day-short {
    display: none;
}

/* Mobile booking dots â€” hidden on desktop */
.cal-dots-mobile {
    display: none;
}

/* Legend */
.cal-legend {
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    border-top: 2px solid var(--gray-100);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

/* Hide "This Week" / "Next Week" on very small screens */
.cal-hide-xs {
    /* visible by default */
}

/* â”€â”€ Fixed-size Calendar Grid (no horizontal scroll) â”€â”€ */
.cal-fixed-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    width: 100%;
    table-layout: fixed;
}

.cal-fixed-cell {
    background: white;
    padding: 0.5rem;
    height: 100px;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    transition: all 0.2s;
    overflow: hidden;
    box-sizing: border-box;
}

.cal-fixed-cell:not(.empty):hover {
    background: var(--gray-50);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.cal-fixed-cell:not(.empty):hover .calendar-day-plus {
    opacity: 1 !important;
    color: var(--gray-400);
}

.cal-fixed-cell.empty {
    background: var(--gray-50);
    cursor: default !important;
    border-color: transparent;
}

.cal-fixed-cell.today {
    background: linear-gradient(135deg, #eef1f8, #d6ddf0);
    border: 2px solid #c2714a;
}

.cal-fixed-cell.past {
    opacity: 0.6;
}

.cal-day-number {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.cal-day-number.is-today {
    font-weight: 700;
    color: white;
    background: #1c1917;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Compact booking chips inside calendar cells */
.cal-booking-chip {
    background: white;
    border-radius: 3px;
    padding: 2px 4px;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: 0 0 2px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    min-width: 0;
}

.cal-booking-chip:hover {
    background: #eef1f8;
}

.cal-chip-time {
    font-size: 0.6rem;
    font-weight: 600;
    color: #c2714a;
    flex-shrink: 0;
}

.cal-chip-name {
    font-size: 0.6rem;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Day Summary Popup (overlay) */
.cal-day-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cal-day-popup-content {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: cal-popup-in 0.2s ease-out;
}

@keyframes cal-popup-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cal-popup-job {
    padding: 0.625rem 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.cal-popup-job:hover {
    background: #eef1f8;
    box-shadow: 0 2px 8px rgba(194,113,74,0.12);
}

@media (max-width: 768px) {
    /* â”€â”€ Calendar Header: tighter spacing â”€â”€ */
    .cal-header {
        padding: 0.75rem 0.5rem;
    }

    .cal-month-title {
        font-size: 1.125rem !important;
    }

    .cal-quick-nav {
        gap: 0.25rem;
        margin-top: 0.375rem;
    }

    .cal-quick-nav .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        min-height: 30px;
    }

    .cal-nav-btn {
        padding: 0.5rem;
        min-height: 36px;
        min-width: 36px;
    }

    /* â”€â”€ Day name headers: single letter â”€â”€ */
    .cal-day-header {
        font-size: 0.7rem;
        padding: 0.25rem 0;
    }

    .cal-day-full {
        display: none;
    }

    .cal-day-short {
        display: inline;
    }

    /* â”€â”€ Calendar cells: compact â”€â”€ */
    .cal-fixed-grid {
        gap: 2px;
    }

    .cal-fixed-cell {
        height: 56px;
        padding: 0.2rem;
        border-radius: 4px;
    }

    .cal-fixed-cell.today {
        border-width: 1.5px;
    }

    .cal-day-number {
        font-size: 0.7rem;
    }

    .cal-day-number.is-today {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    /* Hide text chips, show dots on mobile */
    .cal-chips-desktop {
        display: none !important;
    }

    .cal-dots-mobile {
        display: none !important;
    }

    .cal-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        display: inline-block;
        flex-shrink: 0;
    }

    .cal-dot-more {
        font-size: 0.5rem;
        font-weight: 700;
        color: var(--gray-500);
        line-height: 1;
    }

    /* Count badge â€” smaller + black on mobile */
    .cal-fixed-cell span[style*="background: #c2714a"] {
        min-width: 14px !important;
        height: 14px !important;
        font-size: 0.5rem !important;
        border-radius: 7px !important;
        padding: 0 2px !important;
        background: #1a1a1a !important;
    }

    .cal-booking-chip {
        padding: 1px 2px;
    }

    .cal-chip-time, .cal-chip-name {
        font-size: 0.55rem;
    }

    /* â”€â”€ Legend: compact â”€â”€ */
    .cal-legend {
        gap: 0.5rem;
        font-size: 0.65rem;
        padding: 0.5rem 0;
    }

    .cal-legend > div:last-child {
        display: none; /* hide keyboard shortcut hint on mobile */
    }

    /* Calendar grid container: less padding */
    .cal-fixed-grid + .cal-legend,
    .cal-fixed-grid {
        /* already handled by gap */
    }
}

/* â”€â”€ Extra-small mobile (â‰¤480px) â”€â”€ */
@media (max-width: 480px) {
    .cal-header {
        padding: 0.625rem 0.375rem;
    }

    .cal-month-title {
        font-size: 1rem !important;
    }

    .cal-hide-xs {
        display: none !important;
    }

    .cal-fixed-cell {
        height: 48px;
        padding: 0.15rem;
    }

    .cal-day-number {
        font-size: 0.65rem;
    }

    .cal-day-number.is-today {
        width: 16px;
        height: 16px;
        font-size: 0.55rem;
    }

    .cal-dot {
        width: 5px;
        height: 5px;
    }

    /* Day popup: full width bottom sheet style */
    .cal-day-popup {
        align-items: flex-end;
        padding: 0;
    }

    .cal-day-popup-content {
        border-radius: 16px 16px 0 0;
        max-width: 100%;
        padding: 1rem;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
}

/* Professional Calendar Day Cells */
.calendar-day-cell {
    background: white;
    padding: 0.75rem;
    min-height: 120px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s;
}

.calendar-day-cell:not(.empty):hover {
    background: var(--gray-50);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.calendar-day-cell:not(.empty):hover .calendar-day-plus {
    opacity: 1 !important;
    color: var(--gray-400);
}

.calendar-day-cell.empty {
    background: var(--gray-50);
    cursor: default !important;
}

.calendar-day-cell.today {
    background: linear-gradient(135deg, #eef1f8, #d6ddf0);
    border: 2px solid #c2714a;
}

.calendar-day-cell.past {
    opacity: 0.6;
}

.calendar-booking-item {
    background: white;
    border-left: 3px solid #c2714a;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.calendar-booking-item:hover {
    background: #eef1f8;
    box-shadow: 0 2px 6px rgba(194,113,74,0.15);
    transform: translateX(2px);
}

/* Professional Booking List Item */
.booking-list-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
}

.booking-list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #c2714a;
    transform: translateY(-2px);
}

.booking-list-item.past {
    opacity: 0.7;
}

.booking-list-item.past:hover {
    transform: none;
}

.calendar-day {
    background: white;
    padding: 0.5rem;
    min-height: 100px;
    font-size: 0.875rem;
}

.calendar-day-header {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.booking-item {
    padding: 0.375rem 0.5rem;
    background: var(--blue-50);
    border-left: 3px solid var(--blue-600);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

/* ── Customer search dropdown ── */
.nb-customer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: white;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-height: 240px;
    overflow-y: auto;
    margin-top: 2px;
}
.nb-customer-option {
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    transition: background 0.1s;
}
.nb-customer-option:hover,
.nb-customer-option.highlighted {
    background: #f5f3f0;
}
.nb-customer-option:first-child { border-radius: 8px 8px 0 0; }
.nb-customer-option:last-child { border-radius: 0 0 8px 8px; }
.nb-customer-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1c1917;
}
.nb-customer-option-detail {
    font-size: 0.75rem;
    color: #8b8178;
    margin-top: 1px;
}

/* ── Duration preset buttons ── */
.nb-duration-presets {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.nb-dur-btn {
    padding: 0.5rem 0.875rem;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: white;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #57534e;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    min-width: 0;
    text-align: center;
}
.nb-dur-btn:hover {
    border-color: #c2714a;
    color: #c2714a;
}
.nb-dur-btn.active {
    background: #c2714a;
    border-color: #c2714a;
    color: white;
}
.nb-dur-btn-custom {
    flex: 1.2;
}
.nb-duration-custom-wrap {
    margin-top: 0.5rem;
    position: relative;
}
.nb-duration-custom-wrap .nb-input {
    padding-right: 4rem;
}

/* ── End time display ── */
.nb-end-time {
    display: block;
    font-size: 0.75rem;
    color: #8b8178;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ── Travel distance preview ── */
.nb-travel-preview {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #8b8178;
    margin-top: 0.375rem;
    padding: 0.375rem 0.5rem;
    background: #f5f3f0;
    border-radius: 6px;
}

/* ── Schedule notice (after-hours / weekend) ── */
.nb-schedule-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}
.nb-schedule-notice span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #c2714a;
    background: #fef3ee;
    border: 1px solid #fde0d0;
    border-radius: 6px;
    padding: 0.3rem 0.625rem;
}

/* ── Mobile optimisations for new features ── */
@media (max-width: 768px) {
    .nb-dur-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }
    .nb-customer-dropdown {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .nb-duration-presets {
        gap: 0.25rem;
    }
    .nb-dur-btn {
        padding: 0.4rem 0.375rem;
        font-size: 0.6875rem;
        border-radius: 6px;
    }
    .nb-dur-btn-custom {
        flex: 1;
    }
    .nb-schedule-notice span {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
}

