:root {
    --abba-ink: #0b1b12;
    --abba-ink-soft: #33483b;
    --abba-muted: #617066;
    --abba-line: rgba(6, 87, 44, 0.18);
    --abba-line-soft: rgba(6, 87, 44, 0.10);
    --abba-green: #128c45;
    --abba-green-deep: #06572c;
    --abba-green-fade: #054a25;
    --abba-leaf: #94be3d;
    --abba-leaf-soft: #edf6df;
    --abba-gold: #e8b220;
    --abba-gold-soft: #f8edc9;
    --abba-paper: #f8faf7;
    --abba-card: #ffffff;
    --abba-radius: 22px;
    --abba-radius-lg: 30px;
    --abba-shadow: 0 22px 48px rgba(20, 40, 14, 0.10);
    --abba-shadow-sm: 0 12px 28px rgba(20, 40, 14, 0.07);
    --abba-ease: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.abba-estimate-scheduler-shell,
.abba-estimate-scheduler-shell * {
    box-sizing: border-box;
}

.abba-estimate-scheduler-shell {
    max-width: 100%;
}

.abba-estimate-scheduler-shell {
    background: var(--abba-paper);
    border: 1px solid var(--abba-line);
    border-radius: var(--abba-radius-lg);
    box-shadow: var(--abba-shadow);
    color: var(--abba-ink);
    font-feature-settings: "liga" 1;
    margin: 0 auto;
    max-width: 1120px;
    overflow: hidden;
    padding: 0;
}

/* ---- Corporate hero band ---- */
.abba-estimate-scheduler-hero {
    background:
        radial-gradient(120% 160% at 88% -20%, rgba(148, 190, 61, 0.32) 0%, transparent 55%),
        linear-gradient(135deg, var(--abba-green-deep) 0%, var(--abba-green-fade) 60%, var(--abba-green) 100%);
    color: #f4f8ee;
    margin: 0;
    padding: 40px 44px;
    position: relative;
}

.abba-estimate-scheduler-hero::after {
    background: linear-gradient(90deg, var(--abba-gold), var(--abba-leaf));
    bottom: 0;
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
}

.abba-estimate-scheduler-eyebrow {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #f4f8ee;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    letter-spacing: 0.16em;
    margin-bottom: 14px;
    padding: 6px 14px;
    text-transform: uppercase;
}

.abba-estimate-scheduler-hero h2 {
    color: #fff;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.06;
    margin: 0 0 12px;
}

.abba-estimate-scheduler-hero p {
    color: rgba(244, 248, 238, 0.86);
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    max-width: 640px;
}

/* ---- Body content wrapper ---- */
.abba-estimate-scheduler-shell > .abba-estimate-scheduler-notice,
.abba-estimate-scheduler-shell > form {
    margin: 28px 44px;
}

.abba-estimate-scheduler-notice {
    border-radius: 16px;
    margin-bottom: 18px;
    padding: 16px 18px;
}

.abba-estimate-scheduler-notice--success {
    background: var(--abba-leaf-soft);
    border: 1px solid #bfd7a9;
    color: #29401b;
}

.abba-estimate-scheduler-notice--warning {
    border-color: #d99b22;
    background: #fff8e6;
    color: #5f4300;
}

.abba-estimate-scheduler-notice--error {
    background: #fdf1ef;
    border: 1px solid #e5b9b5;
    color: #7b2f27;
}

.abba-estimate-scheduler-notice ul {
    margin: 0;
    padding-left: 18px;
}

.abba-estimate-scheduler-form {
    background: transparent;
    border: 0;
    padding: 0;
}

/* ---- Step shells ---- */
.abba-estimate-scheduler-step {
    background: var(--abba-card);
    border: 1px solid var(--abba-line-soft);
    border-radius: var(--abba-radius);
    box-shadow: var(--abba-shadow-sm);
    margin-bottom: 22px;
    padding: 26px;
}

.abba-estimate-scheduler-step--centered {
    margin: 0 auto;
    max-width: 760px;
}

.abba-estimate-scheduler-step__badge {
    background: var(--abba-leaf-soft);
    border-radius: 999px;
    color: var(--abba-green);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 6px 14px;
    text-transform: uppercase;
}

.abba-estimate-scheduler-step__title {
    color: var(--abba-green-deep);
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 800;
    margin: 12px 0 6px;
}

.abba-estimate-scheduler-step__lede,
.abba-estimate-scheduler-step__note {
    color: var(--abba-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.abba-estimate-scheduler-step__note {
    border-top: 1px dashed var(--abba-line);
    margin: 18px 0 0;
    padding-top: 14px;
}

/* ---- Form fields ---- */
.abba-estimate-scheduler-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.abba-estimate-scheduler-grid__wide {
    grid-column: 1 / -1;
}

.abba-estimate-scheduler-form label {
    display: grid;
    gap: 8px;
}

.abba-estimate-scheduler-form label span {
    color: var(--abba-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.abba-estimate-scheduler-form input,
.abba-estimate-scheduler-form select,
.abba-estimate-scheduler-form textarea {
    background: var(--abba-paper);
    border: 1px solid var(--abba-line);
    border-radius: 14px;
    color: var(--abba-ink);
    font: inherit;
    min-height: 48px;
    padding: 12px 15px;
    transition: border-color var(--abba-ease), box-shadow var(--abba-ease), background var(--abba-ease);
    width: 100%;
}

.abba-estimate-scheduler-form textarea {
    min-height: 120px;
    resize: vertical;
}

.abba-estimate-scheduler-form input:focus,
.abba-estimate-scheduler-form select:focus,
.abba-estimate-scheduler-form textarea:focus {
    background: #fff;
    border-color: var(--abba-green);
    box-shadow: 0 0 0 4px rgba(18, 140, 69, 0.16);
    outline: none;
}

/* ---- Buttons ---- */
.abba-estimate-scheduler-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.abba-estimate-scheduler-actions .button {
    align-items: center;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    text-decoration: none;
    transition: transform var(--abba-ease), box-shadow var(--abba-ease), filter var(--abba-ease);
}

.abba-estimate-scheduler-actions .button-primary {
    background: var(--abba-gold);
    border: 1px solid var(--abba-gold);
    box-shadow: 0 14px 28px rgba(232, 178, 32, 0.24);
    color: var(--abba-green-deep);
}

.abba-estimate-scheduler-actions .button:not(.button-primary) {
    background: #fff;
    border: 1px solid rgba(6, 87, 44, 0.34);
    box-shadow: none;
    color: var(--abba-green-deep);
}

.abba-estimate-scheduler-actions .button-primary:hover {
    box-shadow: 0 18px 34px rgba(232, 178, 32, 0.30);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.abba-estimate-scheduler-actions .button:not(.button-primary):hover {
    background: var(--abba-green-deep);
    border-color: var(--abba-green-deep);
    box-shadow: 0 12px 24px rgba(6, 87, 44, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.abba-estimate-scheduler-actions .button[disabled],
.abba-estimate-scheduler-actions .button:disabled {
    box-shadow: none;
    cursor: not-allowed;
    filter: grayscale(0.3);
    opacity: 0.45;
    pointer-events: none;
    transform: none;
}

/* ---- Calendar two-column layout ---- */
.abba-estimate-scheduler-calendar {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
}

.abba-estimate-scheduler-calendar__sidebar {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.abba-estimate-scheduler-calendar__main {
    background: var(--abba-card);
    border: 1px solid var(--abba-line-soft);
    border-radius: var(--abba-radius);
    box-shadow: var(--abba-shadow-sm);
    padding: 24px;
}

.abba-estimate-scheduler-calendar__toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.abba-estimate-scheduler-calendar__toolbar-copy {
    flex: 1 1 160px;
    text-align: center;
}

.abba-estimate-scheduler-calendar__eyebrow {
    color: var(--abba-green);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.abba-estimate-scheduler-calendar__toolbar-title,
.abba-estimate-scheduler-calendar__panel-head h3 {
    color: var(--abba-green-deep);
    font-weight: 800;
    margin: 6px 0 0;
}

.abba-estimate-scheduler-calendar__toolbar-title {
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.1;
}

.abba-estimate-scheduler-calendar__toolbar-meta {
    color: var(--abba-muted);
    font-size: 13px;
    margin: 6px 0 0;
}

.abba-estimate-scheduler-calendar__nav-button {
    align-items: center;
    background: var(--abba-paper);
    border: 1px solid var(--abba-line);
    border-radius: 999px;
    color: var(--abba-green-deep);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    transition: border-color var(--abba-ease), box-shadow var(--abba-ease), transform var(--abba-ease);
}

.abba-estimate-scheduler-calendar__nav-button:hover {
    border-color: var(--abba-leaf);
    box-shadow: var(--abba-shadow-sm);
    transform: translateY(-1px);
}

.abba-estimate-scheduler-calendar__nav-button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
}

.abba-estimate-scheduler-calendar__viewport {
    position: relative;
}

.abba-estimate-scheduler-calendar__month {
    display: none;
}

.abba-estimate-scheduler-calendar__month.is-active {
    display: block;
}

.abba-estimate-scheduler-calendar__month-header {
    display: none;
}

.abba-estimate-scheduler-calendar__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.abba-estimate-scheduler-calendar__legend-item {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
}

.abba-estimate-scheduler-calendar__legend-item.is-available {
    background: var(--abba-leaf-soft);
    color: #244015;
}

.abba-estimate-scheduler-calendar__legend-item.is-unavailable {
    background: #eef0ec;
    color: #4e5848;
}

.abba-estimate-scheduler-calendar__weekday-row,
.abba-estimate-scheduler-calendar__grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.abba-estimate-scheduler-calendar__weekday-row {
    color: var(--abba-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.abba-estimate-scheduler-calendar__weekday-row span {
    text-align: center;
}

.abba-estimate-scheduler-calendar__day {
    background: var(--abba-card);
    border: 1px solid var(--abba-line);
    border-radius: 16px;
    color: var(--abba-ink);
    display: grid;
    font: inherit;
    gap: 4px;
    min-height: 104px;
    padding: 12px 10px;
    text-align: left;
    transition: border-color var(--abba-ease), box-shadow var(--abba-ease), transform var(--abba-ease), background var(--abba-ease);
}

.abba-estimate-scheduler-calendar__day.is-empty {
    background: transparent;
    border-color: transparent;
}

.abba-estimate-scheduler-calendar__day-number {
    color: var(--abba-green);
    font-size: 14px;
    font-weight: 800;
}

.abba-estimate-scheduler-calendar__day.is-available {
    background: linear-gradient(180deg, #fff 0%, #f6fbef 100%);
    border-color: var(--abba-leaf);
    cursor: pointer;
}

.abba-estimate-scheduler-calendar__day.is-available:hover {
    box-shadow: var(--abba-shadow-sm);
    transform: translateY(-2px);
}

.abba-estimate-scheduler-calendar__day.is-unavailable {
    background: #f3f5ef;
    color: #8a9281;
    cursor: not-allowed;
}

.abba-estimate-scheduler-calendar__day.is-unavailable .abba-estimate-scheduler-calendar__day-number {
    color: #9aa28e;
}

.abba-estimate-scheduler-calendar__day.is-selected {
    background: linear-gradient(135deg, var(--abba-green) 0%, var(--abba-green-deep) 100%);
    border-color: var(--abba-green-deep);
    box-shadow: 0 0 0 4px rgba(80, 115, 58, 0.18);
}

.abba-estimate-scheduler-calendar__day.is-selected .abba-estimate-scheduler-calendar__day-number,
.abba-estimate-scheduler-calendar__day.is-selected .abba-estimate-scheduler-calendar__day-label,
.abba-estimate-scheduler-calendar__day.is-selected .abba-estimate-scheduler-calendar__day-meta {
    color: #fff;
}

.abba-estimate-scheduler-calendar__day-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abba-estimate-scheduler-calendar__day-meta {
    color: var(--abba-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---- Sidebar panels ---- */
.abba-estimate-scheduler-calendar__panel {
    align-self: start;
    background: var(--abba-card);
    border: 1px solid var(--abba-line-soft);
    border-radius: var(--abba-radius);
    box-shadow: var(--abba-shadow-sm);
    padding: 20px;
}

.abba-estimate-scheduler-calendar__panel-head {
    border-bottom: 1px solid var(--abba-line-soft);
    margin-bottom: 14px;
    padding-bottom: 12px;
}

.abba-estimate-scheduler-calendar__panel-head h3 {
    font-size: 18px;
}

.abba-estimate-scheduler-slot-list {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.abba-estimate-scheduler-slot-option {
    display: block;
    position: relative;
}

.abba-estimate-scheduler-slot-option input {
    height: 1px;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 1px;
}

.abba-estimate-scheduler-slot-option__card {
    background: var(--abba-paper);
    border: 1px solid var(--abba-line);
    border-radius: 14px;
    color: var(--abba-ink);
    display: block;
    font-weight: 600;
    padding: 13px 16px 13px 44px;
    position: relative;
    transition: border-color var(--abba-ease), box-shadow var(--abba-ease), background var(--abba-ease);
}

.abba-estimate-scheduler-slot-option__card::before {
    border: 2px solid var(--abba-leaf);
    border-radius: 50%;
    content: '';
    height: 16px;
    left: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
}

.abba-estimate-scheduler-slot-option:hover .abba-estimate-scheduler-slot-option__card {
    border-color: var(--abba-leaf);
}

.abba-estimate-scheduler-slot-option input:checked + .abba-estimate-scheduler-slot-option__card {
    background: #fff;
    border-color: var(--abba-green);
    box-shadow: 0 0 0 4px rgba(80, 115, 58, 0.16);
}

.abba-estimate-scheduler-slot-option input:checked + .abba-estimate-scheduler-slot-option__card::before {
    background: var(--abba-green);
    border-color: var(--abba-green);
}

.abba-estimate-scheduler-calendar__empty {
    color: var(--abba-muted);
    margin: 0;
}

/* ---- Summary ---- */
.abba-estimate-scheduler-summary__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 16px;
}

.abba-estimate-scheduler-summary__grid--compact {
    grid-template-columns: 1fr;
}

.abba-estimate-scheduler-calendar__sidebar .abba-estimate-scheduler-summary__grid {
    grid-template-columns: 1fr;
}

.abba-estimate-scheduler-summary__grid dt {
    color: var(--abba-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.abba-estimate-scheduler-summary__grid dd {
    color: var(--abba-ink);
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}

.abba-estimate-scheduler-summary__wide {
    grid-column: 1 / -1;
}

/* ---- Confirmation / completion ---- */
.abba-estimate-scheduler-confirmation-card {
    background: var(--abba-card);
    border: 1px solid var(--abba-line-soft);
    border-radius: var(--abba-radius);
    box-shadow: var(--abba-shadow-sm);
    padding: 28px;
}

.abba-estimate-scheduler-confirmation-card h3 {
    color: var(--abba-green-deep);
    font-size: 28px;
    font-weight: 800;
    margin: 12px 0 12px;
}

.abba-estimate-scheduler-legacy-copy,
.abba-estimate-scheduler-confirmation-card__legacy-title {
    display: none;
}

/* ---- Focus visibility ---- */
.abba-estimate-scheduler-calendar__day:focus-visible,
.abba-estimate-scheduler-calendar__nav-button:focus-visible,
.abba-estimate-scheduler-slot-option input:focus-visible + .abba-estimate-scheduler-slot-option__card,
.abba-estimate-scheduler-actions .button:focus-visible {
    outline: 3px solid rgba(80, 115, 58, 0.4);
    outline-offset: 2px;
}

/* ---- Admin ---- */
.abba-estimate-scheduler-admin .abba-estimate-scheduler-card {
    background: #fff;
    border: 1px solid var(--abba-line);
    border-radius: 14px;
    margin: 16px 0;
    max-width: 920px;
    padding: 20px 22px;
}

.abba-estimate-scheduler-admin ul {
    list-style: disc;
    margin-left: 20px;
}

/* ---- Responsive ---- */
.abba-estimate-scheduler-search-status {
    padding: 14px 16px;
    border-left: 4px solid var(--abba-green);
    border-radius: 8px;
    background: #edf6e8;
    color: var(--abba-green-deep);
    overflow-wrap: anywhere;
}

.abba-estimate-scheduler-form[aria-busy="true"] button[type="submit"] {
    cursor: wait;
    opacity: 0.75;
}

.abba-hub-body .abba-estimate-scheduler-form {
    max-width: none;
}

.abba-hub .abba-estimate-scheduler-calendar__day {
    padding: 8px 4px;
    border-width: 1px;
    border-style: solid;
}

.abba-estimate-scheduler-calendar__day-label {
    color: var(--abba-ink);
}

@media (max-width: 1100px) {
    .abba-estimate-scheduler-calendar {
        grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
    }

    .abba-estimate-scheduler-calendar__sidebar {
        display: grid;
        gap: 18px;
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 820px) {
    .abba-estimate-scheduler-calendar__day {
        padding: 8px 4px;
    }

    .abba-estimate-scheduler-calendar__day-meta {
        display: none;
    }

    .abba-estimate-scheduler-calendar__day-label {
        font-size: 11px;
    }

    .abba-estimate-scheduler-calendar {
        grid-template-columns: 1fr;
    }

    .abba-estimate-scheduler-calendar__sidebar {
        display: grid;
        gap: 18px;
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .abba-estimate-scheduler-hero {
        padding: 30px 22px;
    }

    .abba-estimate-scheduler-shell > .abba-estimate-scheduler-notice,
    .abba-estimate-scheduler-shell > form {
        margin: 22px;
    }

    .abba-estimate-scheduler-step {
        padding: 20px;
    }

    .abba-estimate-scheduler-grid {
        grid-template-columns: 1fr;
    }

    .abba-estimate-scheduler-calendar__sidebar {
        grid-template-columns: 1fr;
    }

    .abba-estimate-scheduler-calendar__main {
        padding: 16px;
    }

    .abba-estimate-scheduler-calendar__grid,
    .abba-estimate-scheduler-calendar__weekday-row {
        gap: 6px;
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .abba-estimate-scheduler-calendar__day {
        gap: 2px;
        min-height: 84px;
        padding: 8px 6px;
    }

    .abba-estimate-scheduler-calendar__day-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .abba-hub__login:has(.abba-estimate-scheduler-shell) {
        padding: 10px;
    }

    .abba-estimate-scheduler-shell > .abba-estimate-scheduler-notice,
    .abba-estimate-scheduler-shell > form {
        margin: 8px;
    }

    .abba-estimate-scheduler-step {
        padding: 12px;
    }

    .abba-estimate-scheduler-summary__grid {
        grid-template-columns: 1fr;
    }

    .abba-estimate-scheduler-calendar__main,
    .abba-estimate-scheduler-calendar__panel {
        padding: 8px;
    }

    .abba-estimate-scheduler-calendar__grid,
    .abba-estimate-scheduler-calendar__weekday-row {
        gap: 4px;
    }

    .abba-estimate-scheduler-calendar__day {
        min-height: 64px;
        padding: 6px 3px;
    }

    .abba-estimate-scheduler-calendar__day-label,
    .abba-estimate-scheduler-calendar__day-meta {
        display: none;
    }

    .abba-estimate-scheduler-calendar__weekday-row {
        font-size: 10px;
    }

    .abba-estimate-scheduler-actions .button {
        width: 100%;
    }
}
