/* ITKapocs v27.3 – Professional Provider Onboarding UI */

.itkOnboardingShell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 54px;
}

.itkOnboardingHero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
    align-items: center;
    margin-bottom: 22px;
    padding: 34px;
    border: 1px solid rgba(191, 219, 254, .95);
    border-radius: 32px;
    background:
        radial-gradient(circle at 12% 20%, rgba(37, 99, 235, .12), transparent 30%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.88));
    box-shadow: 0 28px 80px rgba(15, 23, 42, .08);
}

.itkEyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 8px 13px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    font-weight: 900;
}

.itkHeroContent h1 {
    margin: 14px 0 10px;
    color: #0f172a;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.itkHeroContent p,
.itkHeroProgress p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.itkHeroProgress {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255,255,255,.78);
    border: 1px solid #e2e8f0;
}

.itkProgressRing {
    --size: 142px;
    --track: #eaf2ff;
    --value: #2563eb;
    width: var(--size);
    height: var(--size);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background:
        conic-gradient(var(--value) calc(var(--progress) * 1%), var(--track) 0);
    box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
}

.itkProgressRing > div {
    width: 104px;
    height: 104px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    align-content: center;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.08);
}

.itkProgressRing strong {
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
}

.itkProgressRing span {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.itkOnboardingGrid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.itkSetupPanel,
.itkFormPanel {
    border: 1px solid #dbeafe;
    border-radius: 28px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .07);
}

.itkSetupPanel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.itkFormPanel {
    padding: 24px;
}

.itkCompanyMiniCard {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f3b82, #2563eb);
    color: #fff;
    box-shadow: 0 18px 45px rgba(37,99,235,.24);
}

.itkCompanyAvatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.itkCompanyMiniCard h2 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.2;
}

.itkCompanyMiniCard p {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 13px;
    word-break: break-word;
}

.itkProgressBlock {
    margin-top: 18px;
    padding: 16px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.itkProgressTop {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.itkProgressTrack {
    height: 12px;
    border-radius: 999px;
    background: #eaf2ff;
    overflow: hidden;
}

.itkProgressTrack span,
.miniProgress.large span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    box-shadow: 0 10px 22px rgba(37,99,235,.22);
}

.itkChecklist {
    margin-top: 18px;
}

.itkChecklist h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 16px;
}

.itkChecklistItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.itkChecklistItem span {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 900;
}

.itkChecklistItem.isDone span {
    background: #dcfce7;
    color: #15803d;
}

