:root {
    --theme: #5f7d8a;
    --theme-rgb: 95, 125, 138;
    --theme-soft: rgba(95, 125, 138, 0.08);
    --theme-subtle: rgba(95, 125, 138, 0.16);
    --theme-hover: rgba(95, 125, 138, 0.88);
    --ios-bg: #f2f2f7;
    --ios-card: #ffffff;
    --ios-border: #e5e5ea;
    --ios-separator: #c6c6c8;
    --ios-text: #000000;
    --ios-text-secondary: #8e8e93;
    --ios-text-tertiary: #c7c7cc;
    --ios-blue: #007aff;
    --ios-green: #34c759;
    --ios-red: #ff3b30;
    --radius-ios-card: 14px;
    --radius-ios-btn: 14px;
    --radius-pill: 999px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Plus Jakarta Sans", "Segoe UI", Roboto, sans-serif;
    color: var(--ios-text);
    background: var(--ios-bg);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

/* iPhone Pro Max Bounded Frame Wrapper */
.ios-device-wrapper {
    display: flex;
    justify-content: center;
    height: 100%;
    max-height: 100%;
    background: var(--ios-bg);
    overflow: hidden;
}

.widget {
    width: 100%;
    max-width: 430px; /* Standard iPhone 18 Pro Max width */
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ios-bg);
    position: relative;
    padding-bottom: 0;
    overflow: hidden;
}

/* Native iOS Navigation Bar (Glassmorphic Top Bar Reaching Top Edge Flush) */
.ios-nav-bar {
    flex-shrink: 0;
    position: relative;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
    min-height: 76px;
    height: 76px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 16px 12px;
}

.nav-left {
    min-width: 75px;
    height: 32px;
    display: flex;
    align-items: center;
}

.nav-center {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

.nav-right {
    min-width: 75px;
    height: 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.nav-logo-link:hover {
    opacity: 0.8;
}

.nav-logo-link:active {
    transform: scale(0.94);
    opacity: 0.6;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: var(--ios-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-logo {
    height: 22px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Native iOS Back Button */
.ios-back-btn {
    background: transparent;
    border: none;
    color: var(--theme);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.4px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.15s ease;
}

.ios-back-btn:active {
    opacity: 0.5;
}

.ios-back-chevron {
    margin-right: 4px;
}

/* Top Step Progress Tracker (Locations, Services, Date, Provider, Booking) */
.ios-progress-tracker {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 0.5px solid var(--ios-separator);
    padding: 10px 14px 8px;
    user-select: none;
    position: relative;
    z-index: 40;
}

.tracker-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    max-width: 100%;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: default;
    flex-shrink: 0;
}

.tracker-step.clickable {
    cursor: pointer;
}

.step-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e5ea;
    color: #8e8e93;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tracker-step.active .step-indicator {
    background: var(--theme);
    color: #ffffff;
    box-shadow: 0 0 0 3px var(--theme-soft);
    transform: scale(1.05);
}

.tracker-step.completed .step-indicator {
    background: var(--theme);
    color: #ffffff;
}

.step-check {
    display: none;
}

.tracker-step.completed .step-number {
    display: none;
}

.tracker-step.completed .step-check {
    display: block;
}

.step-label {
    font-size: 10px;
    font-weight: 600;
    color: #8e8e93;
    margin-top: 4px;
    transition: color 0.2s ease;
    text-align: center;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.tracker-step.active .step-label {
    color: var(--theme);
    font-weight: 700;
}

.tracker-step.completed .step-label {
    color: var(--ios-text);
}

.tracker-line {
    flex: 1;
    height: 2px;
    background: #e5e5ea;
    margin: 0 4px 17px;
    position: relative;
    overflow: hidden;
    border-radius: 1px;
}

.tracker-line-fill {
    width: 0%;
    height: 100%;
    background: var(--theme);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tracker-line.filled .tracker-line-fill {
    width: 100%;
}

/* Section Header Typography */
.ios-section-header {
    padding: 12px 16px 8px;
}

.ios-section-sub {
    font-size: 13px;
    color: var(--ios-text-secondary);
    letter-spacing: -0.1px;
}

/* Main Body - The ONLY Scrollable Area (Scrollbar strictly starts below the progress bar) */
.widget-body {
    padding: 8px 16px 24px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

.widget-body::-webkit-scrollbar {
    width: 5px;
}

.widget-body::-webkit-scrollbar-track {
    background: transparent;
}

.widget-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
}

.widget-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.32);
}

/* Banner Alert */
.banner {
    flex-shrink: 0;
    background: #fee2e2;
    color: #991b1b;
    border: 0.5px solid #fca5a5;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin: 10px 16px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner.ok {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

/* Screen 1: Locations (app-style tile grid) */
.location-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: transparent;
}

.location-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 148px;
    padding: 18px 12px 16px;
    border: none;
    border-radius: 18px;
    background: var(--theme);
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    text-align: center;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.15s ease;
}

.location-tile.is-featured {
    grid-column: 1 / -1;
    min-height: 168px;
    padding: 28px 20px 24px;
}

.location-tile:active {
    background: #4e6a76;
}

.location-thumb-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-tile.is-featured .location-thumb-wrap {
    width: 72px;
    height: 72px;
}

.location-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.location-thumb-fallback {
    font-size: 32px;
    line-height: 1;
}

.location-info {
    width: 100%;
    min-width: 0;
}

.location-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.location-tile.is-featured .location-name {
    font-size: 17px;
}

.location-badge-count {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.82);
}

.ios-chevron-right {
    color: var(--ios-text-tertiary);
    font-size: 18px;
    font-weight: 600;
    padding-left: 6px;
}

/* Loading & Circular Spinner Indicator */
.ios-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
    gap: 12px;
}

