/* Helmi Booking Widget Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font, 'Inter', system-ui, sans-serif);
    background: var(--bg, #fff);
    color: var(--text, #1F2937);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.helmi-widget {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px;
}

.helmi-header { text-align: center; margin-bottom: 32px; }
.helmi-logo { max-height: 64px; margin-bottom: 16px; }
.helmi-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.helmi-subtitle { color: #6B7280; font-size: 0.95rem; }

.helmi-locked {
    text-align: center;
    padding: 48px 24px;
    background: #FEF2F2;
    border-radius: var(--radius, 12px);
    border: 1px solid #FECACA;
}
.helmi-locked-icon {
    margin-bottom: 16px;
    color: #64748b;
    display: flex;
    justify-content: center;
}
.helmi-locked-icon .helmi-icon { width: 48px; height: 48px; }
.helmi-locked p { color: #991B1B; font-size: 1rem; }

/* Steps */
.helmi-steps {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    overflow-x: auto;
}
.helmi-session-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin: -12px 0 20px;
    background: #EEF2FF;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #374151;
}
.helmi-session-bar.hidden { display: none; }
.helmi-session-status { flex: 1; min-width: 180px; }
.helmi-session-title {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 8px;
}
.helmi-session-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.helmi-session-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid #E5E7EB;
    line-height: 1.3;
}
.helmi-session-chip strong { font-weight: 600; color: #111827; }
.helmi-session-chip-muted { color: #6B7280; font-size: 0.75rem; }
.helmi-btn-sm { padding: 6px 12px; font-size: 0.8rem; align-self: center; }
.helmi-step {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 0.75rem;
    color: #9CA3AF;
    border-bottom: 3px solid #E5E7EB;
    white-space: nowrap;
    transition: all 0.3s;
}
.helmi-step span {
    display: inline-flex;
    width: 24px; height: 24px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: #E5E7EB;
    color: #6B7280;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 4px;
}
.helmi-step.active { color: var(--primary); border-color: var(--primary); }
.helmi-step.active span { background: var(--primary); color: #fff; }
.helmi-step.done { color: #10B981; border-color: #10B981; }
.helmi-step.done span { background: #10B981; color: #fff; }

.hidden { display: none !important; }

/* Services */
.helmi-services { display: grid; gap: 12px; }
.helmi-service-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius, 12px);
    cursor: pointer;
    transition: all 0.2s;
}
.helmi-service-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.helmi-service-card.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, transparent); }
.helmi-service-color { width: 4px; height: 48px; border-radius: 2px; flex-shrink: 0; }
.helmi-service-info { flex: 1; }
.helmi-service-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.helmi-service-info p { font-size: 0.85rem; color: #6B7280; }
.helmi-service-meta { text-align: right; flex-shrink: 0; }
.helmi-service-price { font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.helmi-service-duration { font-size: 0.8rem; color: #9CA3AF; }

/* Staff */
.helmi-staff-filter { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 8px; }
.helmi-staff-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}
.helmi-staff-chip.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.helmi-staff-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* Calendar */
.helmi-calendar-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; font-weight: 600;
}
.helmi-btn-icon {
    width: 36px; height: 36px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}
.helmi-btn-icon:hover { background: #F3F4F6; }

.helmi-day-group { margin-bottom: 20px; }
.helmi-day-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #374151;
    padding-bottom: 4px;
    border-bottom: 1px solid #F3F4F6;
}
.helmi-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.helmi-slot {
    padding: 10px;
    text-align: center;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.helmi-slot:hover { border-color: var(--primary); }
.helmi-slot.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.helmi-slot.disabled { opacity: 0.4; cursor: not-allowed; }
.helmi-slot-spots { font-size: 0.7rem; color: #9CA3AF; margin-top: 2px; }

/* Form */
.helmi-form { display: grid; gap: 16px; }
.helmi-form-group label { display: block; font-weight: 500; font-size: 0.875rem; margin-bottom: 6px; }
.helmi-form-group input,
.helmi-form-group textarea,
.helmi-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.helmi-form-group input:focus,
.helmi-form-group textarea:focus,
.helmi-form-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.helmi-form-group .required::after { content: ' *'; color: #EF4444; }

.helmi-promo-section {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed #E5E7EB;
}
.helmi-promo-box {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius, 12px);
    padding: 16px;
}
.helmi-promo-box-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.helmi-promo-icon {
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    color: var(--helmi-primary, #4F46E5);
}
.helmi-promo-icon .helmi-icon { width: 22px; height: 22px; }
.helmi-promo-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.helmi-promo-hint { font-size: 0.82rem; color: #6B7280; line-height: 1.4; }
.helmi-promo-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.helmi-promo-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    height: 46px;
    padding: 0 14px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.helmi-promo-input:focus {
    outline: none;
    border-color: var(--primary);
}
.helmi-promo-input.is-valid {
    border-color: #86EFAC;
    background: #F0FDF4;
}
.helmi-promo-input.is-invalid {
    border-color: #FCA5A5;
    background: #FEF2F2;
}
.helmi-promo-apply.helmi-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 76px;
    height: 46px;
    margin: 0;
    padding: 0 16px;
    font-size: 0.9rem;
    border-radius: 8px;
    white-space: nowrap;
}
.helmi-promo-feedback {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
}
.helmi-promo-feedback.is-ok {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}
.helmi-promo-feedback.is-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}
.helmi-promo-feedback strong {
    font-weight: 700;
}
.helmi-promo-note {
    margin-top: 10px;
    padding: 10px 12px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #92400E;
    line-height: 1.4;
}
.helmi-price-preview {
    margin-top: 4px;
    padding: 14px 16px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: var(--radius, 12px);
}
.helmi-price-preview-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #065F46;
    margin-bottom: 10px;
}
.helmi-price-preview-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    padding: 4px 0;
    color: #374151;
}
.helmi-price-preview-row.is-discount {
    color: #047857;
}
.helmi-price-preview-row.is-total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #A7F3D0;
    font-weight: 700;
    font-size: 1.05rem;
    color: #064E3B;
}
.helmi-price-preview-row .helmi-price-old {
    text-decoration: line-through;
    color: #9CA3AF;
    margin-right: 8px;
    font-weight: 400;
}

.helmi-legal {
    margin-top: 20px;
    margin-bottom: 4px;
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius, 12px);
}
.helmi-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 0.85rem; cursor: pointer; }
.helmi-checkbox input { margin-top: 3px; accent-color: var(--primary); }
.helmi-checkbox a { color: var(--primary); }

