@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --sb-bg-dark: #353535;
    --sb-bg-light: #FFFFFF;
    --sb-brand-coral: #D28271;
    --sb-text-dark: #2F364B;
    --sb-text-light: #7A849C;
    --sb-border: #E8ECEF;
    --sb-blue: #007BFF;
    --sb-blue-light: #E6F2FF;
    --sb-font: 'Outfit', sans-serif;
}

.sb-widget {
    font-family: var(--sb-font);
    display: flex;
    max-width: 900px;
    min-height: 600px;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    background: var(--sb-bg-light);
    overflow: hidden;
    color: var(--sb-text-dark);
}

.sb-widget * {
    box-sizing: border-box;
}

/* Sidebar */
.sb-sidebar {
    width: 320px;
    background: var(--sb-bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    flex-shrink: 0;
}

.sb-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 8px solid var(--sb-brand-coral);
    margin-bottom: 40px;
}

.sb-sidebar-summary {
    flex-grow: 1;
    margin-top: 20px;
}

.sb-summary-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 0;
}

.sb-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-summary-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 400;
}

.sb-summary-list svg {
    width: 22px;
    height: 22px;
    opacity: 1;
}

.sum-text {
    text-transform: capitalize;
}

/* Service Cart UI */
.sb-cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sb-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
}

.sb-cart-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sb-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.sb-cart-item-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.sb-cart-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.sb-cart-remove:hover {
    color: #FF5E5E;
    background: rgba(255, 94, 94, 0.1);
}

.sb-sidebar-bottom {
    margin-top: auto;
}

.sb-logo-text {
    font-family: 'Times New Roman', serif;
    font-size: 2.5rem;
    margin: 0;
    color: #E8ECEF;
    letter-spacing: 1px;
}

.sb-logo-highlight {
    color: var(--sb-brand-coral);
}

/* Main Area */
.sb-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--sb-bg-light);
}

.sb-content-area {
    flex-grow: 1;
    padding: 40px 50px;
    overflow-y: auto;
}

.sb-footer {
    padding: 20px 50px;
    border-top: 1px solid var(--sb-border);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: var(--sb-bg-light);
}

#sb-back {
    margin-right: auto;
}

/* Typography */
.sb-step-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sb-text-dark);
    margin-top: 0;
    margin-bottom: 40px;
    line-height: 1.4;
    max-width: 90%;
}

.sb-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.sb-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-icon-box.bg-blue {
    background: var(--sb-blue-light);
    color: var(--sb-blue);
}

.sb-icon-box svg {
    width: 24px;
    height: 24px;
}

.sb-step-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: var(--sb-text-dark);
}

.sb-step-desc {
    font-size: 1rem;
    color: var(--sb-text-light);
    margin: 0;
}

/* Forms & Selects */
.sb-form-group {
    margin-bottom: 30px;
}

.sb-form-group label {
    display: block;
    font-size: 1.1rem;
    color: var(--sb-text-dark);
    margin-bottom: 12px;
}

.sb-req {
    color: #E53E3E;
}

.sb-custom-select {
    position: relative;
    user-select: none;
}

.sb-custom-select.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.sb-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--sb-border);
    padding: 16px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--sb-text-dark);
    background: white;
}

.sb-custom-select.open .sb-select-trigger {
    border-color: var(--sb-text-dark);
}

.sb-chevron {
    width: 20px;
    height: 20px;
    color: var(--sb-text-light);
    transition: transform 0.2s;
}

.sb-custom-select.open .sb-chevron {
    transform: rotate(180deg);
}

.sb-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--sb-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 10;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.sb-custom-select.open .sb-select-options {
    display: block;
}

.sb-select-option {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--sb-border);
}

.sb-select-option:last-child {
    border-bottom: none;
}

.sb-select-option:hover {
    background: #F3F4F6;
}

.sb-select-option.selected {
    color: var(--sb-blue);
    font-weight: 500;
}

.sb-select-option.selected .sb-check-icon {
    display: block !important;
}