.ios-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(95, 125, 138, 0.18);
    border-top-color: var(--theme);
    border-radius: 50%;
    animation: ios-spinner-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes ios-spinner-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ios-loading-text {
    font-size: 13px;
    color: var(--ios-text-secondary);
    font-weight: 500;
}

/* Retry Card for Failure or Empty Screens */
.ios-retry-card {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    padding: 28px 20px;
    text-align: center;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 16px;
}

.retry-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.retry-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.retry-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-text);
    margin-bottom: 4px;
}

.retry-desc {
    font-size: 13px;
    color: var(--ios-text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.ios-btn-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--theme-soft);
    color: var(--theme);
    border: 1px solid var(--theme);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ios-btn-retry:hover {
    background: var(--theme);
    color: #ffffff;
}

.ios-btn-retry svg {
    flex-shrink: 0;
}

/* Screen 2: Category Accordion List */
.category-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-accordion-card {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    border: 0.5px solid var(--ios-border);
    transition: all 0.2s ease;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: var(--ios-card);
    transition: background 0.15s ease;
    user-select: none;
}

.category-header:active {
    background: #f2f2f7;
}

.category-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--theme-soft);
    color: var(--theme);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.category-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-text);
    letter-spacing: -0.3px;
}

.category-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.category-count-pill {
    background: #f2f2f7;
    color: var(--ios-text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: var(--radius-pill);
}

.category-chevron-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f2f7;
    color: #1c1c1e;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-accordion-chevron {
    width: 16px;
    height: 16px;
    color: #1c1c1e;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    transform-origin: center;
    display: block;
}

.category-accordion-card.expanded .category-chevron-indicator {
    background: var(--theme-soft);
    color: var(--theme);
}

.category-accordion-card.expanded .category-accordion-chevron {
    color: var(--theme);
    transform: rotate(180deg);
}

.category-services-body {
    display: none;
    border-top: 0.5px solid var(--ios-separator);
}

.category-accordion-card.expanded .category-services-body {
    display: block;
}

/* Service Item inside Category Accordion */
.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--ios-separator);
    cursor: pointer;
    background: var(--ios-card);
    transition: background 0.15s ease;
    text-align: left;
    width: 100%;
    border-left: none;
    border-right: none;
    border-top: none;
}

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

.service-row:active {
    background: #f2f2f7;
}

.service-main {
    flex: 1;
    min-width: 0;
}

.service-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text);
    margin-bottom: 4px;
}

.service-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ios-text-secondary);
}

.service-price {
    font-weight: 700;
    color: var(--theme);
    background: var(--theme-soft);
    padding: 2px 6px;
    border-radius: 4px;
}