/* Summary */
.helmi-summary {
    background: #F9FAFB;
    border-radius: var(--radius, 12px);
    padding: 20px;
    margin-bottom: 20px;
}
.helmi-summary-row {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #E5E7EB;
    font-size: 0.9rem;
}
.helmi-summary-row:last-child { border-bottom: none; }
.helmi-summary-row.is-discount span:last-child { color: #047857; }
.helmi-summary-row.is-total { font-weight: 700; font-size: 1.05rem; }

/* Timer */
.helmi-timer { text-align: center; margin-bottom: 20px; }
.helmi-timer-circle {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 12px;
}
.helmi-timer-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.helmi-timer-circle span {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1.1rem;
}
.helmi-timer p { font-size: 0.85rem; color: #6B7280; }

/* Buttons */
.helmi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius, 12px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.helmi-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.helmi-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.helmi-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.helmi-btn-secondary {
    background: #F3F4F6;
    color: #374151;
    margin-top: 8px;
}
.helmi-nav-buttons { display: flex; gap: 12px; margin-top: 24px; }
.helmi-nav-buttons .helmi-btn { flex: 1; }

/* Success */
.helmi-success { text-align: center; padding: 40px 20px; }
.helmi-success-icon {
    width: 64px; height: 64px;
    background: #10B981;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.helmi-success-icon .helmi-icon { display: block; }
.helmi-success h2 { margin-bottom: 12px; }

/* Modal */
.helmi-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.helmi-modal-content {
    background: #fff;
    border-radius: var(--radius, 12px);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}
.helmi-modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none;
    font-size: 1.5rem; cursor: pointer;
    color: #9CA3AF;
}

.helmi-loading {
    text-align: center;
    padding: 40px;
    color: #9CA3AF;
}
.helmi-empty {
    text-align: center;
    padding: 32px;
    color: #9CA3AF;
    font-size: 0.9rem;
}

.helmi-alerts { margin: -8px 0 20px; display: grid; gap: 10px; }
.helmi-alerts.hidden { display: none !important; }
.helmi-alert {
    padding: 14px 16px;
    border-radius: var(--radius, 12px);
    font-size: 0.9rem;
    display: block;
    line-height: 1.45;
}
.helmi-alert strong { display: block; }
.helmi-alert-info { background: #EFF6FF; border-left: 4px solid #3B82F6; color: #1E3A8A; }
.helmi-alert-warning { background: #FFFBEB; border-left: 4px solid #F59E0B; color: #92400E; }
.helmi-alert-error { background: #FEF2F2; border-left: 4px solid #EF4444; color: #991B1B; }
.helmi-alert-success { background: #ECFDF5; border-left: 4px solid #10B981; color: #065F46; }
.helmi-alert p { margin: 4px 0 0; white-space: pre-wrap; }

.helmi-service-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.helmi-category { margin-bottom: 20px; }
.helmi-category-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin-bottom: 10px;
}

/* Locations */
.helmi-locations { display: grid; gap: 12px; }
.helmi-location-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius, 12px);
    cursor: pointer;
    transition: all 0.2s;
}
.helmi-location-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.helmi-location-card.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, transparent); }
.helmi-location-info { flex: 1; min-width: 0; }
.helmi-location-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.helmi-location-address { font-size: 0.85rem; color: #374151; margin-bottom: 2px; }
.helmi-location-desc { font-size: 0.82rem; color: #6B7280; }
.helmi-location-phone { font-size: 0.85rem; color: #6B7280; white-space: nowrap; flex-shrink: 0; }
.helmi-location-avail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #4B5563;
}
.helmi-location-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}
.helmi-location-dot.is-free { background: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.helmi-location-dot.is-full { background: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }
.helmi-location-avail-loading { font-size: 0.8rem; color: #9CA3AF; margin-top: 8px; }

.helmi-secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 16px;
    font-size: 0.78rem;
    color: #64748B;
}
.helmi-secure-icon { display: inline-flex; color: #64748B; }
.helmi-secure-icon .helmi-icon { width: 14px; height: 14px; }
.helmi-powered {
    text-align: center;
    padding: 14px 8px 4px;
    margin-top: 8px;
}
.helmi-powered a {
    font-size: 0.7rem;
    color: #94A3B8;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.helmi-powered a:hover { color: #64748B; text-decoration: underline; }

/* Staff picker cards */
.helmi-staff-picker { margin-bottom: 20px; }
.helmi-staff-picker-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; color: #374151; }
.helmi-staff-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.helmi-staff-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius, 12px);
    cursor: pointer;
    transition: all 0.2s;
}
.helmi-staff-card:hover { border-color: var(--primary); }
.helmi-staff-card.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.helmi-staff-card-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.helmi-staff-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 12%, #F3F4F6);
    color: var(--primary);
    font-weight: 700;
}
.helmi-staff-card-body { flex: 1; min-width: 0; }
.helmi-staff-card-name { font-weight: 600; font-size: 0.9rem; }
.helmi-staff-card-title { font-size: 0.78rem; color: #6B7280; }
.helmi-staff-card-info {
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.helmi-staff-card-info:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); border-color: var(--primary); }

/* Staff modal */
.helmi-staff-modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.helmi-staff-modal-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    font-size: 1.6rem;
}
.helmi-staff-modal-head h3 { font-size: 1.2rem; font-weight: 700; }
.helmi-staff-modal-title { font-size: 0.85rem; color: #6B7280; margin-top: 2px; }
.helmi-staff-modal-bio { font-size: 0.9rem; color: #374151; line-height: 1.6; white-space: pre-line; }
.helmi-muted { color: #9CA3AF; }

/* Payment methods */
.helmi-payment-methods { display: grid; gap: 10px; margin-bottom: 20px; }
.helmi-payment-title { font-weight: 600; font-size: 0.9rem; color: #374151; }
.helmi-payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius, 12px);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.helmi-payment-option:hover { border-color: var(--primary); }
.helmi-payment-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.helmi-payment-option input { accent-color: var(--primary); }
.helmi-payment-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

@media (max-width: 480px) {
    .helmi-widget { padding: 16px 12px; }
    .helmi-header h1 { font-size: 1.4rem; }
    .helmi-step { font-size: 0.65rem; padding: 8px 4px; }
    .helmi-slots-grid { grid-template-columns: repeat(3, 1fr); }
    .helmi-staff-cards { grid-template-columns: 1fr; }
}