.itkChecklistItem p {
    margin: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.itkMissingBox {
    margin-top: 18px;
    padding: 14px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.itkMissingBox strong {
    color: #9a3412;
    font-size: 13px;
}

.itkMissingBox p {
    margin: 6px 0 0;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.55;
}

.itkOnboardingForm {
    display: grid;
    gap: 18px;
}

.itkFormSection {
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.itkSectionHead {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.itkSectionHead > span {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(37,99,235,.20);
}

.itkSectionHead h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 22px;
    letter-spacing: -.02em;
}

.itkSectionHead p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.itkFieldGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
}

.itkFieldGrid label,
.itkFullField {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.itkOnboardingForm input,
.itkOnboardingForm textarea {
    width: 100%;
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 650;
    padding: 14px 15px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.itkOnboardingForm textarea {
    resize: vertical;
    min-height: 112px;
    line-height: 1.55;
}

.itkOnboardingForm input:focus,
.itkOnboardingForm textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.itkServiceAreaManager {
    display: grid;
    gap: 14px;
}

.itkAreaCommand {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 176px;
    gap: 12px;
    align-items: stretch;
}

.itkAreaSearch {
    display: grid;
    gap: 8px;
    padding: 15px 17px;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff, #f8fbff);
    box-shadow: 0 16px 35px rgba(15,23,42,.05);
}

.itkAreaSearch span {
    color: #2563eb;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.itkAreaSearch input[type="search"] {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
}

.itkAreaSearch input[type="search"]:focus {
    box-shadow: none;
}

.itkAreaStats {
    display: grid;
    align-content: center;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    color: #fff;
    box-shadow: 0 20px 42px rgba(37,99,235,.22);
}

.itkAreaStats strong {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.04em;
}

.itkAreaStats span {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 850;
    color: rgba(255,255,255,.86);
}

.itkSelectedAreas {
    min-height: 54px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    background: #f8fbff;
}

.itkCitySearchResults {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(239,246,255,.94), rgba(255,255,255,.98)),
        #fff;
    box-shadow: 0 18px 45px rgba(37,99,235,.12);
}

.itkCitySearchResults[hidden] {
    display: none;
}

.itkResultHeading {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 4px 4px;
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.itkResultHeading strong {
    color: #1d4ed8;
    font-size: 18px;
}

.itkCityResult {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15,23,42,.045);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.itkCityResult:hover {
    transform: translateY(-1px);
    border-color: #60a5fa;
    background: #fff;
    box-shadow: 0 16px 34px rgba(37,99,235,.12);
}

.itkCityResult span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.itkCityResult strong {
    font-size: 15px;
    font-weight: 950;
    line-height: 1.2;
}

.itkCityResult small {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.itkCityResult em {
    flex: 0 0 auto;
    min-width: 104px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-style: normal;
    font-size: 12px;
    font-weight: 950;
    text-align: center;
}

.itkCityResult.isPicked {
    border-color: #86efac;
    background: #f0fdf4;
}

.itkCityResult.isPicked em {
    background: #dcfce7;
    color: #15803d;
}

.itkResultEmpty,
.itkResultMore {
    padding: 13px 14px;
    border-radius: 16px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
}

.itkResultEmpty {
    border: 1px dashed #bfdbfe;
    text-align: center;
}

.selectedAreaChip,
.selectedAreaMore {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #fff;
    color: #1d4ed8;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 900;
}

.selectedAreaChip {
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.selectedAreaChip:hover {
    transform: translateY(-1px);
    border-color: #60a5fa;
    box-shadow: 0 12px 24px rgba(37,99,235,.12);
}

.selectedAreaMore {
    background: #e0f2fe;
    color: #075985;
}

.itkCityToolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.itkMiniBtn {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.itkMiniBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37,99,235,.12);
}

.itkMiniBtn.ghost {
    background: #fff;
    color: #334155;
    border-color: #e2e8f0;
}

.itkMiniBtn.ghost.danger {
    color: #b45309;
    border-color: #fed7aa;
}

.itkMiniBtn.isActive {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.itkCountyPicker {
    max-height: 156px;
    overflow: auto;
    padding: 4px;
}

.itkCityGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    max-height: 430px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.checkboxCard.itkCityCard {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 15px 16px 15px 48px;
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.checkboxCard.itkCityCard::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    transform: translateY(-50%);
    background: #fff;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.checkboxCard.itkCityCard::after {
    content: "✓";
    position: absolute;
    left: 20px;
    top: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    opacity: 0;
    transform: translateY(-50%) scale(.8);
    transition: opacity .18s ease, transform .18s ease;
}

.checkboxCard.itkCityCard:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 14px 28px rgba(15,23,42,.08);
}

.checkboxCard.itkCityCard.isChecked,
.checkboxCard.itkCityCard:has(input:checked) {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff, #fff);
    box-shadow: 0 14px 32px rgba(37,99,235,.12);
}

.checkboxCard.itkCityCard.isChecked::before,
.checkboxCard.itkCityCard:has(input:checked)::before {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37,99,235,.28);
}

.checkboxCard.itkCityCard.isChecked::after,
.checkboxCard.itkCityCard:has(input:checked)::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.checkboxCard.itkCityCard input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.itkCityText {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.itkCityText strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.2;
}

.itkCityText small {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}

.itkEmptyCitySearch {
    padding: 16px;
    border: 1px dashed #bfdbfe;
    border-radius: 18px;
    background: #f8fbff;
    color: #64748b;
    font-weight: 850;
    text-align: center;
}

.itkActionBar {
    position: sticky;
    bottom: 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 55px rgba(15,23,42,.12);
}

.itkActionBar strong {
    color: #0f172a;
}

.itkActionBar p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.itkPrimaryBtn {
    min-width: 170px;
    justify-content: center;
}

/* JS support */
.onboardingClientNotice {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
    margin-bottom: 16px;
}
.onboardingClientNotice.isVisible {
    opacity: 1;
    transform: translateY(0);
}
.alert.error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert.success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.fieldInvalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,.12) !important;
}
.fieldValid {
    border-color: #cbd5e1 !important;
}
.cityCounter,
.textareaCounter,
.onboardingLiveHint {
    color: #64748b;
    font-size: 13px;
    margin: 8px 0 12px;
}
.warningText {
    color: #b45309 !important;
}

@media (max-width: 980px) {
    .itkOnboardingHero,
    .itkOnboardingGrid {
        grid-template-columns: 1fr;
    }

    .itkSetupPanel {
        position: static;
    }

    .itkHeroProgress {
        justify-items: start;
    }

    .itkProgressRing {
        --size: 116px;
    }

    .itkProgressRing > div {
        width: 84px;
        height: 84px;
    }

    .itkProgressRing strong {
        font-size: 24px;
    }
}

@media (max-width: 720px) {
    .itkOnboardingShell {
        padding: 16px 12px 38px;
    }

    .itkOnboardingHero,
    .itkSetupPanel,
    .itkFormPanel,
    .itkFormSection {
        border-radius: 22px;
        padding: 18px;
    }

    .itkFieldGrid {
        grid-template-columns: 1fr;
    }

    .itkAreaCommand {
        grid-template-columns: 1fr;
    }

    .itkAreaStats {
        min-height: 96px;
    }

    .itkCitySearchResults {
        padding: 10px;
        border-radius: 20px;
    }

    .itkCityResult {
        align-items: stretch;
        flex-direction: column;
        padding: 15px;
    }

    .itkCityResult em {
        width: 100%;
        min-width: 0;
    }

    .itkSelectedAreas {
        max-height: 180px;
        overflow: auto;
    }

    .itkCityToolbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .itkMiniBtn {
        width: 100%;
    }

    .itkCountyPicker {
        max-height: 178px;
    }

    .itkCityGrid {
        grid-template-columns: 1fr;
        max-height: 54vh;
        padding: 8px;
    }

    .checkboxCard.itkCityCard {
        min-height: 72px;
        padding: 14px 14px 14px 46px;
    }

    .itkActionBar {
        position: static;
        flex-direction: column;
        align-items: stretch;
    }

    .itkPrimaryBtn {
        width: 100%;
    }
}