.service-desc-snippet {
    font-size: 12px;
    color: var(--ios-text-secondary);
    margin-top: 4px;
    line-height: 1.35;
}

/* Screen 3: Selected Summary & Date Picker */
.ios-summary-card {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    padding: 16px;
    margin-bottom: 14px;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.summary-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--theme);
    background: var(--theme-soft);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.summary-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ios-text);
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.summary-subtitle {
    font-size: 13px;
    color: var(--ios-text-secondary);
    margin-bottom: 12px;
}

.summary-details-row {
    display: flex;
    border-top: 0.5px solid var(--ios-separator);
    padding-top: 10px;
    gap: 16px;
}

.summary-detail-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 11px;
    color: var(--ios-text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.summary-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-text);
}

.summary-value.highlight {
    color: var(--theme);
    font-weight: 700;
}

/* Date Picker Card */
.ios-card {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    padding: 16px;
    margin-bottom: 14px;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ios-card-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ios-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.ios-date-input {
    width: 100%;
    border: 0.5px solid var(--ios-separator);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text);
    background: #f8fafc;
    transition: all 0.15s ease;
}

.ios-date-input:focus {
    outline: none;
    border-color: var(--theme);
    box-shadow: 0 0 0 3px var(--theme-subtle);
    background: #ffffff;
}

/* Screen 4: Provider Selection & Time Slots */
.date-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e5e5ea;
    color: #1c1c1e;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 6px;
}

.provider-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.provider-card {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    padding: 16px;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.provider-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--theme-soft);
    color: var(--theme);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--ios-border);
}

.provider-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.provider-meta {
    flex: 1;
    min-width: 0;
}

.provider-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-text);
    margin-bottom: 2px;
}

.provider-service-tag {
    font-size: 12px;
    color: var(--ios-text-secondary);
    margin-bottom: 2px;
}

.provider-location-tag {
    font-size: 11px;
    color: var(--ios-text-secondary);
}

.provider-price-pill {
    font-size: 14px;
    font-weight: 700;
    color: var(--theme);
    background: var(--theme-soft);
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.slots-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ios-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.slot {
    background: #f2f2f7;
    color: var(--ios-text);
    border: 0.5px solid #e5e5ea;
    border-radius: var(--radius-pill);
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.slot:hover {
    background: var(--theme-soft);
    color: var(--theme);
    border-color: var(--theme);
}

.slot.selected {
    background: var(--theme);
    color: #ffffff;
    border-color: var(--theme);
    box-shadow: 0 4px 10px var(--theme-subtle);
    transform: scale(1.02);
}

/* Empty State */
.ios-empty-state {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    padding: 36px 20px;
    text-align: center;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 16px;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ios-text);
    margin-bottom: 6px;
}

.empty-desc {
    font-size: 13px;
    color: var(--ios-text-secondary);
    margin-bottom: 20px;
    line-height: 1.45;
}

/* Bottom Action Button Area */
.ios-bottom-action {
    margin-top: 18px;
}

/* Sticky Bottom Action Bar (Pinned to viewport bottom, non-scrollable) */
.ios-sticky-bottom-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(242, 242, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    margin: 20px -16px -24px -16px;
    z-index: 45;
}

.ios-sticky-bottom-bar .ios-btn-primary {
    width: 100%;
    margin: 0;
}

.ios-btn-primary {
    width: 100%;
    height: 50px;
    background: var(--theme);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-ios-btn);
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--theme-subtle);
}

.ios-btn-primary:active {
    transform: scale(0.98);
}

.ios-btn-primary.disabled,
.ios-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.ios-btn-secondary {
    background: #f2f2f7;
    color: var(--ios-text);
    border: 0.5px solid var(--ios-border);
    border-radius: var(--radius-ios-btn);
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ios-btn-secondary:hover {
    background: #e5e5ea;
}

/* Screen 5: Confirm & Checkout */
.ticket-summary {
    background: var(--ios-card);
    border-radius: var(--radius-ios-card);
    padding: 16px;
    margin-bottom: 14px;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.confirm-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 0.5px dashed var(--ios-separator);
}

.confirm-line:last-child {
    border-bottom: none;
}

.confirm-line span {
    color: var(--ios-text-secondary);
}

.confirm-line strong {
    color: var(--ios-text);
    font-weight: 600;
    text-align: right;
}

/* iOS Segmented Control (Tabs) */
.ios-segmented-control {
    display: flex;
    background: #e5e5ea;
    border-radius: 9px;
    padding: 2px;
    margin-bottom: 14px;
}

.segment-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 7px 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-text);
    cursor: pointer;
    transition: all 0.18s ease;
}

