/**
 * Life Navigator questionnaire.
 *
 * Every rule is scoped to .dmn-root: the panel is injected inside an Elementor
 * container, so it has to outrank `.elementor button` and friends.
 * Typography follows the site kit — Averia Serif Libre for titles, Manrope for text.
 */

.dmn-root {
    --dmn-brand: #7d2a4b;
    --dmn-ink: #1c1c1c;
    --dmn-muted: #6b6b6b;
    --dmn-line: #e6e2db;

    width: 100%;
    font-family: "Manrope", sans-serif;
    color: var(--dmn-ink);
}

.dmn-root[hidden],
.dmn-root [hidden] {
    display: none !important;
}

.dmn-root .dmn-form {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 20px;
}

.dmn-root .dmn-form.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.dmn-root .dmn-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.dmn-root .dmn-close {
    position: absolute;
    /* Sits in the form's own top-right corner, inside the 80px/20px frame. */
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--dmn-muted);
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.dmn-root .dmn-close:hover,
.dmn-root .dmn-close:focus {
    background: rgba(0, 0, 0, 0.06);
    color: var(--dmn-ink);
}

/* Steps ------------------------------------------------------------------ */

.dmn-root .dmn-step {
    animation: dmn-fade 0.35s ease both;
}

@keyframes dmn-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dmn-root .dmn-step {
        animation: none;
    }
}

.dmn-root .dmn-eyebrow {
    margin: 0 0 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dmn-brand);
}

.dmn-root .dmn-eyebrow--left {
    text-align: left;
}

.dmn-root .dmn-title {
    margin: 0 auto 48px;
    font-family: "Averia Serif Libre", Georgia, serif;
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--dmn-ink);
}

.dmn-root .dmn-step--lead .dmn-title,
.dmn-root .dmn-step--thanks .dmn-title {
    max-width: 22ch;
}

.dmn-root .dmn-intro {
    margin: 0 auto 48px;
    max-width: 54ch;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    color: var(--dmn-muted);
}

.dmn-root .dmn-progress {
    width: 240px;
    height: 3px;
    margin: 0 auto 28px;
    border-radius: 2px;
    background: var(--dmn-line);
    overflow: hidden;
}

.dmn-root .dmn-progress span {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--dmn-brand);
    transition: width 0.35s ease;
}

.dmn-root .dmn-help {
    margin: 0 0 14px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dmn-muted);
}

/* Option cards ----------------------------------------------------------- */

.dmn-root .dmn-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto;
    max-width: 95%;
}

.dmn-root .dmn-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 20px 28px;
    border: 1px solid var(--dmn-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.dmn-root .dmn-option:hover {
    border-color: var(--dmn-brand);
}

.dmn-root .dmn-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.dmn-root .dmn-option-body {
    flex: 1;
    display: block;
}

.dmn-root .dmn-option-label {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    color: var(--neutral-black, #000);
}

.dmn-root .dmn-option-desc {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dmn-muted);
}

.dmn-root .dmn-option-mark {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 1px solid var(--dmn-line);
    border-radius: 50%;
    background: #fff;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.dmn-root .dmn-option input[type="checkbox"] ~ .dmn-option-mark {
    border-radius: 6px;
}

.dmn-root .dmn-option.is-selected {
    border-color: var(--dmn-brand);
}

.dmn-root .dmn-option.is-selected .dmn-option-mark {
    border-color: var(--dmn-brand);
    background: var(--dmn-brand)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2 4.8 8.5 9.5 3.8'/%3E%3C/svg%3E")
        center / 12px 12px no-repeat;
}

.dmn-root .dmn-option.is-focused {
    outline: 2px solid var(--dmn-brand);
    outline-offset: 2px;
}

.dmn-root .dmn-freetext {
    margin: -4px 0 0;
    animation: dmn-fade 0.25s ease both;
}

.dmn-root .dmn-field.dmn-freetext {
    margin-top: -4px;
}

.dmn-root .dmn-freetext textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--dmn-brand);
    border-radius: 12px;
    background-color: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--dmn-ink);
    resize: vertical;
}

.dmn-root .dmn-freetext textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 42, 75, 0.12);
}

