/* The self-service app's own look (Views/Shared/_Layout.cshtml), on the template's (instarc.css) and the tenant's
   colours (tenant-brand.css). The onboarding and campaign pages follow the monorepo's self-service wizard
   (InstArc-MR, SelfService wwwroot/css/styles.css, 26 November 2026): one white card a page, a numbered stepper
   with connectors, a section heading ruled under, Back and Continue in a ruled footer, a round tick when done. */

.ia-ss {
    /* The tenant's primary colour where it is branded, the template's dark otherwise; green for what is done. */
    --ia-ss-primary: var(--ia-dark);
    --ia-ss-on-primary: var(--ia-on-dark);
    --ia-ss-success: #1b7a4a;
    --ia-ss-surface: #f9f9ff;
    --ia-ss-line: #c2c7d1;
    --ia-ss-text: #111c2d;
    --ia-ss-text-soft: #42474f;
    --ia-ss-step-bg: #e7eeff;
    --ia-ss-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ia-ss-surface);
    color: var(--ia-ss-text);
}

.ia-branded .ia-ss {
    --ia-ss-primary: var(--brand-primary);
    --ia-ss-on-primary: var(--brand-on-primary);
}

.ia-ss-column {
    width: 100%;
    max-width: calc(1000px + 2rem);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------------------------------------------------------- the bar and the footer */
.ia-ss-top {
    flex: none;
    background: #ffffff;
    border-bottom: 1px solid var(--ia-ss-line);
}

.ia-ss-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.ia-ss-logo {
    display: block;
    height: 32px;
    width: auto;
    max-width: 14rem;
    object-fit: contain;
}

.ia-ss-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ia-ss-text);
}

.ia-ss-portal {
    font-size: 0.875rem;
    color: var(--ia-ss-text-soft);
}

.ia-ss-main {
    flex: 1 0 auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.ia-ss-title {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ia-ss-text);
}

.ia-ss-footer-bar {
    flex: none;
    background: #ffffff;
    border-top: 1px solid var(--ia-ss-line);
}

.ia-ss-footer {
    padding-top: 1rem;
    padding-bottom: 1rem;
    color: var(--ia-ss-text-soft);
    font-size: 0.8125rem;
    text-align: center;
}

.ia-ss-footer-text {
    margin-bottom: 0.5rem;
}

.ia-ss-footer-text p:last-child {
    margin-bottom: 0;
}

.ia-ss-card {
    border-color: var(--ia-ss-line);
}

.ia-ss-accent {
    color: var(--ia-ss-primary);
}

.ia-ss-code {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: var(--ia-border);
}

/* ---------------------------------------------------------- the wizard card (onboarding and campaign) */
.ia-ss-wizard {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--ia-ss-line);
    border-radius: 0.5rem;
    box-shadow: var(--ia-ss-shadow);
}

.ia-ss-wizard-body {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .ia-ss-wizard-body {
        padding: 3rem;
    }
}

.ia-ss-wizard-head {
    text-align: center;
    margin-bottom: 1.5rem;
}

.ia-ss-wizard-head h1 {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ia-ss-text);
}

.ia-ss-wizard-head p {
    margin: 0;
    color: var(--ia-ss-text-soft);
}

/* A step page's own heading (a campaign step): left, under the way back. */
.ia-ss-wizard-head.is-left {
    text-align: left;
}

.ia-ss-wizard-head.is-left h1 {
    margin-top: 0.5rem;
    font-size: 1.5rem;
}

.ia-ss-back {
    font-size: 0.875rem;
    color: var(--ia-ss-text-soft);
    text-decoration: none;
}

.ia-ss-back:hover {
    color: var(--ia-ss-primary);
}

/* The section's heading, ruled under. */
.ia-ss-legend {
    margin: 0 0 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--ia-ss-line);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ia-ss-text);
}

/* Labels as the monorepo's: small capitals, soft. */
.ia-ss-wizard .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ia-ss-text-soft);
    margin-bottom: 0.375rem;
}

.ia-ss-wizard .form-control:focus,
.ia-ss-wizard .form-select:focus,
.ia-ss-wizard .form-check-input:focus {
    border-color: var(--ia-ss-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ia-ss-primary) 10%, transparent);
}

.ia-ss-wizard .form-check-input:checked {
    background-color: var(--ia-ss-primary);
    border-color: var(--ia-ss-primary);
}

/* ---------------------------------------------------------- the stepper */
.ia-ss-steps {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0 0 1.5rem;
}

.ia-ss-step {
    flex: 1 1 0;
    position: relative;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ia-ss-text-soft);
}

.ia-ss-step + .ia-ss-step::before {
    content: "";
    position: absolute;
    top: 18px;
    left: calc(-50% + 18px);
    right: calc(50% + 18px);
    height: 2px;
    background: var(--ia-ss-line);
}

.ia-ss-step.is-done + .ia-ss-step::before,
.ia-ss-step.is-done::before {
    background: var(--ia-ss-success);
}

.ia-ss-step-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ia-ss-step-bg);
    color: var(--ia-ss-text-soft);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0;
    z-index: 1;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ia-ss-step.is-current .ia-ss-step-dot {
    background: var(--ia-ss-primary);
    color: var(--ia-ss-on-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ia-ss-primary) 15%, transparent);
}

.ia-ss-step.is-done .ia-ss-step-dot {
    background: var(--ia-ss-success);
    color: #ffffff;
    font-size: 1.1rem;
}

.ia-ss-step-name {
    display: block;
    margin-top: 0.5rem;
}

.ia-ss-step.is-current .ia-ss-step-name {
    color: var(--ia-ss-primary);
}

/* ---------------------------------------------------------- the footer row */
.ia-ss-wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ia-ss-line);
}

.ia-ss-wizard .btn {
    padding-block: 0.55rem;
    padding-inline: 1rem;
    font-weight: 500;
}

.ia-ss-wizard .btn-success {
    --bs-btn-bg: var(--ia-ss-success);
    --bs-btn-border-color: var(--ia-ss-success);
    --bs-btn-hover-bg: #166a40;
    --bs-btn-hover-border-color: #166a40;
    --bs-btn-disabled-bg: var(--ia-ss-success);
    --bs-btn-disabled-border-color: var(--ia-ss-success);
}

/* ---------------------------------------------------------- questions, documents, terms */
.ia-ss-question {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ia-ss-line);
}

/* The last question before the footer row: the footer's rule is enough. */
.ia-ss-question:has(+ .ia-ss-wizard-footer) {
    margin-bottom: 0;
    border-bottom: 0;
}

.ia-ss-legend .ia-ss-count {
    font-size: 0.875rem;
    font-weight: 400;
}

.ia-ss-question h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.ia-ss-doc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.ia-ss-held {
    color: var(--ia-ss-success);
}

/* The last step: a row across the width per legal document, its box to tick; the text is in its modal, which scrolls. */
.ia-ss-term {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--ia-ss-line);
    border-radius: 0.5rem;
}

.ia-ss-legal {
    font-size: 0.9375rem;
    color: var(--ia-ss-text-soft);
}

/* ---------------------------------------------------------- done, and the campaign's steps */
.ia-ss-success {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ia-ss-success) 12%, transparent);
    color: var(--ia-ss-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.ia-ss-tasks .list-group-item {
    border-color: var(--ia-ss-line);
}

.ia-ss-tasks .list-group-item-action:hover {
    background: #f0f3ff;
}

@media (max-width: 575.98px) {
    .ia-ss-step-name {
        display: none;
    }

    .ia-ss-wizard {
        border-radius: 0.25rem;
    }
}