.segment-btn.active {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0.5px 1px rgba(0, 0, 0, 0.06);
}

.ios-input-group {
    margin-bottom: 12px;
}

.ios-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-secondary);
    margin-bottom: 4px;
}

.ios-input {
    width: 100%;
    border: 0.5px solid var(--ios-separator);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ios-text);
    background: #ffffff;
    transition: all 0.15s ease;
}

.ios-input:focus {
    outline: none;
    border-color: var(--theme);
    box-shadow: 0 0 0 3px var(--theme-subtle);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.ios-link-btn {
    background: transparent;
    border: none;
    color: var(--theme);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    padding: 4px;
}

.ios-link-btn:hover {
    text-decoration: underline;
}

/* User Account Profile Card */
.account-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--theme-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ios-text);
}

.user-email {
    font-size: 12px;
    color: var(--ios-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-switch-account {
    background: #f2f2f7;
    border: 0.5px solid var(--ios-border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-secondary);
    cursor: pointer;
}

/* Gratuity Section */
.gratuity-chips {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.grat-chip {
    flex: 1;
    background: #f2f2f7;
    color: var(--ios-text);
    border: 0.5px solid var(--ios-border);
    border-radius: 10px;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.grat-chip.active {
    background: var(--theme);
    color: #ffffff;
    border-color: var(--theme);
    box-shadow: 0 2px 6px var(--theme-subtle);
}

/* Payment Method Selection (3 Checkmark Options) */
.payment-method-section {
    margin-bottom: 14px;
}

.payment-options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 14px;
}

.pay-option-row {
    background: var(--ios-card);
    border: 1px solid var(--ios-border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    width: 100%;
    text-align: left;
}

.pay-option-row:hover {
    border-color: #c7c7cc;
}

.pay-option-row.selected {
    background: var(--theme-soft);
    border-color: var(--theme);
    box-shadow: 0 0 0 1px var(--theme);
}

.pay-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pay-checkmark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--ios-separator);
    background: #ffffff;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.pay-option-row.selected .pay-checkmark {
    background: var(--theme);
    border-color: var(--theme);
    color: #ffffff;
}

.pay-option-content {
    display: flex;
    flex-direction: column;
}

.pay-option-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-text);
}

.pay-option-sub {
    font-size: 12px;
    color: var(--ios-text-secondary);
    margin-top: 1px;
}

.pay-option-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Contextual Payment Detail Cards */
.payment-detail-card {
    background: #f8fafc;
    border: 0.5px solid var(--ios-border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    animation: ios-fade-in 0.2s ease;
}

@keyframes ios-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.saved-card-banner {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme);
    margin-bottom: 8px;
}

#card-element {
    background: #ffffff;
    border: 0.5px solid var(--ios-separator);
    border-radius: 10px;
    padding: 12px;
}

.card-error-text {
    font-size: 12px;
    color: var(--ios-red);
    margin-top: 6px;
    font-weight: 500;
}

/* Gift Card Detail Box */
.giftcard-balance-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.giftcard-balance-icon {
    font-size: 26px;
}

.giftcard-balance-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ios-text-secondary);
}

.giftcard-balance-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--theme);
}

.giftcard-note, .membership-note {
    font-size: 12px;
    color: var(--ios-text-secondary);
    margin-top: 8px;
    line-height: 1.35;
}

.membership-shared-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--theme-soft);
    border: 1px solid var(--theme-subtle);
    border-radius: 10px;
}

.shared-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--theme);
    color: #ffffff;
    flex-shrink: 0;
}

.shared-badge.core {
    background: #5856d6;
}

.shared-badge.small {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
}

.shared-text {
    font-size: 12px;
    color: var(--ios-text);
    line-height: 1.35;
    flex: 1;
}

.shared-text strong {
    font-weight: 700;
    color: var(--theme);
}

/* Membership Dropdown */
.ios-input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-secondary);
    margin-bottom: 6px;
}