.dmn-root .dmn-freetext.has-error textarea {
    border-color: #c0392b;
}

/* Fields ----------------------------------------------------------------- */

.dmn-root .dmn-field {
    margin: 0 0 16px;
    text-align: left;
}

.dmn-root .dmn-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dmn-ink);
}

.dmn-root .dmn-field input,
.dmn-root .dmn-field select,
.dmn-root .dmn-field textarea {
    display: block;
    width: 100%;
    max-width: none;
    padding: 12px 14px;
    border: 1px solid var(--dmn-line);
    border-radius: 10px;
    background-color: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--dmn-ink);
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.dmn-root .dmn-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b6b6b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.dmn-root .dmn-field input:focus,
.dmn-root .dmn-field select:focus,
.dmn-root .dmn-field textarea:focus {
    outline: none;
    border-color: var(--dmn-brand);
    box-shadow: 0 0 0 3px rgba(125, 42, 75, 0.12);
}

.dmn-root .dmn-field.has-error input,
.dmn-root .dmn-field.has-error select,
.dmn-root .dmn-field.has-error textarea {
    border-color: #c0392b;
}

.dmn-root .dmn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dmn-root .dmn-card {
    /* Same column as .dmn-options so every step lines up. */
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid var(--neutral-50, #f3f1f0);
    border-radius: 24px;
    background: var(--neutral-white, #fff);
    box-shadow: 0 8px 24px 0 rgba(28, 28, 28, 0.03);
}

.dmn-root .dmn-rule {
    display: block;
    width: 28px;
    height: 2px;
    margin-bottom: 12px;
    background: var(--dmn-brand);
}

.dmn-root .dmn-lead-sub {
    margin: 0 0 22px;
    font-size: 14px;
    color: var(--dmn-muted);
}

/* Archetype cards -------------------------------------------------------- */

/*
 * The archetype grid breaks out of the 720px form column: three cards need
 * ~1040px to stay at the 300px+ the design calls for.
 */
.dmn-root .dmn-patterns {
    position: relative;
    left: 50%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: min(1040px, calc(100vw - 40px));
    margin: 0 0 48px;
    transform: translateX(-50%);
}

.dmn-root .dmn-pattern {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.dmn-root .dmn-pattern input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dmn-root .dmn-pattern-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    border-radius: 16px;
    background: var(--dmn-card-bg, #f3f1ec);
    color: var(--dmn-card-fg, #1c1c1c);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dmn-root .dmn-pattern:hover .dmn-pattern-inner {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(28, 28, 28, 0.14);
}

.dmn-root .dmn-pattern.is-selected .dmn-pattern-inner {
    box-shadow: 0 0 0 3px var(--dmn-brand);
}

/* The wordmark is masked so it takes the card's own foreground colour. */
.dmn-root .dmn-pattern-brand {
    display: block;
    width: 74px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("img/daiilymade-wordmark.svg") no-repeat center / contain;
    mask: url("img/daiilymade-wordmark.svg") no-repeat center / contain;
}

.dmn-root .dmn-pattern-title {
    display: block;
    margin-top: 28px;
    font-family: "Averia Serif Libre", Georgia, serif;
    font-size: 24px;
    line-height: 1.15;
}

.dmn-root .dmn-pattern-tagline {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
}

.dmn-root .dmn-pattern-art {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 146px;
    margin: 20px 0;
}

/*
 * Only The Adapter's SVG carries width/height attributes; the rest have a bare
 * viewBox, so they fall back to the 300x150 default and blow up. Pinning the
 * height makes every illustration render at the Adapter's scale.
 */
.dmn-root .dmn-pattern-art img {
    width: auto;
    max-width: 100%;
    height: 146px;
    object-fit: contain;
}

.dmn-root .dmn-pattern-desc {
    display: block;
    width: 80%;
    margin-bottom: 30px;
    /* Keeps the last line clear of the badge in the corner. */
    padding-right: 48px;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.dmn-root .dmn-pattern-badge {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: url("img/daiily-badge.svg") no-repeat center / contain;
}

/* Summary ---------------------------------------------------------------- */

.dmn-root .dmn-card--summary {
    /* Wider than the other steps; 95% keeps the inset on small screens. */
    max-width: min(640px, 95%);
    text-align: left;
}

.dmn-root .dmn-summary-pattern {
    margin: 0 0 20px;
}

.dmn-root .dmn-summary-pattern .dmn-pattern {
    cursor: default;
    pointer-events: none;
}

.dmn-root .dmn-summary-pattern .dmn-pattern-inner {
    max-width: 313px;
}

.dmn-root .dmn-summary-list {
    margin: 0 0 24px;
    padding-top: 20px;
    border-top: 1px solid var(--dmn-line);
}

.dmn-root .dmn-summary-list dt {
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--dmn-muted);
}

.dmn-root .dmn-summary-list dd {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
}

/* Actions ---------------------------------------------------------------- */

.dmn-root .dmn-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* Matches .dmn-options so the buttons line up with the cards. */
    width: 100%;
    max-width: 95%;
    margin: 28px auto 0;
}

/* Keeps Continue on the right even on the first step, where Back is hidden. */
.dmn-root .dmn-actions > .dmn-next,
.dmn-root .dmn-actions > .dmn-submit {
    margin-left: auto;
}

.dmn-root .dmn-actions--stacked > .dmn-next,
.dmn-root .dmn-actions--stacked > .dmn-submit {
    margin-left: 0;
}

.dmn-root .dmn-actions--stacked {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.dmn-root .dmn-next,
.dmn-root .dmn-submit {
    display: inline-block;
    width: auto;
    padding: 13px 30px;
    border: 0;
    border-radius: 999px;
    background: var(--dmn-brand);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.dmn-root .dmn-next:hover,
.dmn-root .dmn-submit:hover,
.dmn-root .dmn-next:focus,
.dmn-root .dmn-submit:focus {
    opacity: 0.9;
    background: var(--dmn-brand);
    color: #fff;
}

.dmn-root .dmn-next--block,
.dmn-root .dmn-submit {
    width: 100%;
    border-radius: 12px;
}

.dmn-root .dmn-next--pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 220px;
}

.dmn-root .dmn-cta-arrow {
    flex: 0 0 auto;
    width: 16px;
    height: 23px;
    color: currentColor;
}

.dmn-root .dmn-next[disabled],
.dmn-root .dmn-submit[disabled] {
    background: #f0ece6;
    color: #a5a5a5;
    cursor: not-allowed;
}

.dmn-root .dmn-back {
    width: auto;
    padding: 6px 2px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--dmn-brand);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.dmn-root .dmn-back:hover,
.dmn-root .dmn-back:focus {
    background: none;
    color: var(--dmn-brand);
    text-decoration: underline;
}

.dmn-root .dmn-actions--stacked .dmn-back {
    order: 3;
}

.dmn-root .dmn-privacy {
    margin: 0;
    font-size: 12px;
    color: var(--dmn-muted);
    text-align: center;
}

.dmn-root .dmn-error {
    margin: 14px auto 0;
    font-size: 13px;
    color: #c0392b;
    text-align: center;
}

/* Thank you -------------------------------------------------------------- */

.dmn-root .dmn-thanks-art {
    display: block;
    width: 100%;
    max-width: 472px;
    height: auto;
    margin: 0 auto 24px;
}

/* Host container --------------------------------------------------------- */

.dmn-host-hidden {
    display: none !important;
}

/* The section hosting the form drops its own tint while the form is open, so a
   coloured CTA block reads like the white hero. Override --dmn-host-bg to land
   on a different surface. */
.dmn-host-active {
    background-color: var(--dmn-host-bg, #fff) !important;
    background-image: none !important;
}

/* Below ~1000px three columns would drop under the 300px card minimum. */
@media (max-width: 1000px) {
    .dmn-root .dmn-patterns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dmn-root .dmn-patterns,
    .dmn-root .dmn-grid {
        grid-template-columns: 1fr;
    }

    .dmn-root .dmn-card {
        padding: 22px 18px;
    }

    .dmn-root .dmn-actions {
        flex-direction: column-reverse;
    }

    .dmn-root .dmn-actions .dmn-next {
        width: 100%;
    }
}
