/* ByTowns UI Foundation - Patch 14
   A small visual system for public/owner screens: softer cards, consistent type, refined actions. */
:root {
    --bt-ui-bg: #f7f7f8;
    --bt-ui-surface: rgba(255,255,255,.92);
    --bt-ui-surface-solid: #ffffff;
    --bt-ui-border: rgba(15,23,42,.09);
    --bt-ui-border-strong: rgba(15,23,42,.14);
    --bt-ui-text: #101114;
    --bt-ui-muted: #667085;
    --bt-ui-soft: #fff3ec;
    --bt-ui-orange: #f25e18;
    --bt-ui-orange-2: #ff6a1a;
    --bt-ui-black: #09090b;
    --bt-ui-radius: 28px;
    --bt-ui-radius-sm: 18px;
    --bt-ui-shadow: 0 20px 55px rgba(15,23,42,.08);
    --bt-ui-shadow-soft: 0 12px 32px rgba(15,23,42,.055);
    --bt-ui-focus: 0 0 0 4px rgba(242,94,24,.14);
    --bt-ui-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.bt-owner-body,
body.bt-profile-body,
.bt-business-page,
.bt-public-menu-page,
.bt-owner-page { font-family: var(--bt-ui-font); color: var(--bt-ui-text); }
body.bt-owner-body,
body.bt-profile-body { background: radial-gradient(circle at top left, #fff8f5 0, #f6f6f7 34%, #efeff1 100%); }

.bt-owner-page,
.bt-public-menu-page,
.bt-business-page { max-width: 1180px; margin-left: auto; margin-right: auto; }

/* Shared premium card feeling */
.bt-manage-card,
.bt-owner-form-card,
.bt-skills-panel,
.bt-card,
.bt-business-main-card,
.bt-public-menu-hero,
.bt-edit-hero {
    border: 1px solid var(--bt-ui-border) !important;
    border-radius: var(--bt-ui-radius) !important;
    background: var(--bt-ui-surface) !important;
    box-shadow: var(--bt-ui-shadow-soft) !important;
    backdrop-filter: blur(18px);
}

.bt-edit-hero,
.bt-public-menu-hero {
    padding: clamp(22px, 4vw, 44px) !important;
    overflow: hidden;
}
.bt-edit-hero h1,
.bt-public-menu-hero h1,
.bt-business-title h1 {
    letter-spacing: -.055em;
    line-height: .92;
}
.bt-edit-hero p,
.bt-public-menu-hero p,
.bt-skills-head p,
.bt-profile-menu-head p,
.bt-description {
    color: var(--bt-ui-muted) !important;
    line-height: 1.62;
}
.bt-owner-kicker,
.bt-public-menu-hero > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(242,94,24,.12);
    background: var(--bt-ui-soft) !important;
    color: var(--bt-ui-orange) !important;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 900;
    width: fit-content;
}

/* Unified form controls */
.bt-owner-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.bt-owner-page textarea,
.bt-owner-page select {
    min-height: 52px;
    border: 1px solid var(--bt-ui-border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: var(--bt-ui-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.bt-owner-page textarea { min-height: 96px; }
.bt-owner-page input:focus,
.bt-owner-page textarea:focus,
.bt-owner-page select:focus {
    outline: 0;
    border-color: rgba(242,94,24,.42) !important;
    box-shadow: var(--bt-ui-focus) !important;
}
.bt-owner-page label > span,
.bt-menu-owner-fields label > span { color: #1f2937; font-size: 13px; font-weight: 900; }
.bt-owner-page small { color: var(--bt-ui-muted) !important; line-height: 1.45; }

/* Unified actions */
.bt-owner-primary,
.bt-owner-secondary,
.bt-owner-danger,
.bt-owner-form-actions button,
.bt-owner-form-actions a,
.bt-action,
.bt-profile-menu-more,
.bt-public-menu-back,
.bt-owner-action {
    font-family: var(--bt-ui-font);
    border-radius: 18px !important;
    min-height: 48px;
    font-weight: 900 !important;
    letter-spacing: -.015em;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.bt-owner-primary,
.bt-owner-form-actions button,
.bt-action.is-primary {
    background: linear-gradient(135deg, var(--bt-ui-orange-2), var(--bt-ui-orange)) !important;
    color: #fff !important;
    box-shadow: 0 16px 36px rgba(242,94,24,.22) !important;
    border: 0 !important;
}
.bt-owner-action.is-dark,
.bt-action.is-dark {
    background: var(--bt-ui-black) !important;
    color: #fff !important;
    box-shadow: 0 16px 36px rgba(0,0,0,.14) !important;
}
.bt-owner-secondary,
.bt-owner-form-actions a,
.bt-action:not(.is-primary):not(.is-dark) {
    background: #fff !important;
    color: var(--bt-ui-text) !important;
    border: 1px solid var(--bt-ui-border) !important;
    box-shadow: 0 10px 22px rgba(15,23,42,.04) !important;
}
.bt-owner-danger { background: #fff1f0 !important; color: #b42318 !important; border: 1px solid rgba(180,35,24,.08) !important; }
.bt-owner-primary:hover,
.bt-owner-secondary:hover,
.bt-owner-danger:hover,
.bt-owner-form-actions button:hover,
.bt-owner-form-actions a:hover,
.bt-action:hover,
.bt-owner-action:hover,
.bt-profile-menu-more:hover { transform: translateY(-1px); }

/* File uploads */
.bt-file-upload {
    border: 1px dashed rgba(242,94,24,.26) !important;
    background: linear-gradient(180deg, #fff, #fff8f4) !important;
    border-radius: 20px !important;
    padding: 10px !important;
}
.bt-file-upload-button {
    background: var(--bt-ui-black) !important;
    color: #fff !important;
    border-radius: 16px !important;
    padding: 12px 16px !important;
    font-weight: 950 !important;
    border: 0 !important;
}
.bt-file-upload-button[data-has-file="1"] { background: var(--bt-ui-orange) !important; }
.bt-file-upload-name { color: var(--bt-ui-muted) !important; font-weight: 800 !important; }

/* Owner tools: Skills */
.bt-skill-choice-grid { gap: 10px !important; }
.bt-skill-choice {
    border-radius: 999px !important;
    border: 1px solid var(--bt-ui-border) !important;
    background: #fff !important;
    padding: 12px 15px !important;
    box-shadow: 0 8px 20px rgba(15,23,42,.035);
}
.bt-skill-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bt-skill-choice span { display: inline-flex; align-items: center; gap: 8px; }
.bt-skill-choice span::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #c9ccd2;
    box-sizing: border-box;
}
.bt-skill-choice.is-selected {
    background: #fff4ee !important;
    border-color: rgba(242,94,24,.36) !important;
    color: #111827 !important;
}
.bt-skill-choice.is-selected span::before { background: var(--bt-ui-orange); border-color: var(--bt-ui-orange); box-shadow: 0 0 0 4px rgba(242,94,24,.12); }
.bt-skills-head span { background: #fff4ee !important; color: var(--bt-ui-orange) !important; border-radius: 999px !important; }

/* Owner tools: Hours */
.bt-hours-list { gap: 10px !important; }
.bt-hours-row {
    border: 1px solid var(--bt-ui-border) !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(15,23,42,.035);
}
.bt-hours-row strong { letter-spacing: -.02em; }
.bt-hours-closed { background: #fafafa; border-radius: 16px; padding: 10px 12px; }

/* Owner tools: Menu manager */
.bt-menu-manager-grid { gap: 22px !important; }
.bt-menu-form-card,
.bt-menu-list-card { padding: clamp(16px, 2vw, 24px) !important; }
.bt-menu-owner-list { gap: 14px !important; }
.bt-menu-owner-item {
    border-radius: 26px !important;
    border: 1px solid var(--bt-ui-border) !important;
    background: #fff !important;
    box-shadow: 0 14px 34px rgba(15,23,42,.055) !important;
    overflow: hidden;
}
.bt-menu-owner-photo { border-radius: 22px !important; background: linear-gradient(135deg, #fff1e8, #f8f8f9) !important; }
.bt-menu-owner-actions { gap: 10px !important; }
.bt-menu-category-row { gap: 12px !important; }
.bt-menu-check {
    border: 1px solid var(--bt-ui-border);
    background: #fff;
    border-radius: 16px;
    padding: 10px 12px;
}
.bt-menu-check input { accent-color: var(--bt-ui-orange) !important; }
.bt-menu-owner-fields > input[type="text"]:first-of-type { font-size: 16px; font-weight: 950; }

/* Public business profile */
.bt-business-main-card { overflow: hidden; }
.bt-business-actions { gap: 10px !important; }
.bt-action {
    min-height: 54px !important;
    padding: 0 18px !important;
    text-decoration: none;
}
.bt-business-stats {
    border: 1px solid var(--bt-ui-border);
    background: rgba(255,255,255,.72);
    border-radius: 22px;
    padding: 14px 16px;
}
.bt-badge { border: 0 !important; background: #f5f6f7 !important; color: #1f2937 !important; }
.bt-badge.is-premium { background: #09090b !important; color: #fff !important; }
.bt-badge.is-verified { background: #eafaf1 !important; color: #067647 !important; }
.bt-description { font-size: 16px; }
.bt-profile-menu-head { align-items: center !important; gap: 16px !important; }
.bt-profile-menu-grid,
.bt-public-menu-list { display: grid; gap: 12px; }
.bt-profile-menu-item,
.bt-public-menu-item {
    border: 1px solid var(--bt-ui-border) !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.045) !important;
}
.bt-profile-menu-photo,
.bt-public-menu-photo { border-radius: 18px !important; background: #fff4ee !important; overflow: hidden; }
.bt-profile-menu-photo img,
.bt-public-menu-photo img { transform: scale(1.01); }
.bt-profile-menu-price,
.bt-public-menu-price {
    background: #09090b !important;
    color: #fff !important;
    border-radius: 999px !important;
    min-width: 62px;
    text-align: center;
    box-shadow: 0 12px 24px rgba(0,0,0,.14);
}
.bt-profile-menu-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    min-height: 44px;
    background: var(--bt-ui-black) !important;
    color: #fff !important;
    text-decoration: none;
}
.bt-profile-menu-more span { background: var(--bt-ui-orange); color: #fff; border-radius: 999px; padding: 3px 8px; }

/* Full public menu page */
.bt-public-menu-page { padding: 18px; }
.bt-public-menu-hero { margin-bottom: 18px; }
.bt-public-menu-category { padding: clamp(16px, 2vw, 24px) !important; margin-bottom: 14px; }
.bt-public-menu-category h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.045em; }

@media (max-width: 760px) {
    .bt-edit-hero .bt-edit-business-head,
    .bt-business-head { grid-template-columns: 1fr !important; text-align: left; }
    .bt-business-stats { width: 100%; }
    .bt-business-actions { grid-template-columns: 1fr 1fr !important; }
    .bt-action { min-height: 50px !important; }
    .bt-menu-owner-item { grid-template-columns: 1fr !important; }
    .bt-menu-owner-actions { grid-template-columns: 1fr !important; }
    .bt-menu-owner-photo { width: 100% !important; height: 190px !important; }
    .bt-profile-menu-head { align-items: stretch !important; display: grid !important; }
    .bt-profile-menu-more { width: 100%; }
}
@media (max-width: 480px) {
    .bt-business-actions { grid-template-columns: 1fr !important; }
    .bt-owner-page, .bt-public-menu-page { padding-left: 12px !important; padding-right: 12px !important; }
    .bt-edit-hero h1, .bt-public-menu-hero h1, .bt-business-title h1 { font-size: clamp(38px, 12vw, 58px) !important; }
}


/* Patch 15 mobile profile actions refinement */
.bt-profile-icon-action { font-family: var(--bt-ui-font); }
@media (max-width: 760px) {
    .bt-business-logo-wrap .bt-business-logo { width: 88px !important; height: 88px !important; border-radius: 24px !important; }
}


.bt-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* Owner tools: stronger auto-save skill selection state */
.bt-skills-autosave-hint,
.bt-skills-custom-save-note {
    margin: 8px 0 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #16803a !important;
    font-weight: 900 !important;
    font-size: .92rem !important;
}
.bt-skills-live-status {
    min-height: 22px !important;
    margin: 0 0 10px !important;
    font-weight: 950 !important;
    color: #64748b !important;
}
.bt-skills-live-status[data-status="success"] { color: #16803a !important; }
.bt-skills-live-status[data-status="error"] { color: #b42318 !important; }
.bt-skill-choice[data-bt-skill-choice] {
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
.bt-skill-choice[data-bt-skill-choice] span::before {
    width: 12px !important;
    height: 12px !important;
    background: #fff !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}
.bt-skill-choice[data-bt-skill-choice].is-selected,
.bt-skill-choice[data-bt-skill-choice]:has(input:checked) {
    background: #fff4ee !important;
    border-color: rgba(242,94,24,.62) !important;
    box-shadow: 0 14px 28px rgba(242,94,24,.14) !important;
    transform: translateY(-1px) !important;
}
.bt-skill-choice[data-bt-skill-choice].is-selected span::before,
.bt-skill-choice[data-bt-skill-choice]:has(input:checked) span::before {
    background: #050505 !important;
    border-color: #050505 !important;
    box-shadow: 0 0 0 5px rgba(242,94,24,.18) !important;
    transform: scale(1.08) !important;
}
.bt-skill-choice[data-bt-skill-choice].is-saving {
    opacity: .72 !important;
    pointer-events: none !important;
}
.bt-skill-choice[data-bt-skill-choice].is-saving span::after {
    content: "Saving...";
    margin-left: 4px;
    color: #f25e18;
    font-size: .78rem;
    font-weight: 950;
}
.bt-skill-choice[data-bt-skill-choice].is-saved {
    animation: btSkillSavedPulse .42s ease;
}
.bt-skill-choice[data-bt-skill-choice].is-error {
    border-color: rgba(180,35,24,.45) !important;
    background: #fff1f0 !important;
}
@keyframes btSkillSavedPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.035); }
    100% { transform: scale(1); }
}