.sb-input {
    width: 100%;
    border: 1px solid var(--sb-border);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.sb-input:focus {
    border-color: var(--sb-text-dark);
}

.sb-phone-input-group {
    display: flex;
    border: 1px solid var(--sb-border);
    border-radius: 6px;
    overflow: hidden;
}

.sb-phone-input-group:focus-within {
    border-color: var(--sb-text-dark);
}

.sb-phone-prefix {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: white;
    border-right: 1px solid var(--sb-border);
    cursor: pointer;
}

.sb-phone-input-group .sb-input {
    border: none;
    border-radius: 0;
}

.sb-phone-input-group .sb-input:focus {
    border: none;
}

/* Calendar */
.sb-calendar {
    margin-top: 20px;
}

.sb-calendar-header {
    background: #F3F5F7;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    margin-bottom: 20px;
}

.sb-cal-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--sb-text-light);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sb-cal-btn:hover {
    color: var(--sb-text-dark);
}

.sb-cal-month {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.sb-calendar-grid {
    width: 100%;
}

.sb-cal-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--sb-text-dark);
    margin-bottom: 10px;
}

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

.sb-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid var(--sb-border);
    transition: all 0.2s;
    background: #F8FAFC;
}

.sb-cal-day:hover:not(.disabled):not(.empty) {
    border-color: var(--sb-blue);
    color: var(--sb-blue);
}

.sb-cal-day.active {
    background: var(--sb-blue);
    color: white;
    border-color: var(--sb-blue);
}

.sb-cal-day.disabled {
    color: #D1D5DB;
    background: white;
    cursor: not-allowed;
}

.sb-cal-day.empty {
    border: 1px dashed var(--sb-border);
    background: transparent;
    cursor: default;
}

/* Time Slots */
.sb-time-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar */
.sb-time-slots::-webkit-scrollbar {
    width: 6px;
}

.sb-time-slots::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 3px;
}

.sb-time-slots::-webkit-scrollbar-thumb {
    background: #353535;
    border-radius: 3px;
}

