/* A new owner's first steps on the profile: «С чего начать» (profile_includes/start_card.html) and the owner's
   empty states with a next step. Page content only: no fixed layers, the window hierarchy is untouched. */

.profile-start {
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    color: #0f172a;
}
.profile-start[hidden] { display: none !important; }

/* «С чего начать» */
.profile-start { padding: 20px 22px 22px; }
.profile-start__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-start__heading { min-width: 0; }
.profile-start__eyebrow { margin: 0 0 4px; color: #ea580c; font-size: 12px; font-weight: 800; line-height: 1.2; }
.profile-start h2 { margin: 0; font-size: 20px; font-weight: 850; line-height: 1.2; letter-spacing: -.01em; }
.profile-start__lead { margin: 6px 0 0; color: #64748b; font-size: 14px; font-weight: 550; line-height: 1.45; }
.profile-start__close {
    display: inline-flex;
    flex: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}
.profile-start__close svg { width: 18px; height: 18px; }
.profile-start__close:hover { background: #e2e8f0; color: #0f172a; }
.profile-start__progress { height: 4px; margin: 16px 0 14px; overflow: hidden; border-radius: 999px; background: #eef2f7; }
.profile-start__progress span { display: block; height: 100%; border-radius: inherit; background: #f97316; }

.profile-start__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.profile-start__step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #eef0f4;
    border-radius: 18px;
    background: #f8fafc;
}
.profile-start__step.is-done { border-color: #bbf7d0; background: #f0fdf4; }
.profile-start__mark {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff1e8;
    color: #c2410c;
    font-size: 14px;
    font-weight: 850;
}
.profile-start__step.is-done .profile-start__mark { background: #16a34a; color: #fff; }
.profile-start__mark svg { width: 16px; height: 16px; }
.profile-start__copy { min-width: 0; }
.profile-start__copy h3 { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; }
.profile-start__copy p { margin: 4px 0 0; color: #64748b; font-size: 13px; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.profile-start__step.is-done .profile-start__copy h3 { color: #166534; }
.profile-start__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* buttons of the card and the owner's empty states: one line each */
.profile-start__action,
.profile-empty__action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid #f97316;
    border-radius: 12px;
    background: #f97316;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.profile-start__action:hover,
.profile-empty__action:hover { border-color: #ea580c; background: #ea580c; color: #fff; }
.profile-start__action--quiet { border-color: #e2e8f0; background: #fff; color: #0f172a; }
.profile-start__action--quiet:hover { border-color: #cbd5e1; background: #f8fafc; color: #0f172a; }
.profile-start__action:focus-visible,
.profile-start__close:focus-visible,
.profile-empty__action:focus-visible,
.profile-completion-card__action:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }

/* the owner's empty publications: a next step; a visitor reads one calm line */
.profile-empty { padding: 40px 24px; color: #64748b; }
.profile-empty:not(.profile-empty--owner) { padding: 22px 20px; }
.profile-empty__icon { display: block; width: 44px; height: 44px; margin: 0 auto 14px; color: #cbd5e1; }
.profile-empty__title { margin: 0; color: #0f172a; font-size: 16px; font-weight: 800; line-height: 1.35; }
.profile-empty__text { max-width: 440px; margin: 6px auto 0; color: #64748b; font-size: 14px; font-weight: 550; line-height: 1.5; }
.profile-empty--owner .profile-empty__action { margin-top: 18px; }

/* empty route groups of the owner: the next step next to «Создать маршрут» */
.profile-route-empty__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.profile-page .profile-route-empty__actions .profile-route-empty__action { margin-top: 0; white-space: nowrap; }
.profile-page .profile-route-empty__action.profile-route-empty__action--quiet { border: 1px solid #e2e8f0; background: #fff; color: #0f172a; }
.profile-page .profile-route-empty__action.profile-route-empty__action--quiet:hover { background: #f8fafc; color: #0f172a; }

/* «Укажите город» in «Заполненность профиля» opens the city field */
.profile-completion-card__action {
    /* a link in the checklist row, but a target of a finger's size (the global 44px would break the row) */
    display: inline-flex;
    min-height: 28px !important;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: #ea580c;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

@media (max-width: 1023px) {
    .profile-start__steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .profile-start__step { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; row-gap: 10px; padding: 14px; }
    .profile-start__actions { grid-column: 2; margin-top: 0; }
}

@media (max-width: 767px) {
    .profile-start { padding: 16px; border-radius: 20px; }
    .profile-start h2 { font-size: 18px; }
    .profile-start__lead { font-size: 13px; }
    .profile-start__action,
    .profile-empty__action { min-height: 44px; }
    .profile-empty { padding: 32px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .profile-start__close,
    .profile-start__action,
    .profile-empty__action { transition: none; }
}

/* dark theme: the page's own dark surfaces (dark-surfaces.css tokens) */
html[data-theme="dark"] .profile-start { border-color: var(--tt-dk-line, rgba(148, 163, 184, .2)); background: var(--tt-dk-surface, #101928); color: var(--tt-dk-text, #edf3fb); box-shadow: none; }
html[data-theme="dark"] .profile-start__lead,
html[data-theme="dark"] .profile-start__copy p,
html[data-theme="dark"] .profile-empty,
html[data-theme="dark"] .profile-empty__text { color: var(--tt-dk-muted, #9fb0c6); }
html[data-theme="dark"] .profile-start__eyebrow { color: var(--tt-dk-orange-text, #ff9a5c); }
html[data-theme="dark"] .profile-start__close { background: var(--tt-dk-muted-surface, #172337); color: var(--tt-dk-soft, #c8d3e1); }
html[data-theme="dark"] .profile-start__close:hover { background: #1f2d45; color: #fff; }
html[data-theme="dark"] .profile-start__progress { background: var(--tt-dk-muted-surface, #172337); }
html[data-theme="dark"] .profile-start__step { border-color: var(--tt-dk-line, rgba(148, 163, 184, .2)); background: var(--tt-dk-raised, #121e31); }
html[data-theme="dark"] .profile-start__step.is-done { border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .08); }
html[data-theme="dark"] .profile-start__step.is-done .profile-start__copy h3 { color: #86efac; }
html[data-theme="dark"] .profile-start__mark { background: rgba(249, 115, 22, .16); color: var(--tt-dk-orange-text, #ff9a5c); }
html[data-theme="dark"] .profile-start__step.is-done .profile-start__mark { background: #16a34a; color: #fff; }
html[data-theme="dark"] .profile-start__action--quiet { border-color: rgba(148, 163, 184, .28); background: var(--tt-dk-muted-surface, #172337); color: var(--tt-dk-text, #edf3fb); }
html[data-theme="dark"] .profile-start__action--quiet:hover { border-color: rgba(148, 163, 184, .45); background: #1f2d45; color: #fff; }
html[data-theme="dark"] .profile-empty__title { color: var(--tt-dk-text, #edf3fb); }
html[data-theme="dark"] .profile-empty__icon { color: #3a4a63; }
html[data-theme="dark"] .profile-page .profile-route-empty__action.profile-route-empty__action--quiet { border-color: rgba(148, 163, 184, .28) !important; background: var(--tt-dk-muted-surface, #172337) !important; color: var(--tt-dk-text, #edf3fb) !important; }
html[data-theme="dark"] .profile-completion-card__action { color: var(--tt-dk-orange-text, #ff9a5c); }
/* «Заполненность профиля» kept its light-theme ink in the dark: dark text on a dark card */
html[data-theme="dark"] .profile-content-layout > aside .profile-completion-card h3 { color: var(--tt-dk-text, #edf3fb) !important; }
html[data-theme="dark"] .profile-completion-card__row { color: var(--tt-dk-soft, #c8d3e1); }
html[data-theme="dark"] .profile-completion-card__row span { border-color: #4b5d78; }
html[data-theme="dark"] .profile-completion-card__row.is-done span { border-color: #10b981; box-shadow: inset 0 0 0 3px var(--tt-dk-surface, #101928); }
html[data-theme="dark"] .profile-completion-card__bar { background: var(--tt-dk-muted-surface, #172337); }