/* Custom In-Frame Membership Dropdown */
.custom-dropdown-wrap {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--ios-border);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.custom-dropdown-trigger:hover {
    border-color: #c7c7cc;
}

.custom-dropdown-trigger.open {
    border-color: var(--theme);
    box-shadow: 0 0 0 3px var(--theme-subtle);
}

.trigger-content {
    flex: 1;
    min-width: 0;
}

.trigger-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.trigger-plan-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ios-text);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trigger-plan-sub {
    font-size: 11.5px;
    color: var(--ios-text-secondary);
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trigger-chevron {
    color: var(--ios-text-tertiary);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-dropdown-trigger.open .trigger-chevron {
    transform: rotate(180deg);
    color: var(--theme);
}

/* In-Frame Custom Dropdown Menu (Strictly within phone frame) */
.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--ios-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    max-height: 220px;
    overflow-y: auto;
    z-index: 60;
    animation: ios-fade-in 0.18s ease;
}

.custom-dropdown-list {
    display: flex;
    flex-direction: column;
}

.custom-plan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 0.5px solid var(--ios-separator);
    transition: background 0.15s ease;
}

.custom-plan-item:last-child {
    border-bottom: none;
}

.custom-plan-item:hover {
    background: var(--ios-bg);
}

.custom-plan-item.selected {
    background: var(--theme-soft);
}

.plan-item-left {
    flex: 1;
    min-width: 0;
}

.plan-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.plan-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ios-text);
    letter-spacing: -0.2px;
}

.plan-item-sub {
    font-size: 11.5px;
    color: var(--ios-text-secondary);
    margin-top: 3px;
    line-height: 1.35;
}

.plan-item-sub strong {
    color: var(--theme);
    font-weight: 600;
}

.plan-item-check {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme);
    opacity: 0;
    flex-shrink: 0;
}

.custom-plan-item.selected .plan-item-check {
    opacity: 1;
}

.membership-select-wrap {
    position: relative;
}

.ios-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 0.5px solid var(--ios-separator);
    border-radius: 10px;
    padding: 10px 36px 10px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ios-text);
    cursor: pointer;
}

.ios-select:focus {
    outline: none;
    border-color: var(--theme);
    box-shadow: 0 0 0 3px var(--theme-subtle);
}

/* Receipt Breakdown */
.receipt-breakdown {
    background: #f8fafc;
    border: 0.5px solid var(--ios-border);
    border-radius: 10px;
    padding: 14px;
    margin-top: 14px;
}

.receipt-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--ios-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ios-text-secondary);
    padding: 3px 0;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 0.5px solid var(--ios-separator);
    font-size: 15px;
    font-weight: 800;
    color: var(--ios-text);
}

.total-amount {
    font-size: 18px;
    color: var(--theme);
}

.btn-book {
    margin-top: 16px;
}

/* Screen 6: Success Ticket */
.success-ticket {
    background: var(--ios-card);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    border: 0.5px solid var(--ios-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.success-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ios-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3);
}

.success-heading {
    font-size: 20px;
    font-weight: 800;
    color: var(--ios-text);
    margin: 0 0 6px;
}

.success-subheading {
    font-size: 13px;
    color: var(--ios-text-secondary);
    margin: 0 0 20px;
    line-height: 1.4;
}

.ticket-cutout {
    position: relative;
    margin: 16px -20px 20px;
    display: flex;
    align-items: center;
}

.cutout-left, .cutout-right {
    width: 14px;
    height: 28px;
    background: var(--ios-bg);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.cutout-left {
    left: 0;
    border-radius: 0 14px 14px 0;
    border: 0.5px solid var(--ios-border);
    border-left: none;
}

.cutout-right {
    right: 0;
    border-radius: 14px 0 0 14px;
    border: 0.5px solid var(--ios-border);
    border-right: none;
}

.ticket-perforated {
    flex: 1;
    height: 0;
    border-top: 2px dashed var(--ios-separator);
    margin: 0 16px;
}

.success-details-list {
    text-align: left;
    margin-bottom: 24px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Utilities */
.hidden {
    display: none !important;
}

@@media (max-width: 480px) {
    .widget {
        max-width: 100%;
    }
}