.sb-slot {
    border: 1px solid var(--sb-border);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sb-slot-time {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.sb-slot-dur {
    display: block;
    font-size: 0.8rem;
    color: var(--sb-text-light);
}

.sb-slot:hover {
    border-color: var(--sb-blue);
}

.sb-slot.active {
    background: var(--sb-blue);
    border-color: var(--sb-blue);
    color: white;
}

.sb-slot.active .sb-slot-dur {
    color: rgba(255, 255, 255, 0.8);
}

.sb-slot-disabled {
    background: #F9FAFB;
    border-color: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.6;
}

.sb-slot-disabled:hover {
    border-color: #E5E7EB;
}

.sb-slot-disabled .sb-slot-dur {
    color: #9CA3AF;
}

/* Buttons */
.sb-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.sb-btn-primary {
    background: var(--sb-text-dark);
    color: white;
}

.sb-btn-primary:hover:not(:disabled) {
    background: #1A1F2E;
}

.sb-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sb-btn-secondary {
    background: #F3F5F7;
    color: var(--sb-text-dark);
}

.sb-btn-secondary:hover {
    background: #E8ECEF;
}

.sb-loading-inline {
    padding: 12px 16px;
    color: var(--sb-text-light);
    font-size: 0.9rem;
}

.sb-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.sb-message-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.sb-success-state {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.sb-success-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.sb-receipt {
    background: #fff;
    border: 1px solid var(--sb-border);
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.sb-invoice-header {
    text-align: center;
    margin-bottom: 30px;
}

.sb-invoice-header h2 {
    font-family: 'Times New Roman', serif;
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: normal;
    color: #000;
}

.sb-invoice-divider {
    border-bottom: 2px solid #F37D24;
    width: 60%;
    margin: 0 auto;
}

.sb-inv-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.sb-inv-col-left {
    flex: 1;
}

.sb-inv-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sb-inv-orange-title {
    color: #F37D24;
    font-size: 14px;
    margin: 0 0 10px 0;
    font-weight: bold;
    text-transform: uppercase;
}

.sb-inv-text {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.sb-inv-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 5px;
    font-size: 14px;
}

.sb-inv-orange-label {
    color: #F37D24;
    font-weight: bold;
    margin-right: 20px;
    width: 140px;
    text-align: right;
}

.sb-inv-val {
    width: 120px;
    text-align: left;
    color: #333;
}

.sb-inv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.sb-inv-table th {
    color: #F37D24;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 2px solid #F37D24;
    padding: 10px 5px;
    text-align: center;
}

.sb-inv-table td {
    padding: 15px 5px;
    text-align: center;
    font-size: 14px;
    border-bottom: 2px solid #F37D24;
    color: #333;
}

.sb-inv-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 20px;
    padding-right: 5px;
}

.sb-inv-sum-row {
    display: flex;
    justify-content: space-between;
    width: 250px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.sb-inv-total-row {
    margin-top: 15px;
    align-items: center;
}

.sb-inv-orange-total {
    color: #F37D24;
    font-size: 24px;
}

.sb-inv-thanks {
    text-align: center;
    margin-top: 50px;
    font-style: italic;
    font-size: 14px;
    color: #333;
}

.sb-receipt-footer {
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

@media print {
    body>* {
        display: none !important;
    }

    body .sb-widget {
        display: block !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sb-widget .sb-sidebar,
    .sb-widget .sb-footer,
    .sb-widget .sb-step {
        display: none !important;
    }

    #sb-success-state,
    #sb-receipt-card {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #sb-receipt-card * {
        visibility: visible !important;
    }

    .sb-receipt-footer {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .sb-widget {
        flex-direction: column;
    }

    .sb-sidebar {
        width: 100%;
        padding: 20px;
    }

    .sb-content-area,
    .sb-footer {
        padding: 20px;
    }

    .sb-time-slots {
        grid-template-columns: 1fr 1fr;
    }

    /* ── Receipt / Invoice responsive ─────────────────────────── */

    /* Make the receipt card full-width with less padding */
    .sb-receipt {
        padding: 20px 16px;
        max-width: 100%;
        border-radius: 6px;
    }

    /* Smaller heading */
    .sb-invoice-header h2 {
        font-size: 22px;
    }

    /* Stack left + right columns vertically */
    .sb-inv-top {
        flex-direction: column;
        gap: 20px;
    }

    /* Right column left-align on mobile */
    .sb-inv-col-right {
        align-items: flex-start;
        margin-top: 0;
        width: 100%;
    }

    /* Each row in the right column stacks label above value */
    .sb-inv-row {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
        font-size: 13px;
    }

    /* Labels no longer right-aligned, natural flow */
    .sb-inv-orange-label {
        text-align: left;
        width: auto;
        min-width: 80px;
        margin-right: 8px;
    }

    /* Values no longer fixed-width */
    .sb-inv-val {
        width: auto;
        flex: 1;
    }

    /* Make the services table horizontally scrollable on tiny screens */
    .sb-inv-table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sb-inv-table {
        min-width: 280px;
        font-size: 13px;
    }

    .sb-inv-table th,
    .sb-inv-table td {
        padding: 10px 6px;
        font-size: 12px;
    }

    /* Thanks text smaller on mobile */
    .sb-inv-thanks {
        margin-top: 24px;
        font-size: 13px;
    }

    /* Receipt footer buttons stack */
    .sb-receipt-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .sb-receipt-footer .sb-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .sb-sidebar {
        padding: 16px;
    }

    .sb-content-area,
    .sb-footer {
        padding: 16px;
    }

    .sb-receipt {
        padding: 16px 12px;
    }

    .sb-invoice-header h2 {
        font-size: 18px;
    }

    .sb-time-slots {
        grid-template-columns: 1fr 1fr;
    }

    .sb-inv-table th,
    .sb-inv-table td {
        font-size: 11px;
        padding: 8px 4px;
    }
}