@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');

:root {
    --bs-body-font-family: 'DM Sans', sans-serif;
    --bs-body-font-size: 1.125rem;
    --bs-fg-body: #2b2b28;
    --bs-bg-body: #f5f6f2;
    --bs-fg-2: #68736c;
    --bs-border-color: #e8ebe4;
    --bs-radius-9: 22px;
    --bs-bg-1: #f7f8f4;
    --bs-primary-base: #ab2925;
    --bs-primary-bg: #ab2925;
    --bs-primary-bg-subtle: #f7eeee;
    --bs-primary-bg-muted: #f2e9e5;
    --bs-primary-fg: #ab2925;
    --bs-primary-fg-emphasis: #90221f;
    --bs-primary-border: #dbc9c4;
    --bs-primary-contrast: #fff;
    --bs-primary-focus-ring: #ab29254d;
    --bs-success-bg: #56634e;
    --bs-success-bg-subtle: #edf0e7;
    --bs-success-fg: #3f5043;
    --bs-success-contrast: #fff;
    --bs-success-border: #e5e8df;
    --bs-success-fg-emphasis: #57634f;
    --bs-focus-ring-color: rgb(171 41 37 / 18%);
    --accent: #ab2925;
    --sage: #e6ebdf;
}

/* Respect Stimulus visibility even when Bootstrap display utilities are present. */
[hidden] {
    display: none !important;
}

svg {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -.2em;
}

.page-shell {
    max-width: 1440px;
    padding-inline: 24px;
}

.site-header {
    grid-template-columns: 1fr auto 1fr;
    min-height: 85px;
}

.brand {
    justify-self: start;
    color: var(--bs-fg-body);
    font: 800 16px Manrope, sans-serif;
    letter-spacing: -.6px;
}

.brand:hover {
    color: var(--accent);
}

.brand-name {
    font-size: 22px;
    line-height: 1.15;
}

.brand-name-secondary {
    font-size: 18px;
    color: var(--accent);
}

.brand-mark {
    width: 50px;
    height: 50px;
    background: #f2e9e5;
    color: var(--accent);
}

.brand-mark svg {
    width: 36px;
    height: 36px;
}

.language-switch {
    justify-self: end;
}

.language-switch svg {
    width: 21px;
    height: 21px;
}

.language-switch a[aria-current=page] {
    background: var(--bs-success-bg-subtle);
}

.request-layout {
    --bs-gutter-x: 22px;
    --bs-gutter-y: 22px;
}

.request-intro, .request-content {
    min-width: 0;
}

.intro-panel {
    container-type: inline-size;
    padding: 32px 28px;
    background: var(--sage);
}

.eyebrow, .section-step {
    font-weight: 700;
    letter-spacing: .16em;
    font-size: 12px;
    color: #65736c;
}

.intro-panel .eyebrow {
    color: #3f5043;
    font-size: 13px;
}

.intro-panel h1 {
    font: 800 clamp(24px, 15cqw, 52px)/1.06 Manrope, sans-serif;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
}

.intro-panel .intro-hero-title {
    overflow-wrap: normal;
    word-break: normal;
}

.intro-panel h1 em {
    color: var(--accent);
}

.intro-description {
    color: #627063;
    font-size: 16px;
    line-height: 1.7;
}

.steps {
    margin-top: 34px;
}

.step-number {
    width: 36px;
    height: 36px;
    border: 1px solid #aab6a2;
}

.steps > div:first-child .step-number,
.step-link[aria-current="step"] .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.step-link {
    color: var(--bs-fg-body);
}

.step-link:hover, .step-link.active, .step-link[aria-current="step"] {
    color: var(--accent);
    background-color: #f7eeee;
}

.step-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.steps .stepper {
    --bs-stepper-size: 36px;
    --bs-stepper-gap: 12px;
    --bs-stepper-text-gap: 8px;
    --bs-stepper-font-size: 16px;
    --bs-stepper-bg: #cdd6c6;
    --bs-stepper-active-bg: var(--accent);
    --bs-stepper-active-color: #fff;
}

.steps .stepper-item::before {
    content: counter(stepper, decimal-leading-zero);
}

.form-step-section {
    scroll-margin-top: 24px;
}

.form-step-section:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: var(--bs-radius-4);
}

.intro-foot {
    margin-top: 48px;
    border-color: #cdd6c6 !important;
    color: #627063;
    line-height: 1.6;
}

.form-panel {
    padding: 32px;
}

.form-heading h2, .section-heading h3 {
    font-family: Manrope, sans-serif;
    letter-spacing: -.04em;
}

.form-heading h2 {
    font-size: 30px;
}

.form-heading p {
    font-size: 14px;
}

.reuse-notice {
    --bs-alert-bg: #e1ead7;
    --bs-alert-color: #314a2e;
    --bs-alert-border-color: #a1b48f;
    --bs-alert-border-radius: var(--bs-radius-5);
    border-left-width: 4px;
}

.section-heading h3 {
    font-size: 17px;
}

.section-step {
    font-size: 9px;
}

.takeback-form label {
    font-size: 15px;
    margin-bottom: 6px;
}

.takeback-form label.required::after {
    content: ' *';
    color: var(--accent);
}

.takeback-form .form-control {
    min-height: 48px;
    border: 1px solid #899582;
    border-radius: 11px;
    background-color: #f4f6f1;
    font-size: 17px;
}

.takeback-form .form-control::placeholder {
    color: #626c62;
    opacity: 1;
}

.phone-country {
    width: 108px;
}

.phone-input-group > *, .phone-input-group .form-control {
    min-width: 0;
}

.phone-country-trigger {
    --bs-btn-color: var(--bs-fg-body);
    --bs-btn-border-color: #899582;
    --bs-btn-hover-color: var(--bs-fg-body);
    --bs-btn-hover-bg: #edf0e7;
    --bs-btn-hover-border-color: #899582;
    --bs-btn-active-color: var(--bs-fg-body);
    --bs-btn-active-bg: #edf0e7;
    --bs-btn-active-border-color: #899582;
    min-height: 48px;
    background-color: #f4f6f1;
    font-size: 15px;
}

.phone-country-trigger:focus-visible, .phone-country-list:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.phone-country-trigger[aria-invalid="true"] {
    border-color: var(--bs-danger);
}

.country-flag {
    width: 24px;
    height: 18px;
}

.phone-country-chevron svg {
    width: 12px;
    height: 12px;
}

.phone-country-popup {
    --bs-border-color: #c4cebc;
    width: min(320px, calc(100vw - 48px));
}

.phone-country-list {
    max-height: min(260px, 40vh);
    overscroll-behavior: contain;
}

.phone-country-option {
    font-size: 16px;
}

.phone-country-option[aria-selected="true"] {
    background: #edf0e7;
    font-weight: 700;
}

.phone-country-option:hover, .phone-country-option.is-active {
    background: #f7eeee;
}

.phone-country-preferred + .phone-country-option:not(.phone-country-preferred) {
    border-top: 1px solid var(--bs-border-color) !important;
    margin-top: 6px;
}

.takeback-form .form-control:focus {
    border-color: #aab6a2;
    box-shadow: 0 0 0 3px rgb(170 182 162 / 20%);
    background-color: #fff;
}

.takeback-form .form-control.is-invalid {
    border-color: var(--bs-danger);
}

.btn-solid.theme-primary, .btn-outline.theme-primary {
    --bs-btn-border-radius: 11px;
}

.location-card {
    background-color: #fafbf8 !important;
}

.item-card {
    box-shadow: none !important;
}

[data-total-summary] {
    background-color: #edf0e7 !important;
}

@media (min-width: 900px) {
    .request-intro {
        width: 27%;
    }

    .request-content {
        width: 73%;
    }

    .steps, .intro-foot {
        display: block !important;
    }

    .request-intro {
        position: sticky;
        top: 20px;
    }
}

@media (min-width: 900px) and (max-width: 1199.98px) {
    .page-shell {
        padding-inline: 8px;
    }

    .intro-panel {
        padding-inline: 28px;
    }
}

@media (max-width: 899.98px) {
    .intro-description {
        max-width: 50ch;
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .header-partners {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
    }

    .language-switch {
        grid-column: 2;
        grid-row: 1;
    }

}

@media (max-width: 575.98px) {
    .page-shell {
        padding-inline: 12px;
    }

    .intro-panel, .form-panel {
        --bs-radius-9: 18px;
        padding: 24px;
    }

    .form-heading h2 {
        font-size: 27px;
    }
}

.category-tree:empty {
    display: none;
}

.category-field {
    --treeselectjs-border-color: transparent;
    --treeselectjs-border-focus: #aab6a2;
    --treeselectjs-bg: #f4f6f1;
    --treeselectjs-item-focus-bg: var(--bs-success-bg-subtle);
    --treeselectjs-item-selected-bg: var(--bs-success-bg-subtle);
}

.category-field .treeselect-input {
    min-height: 48px;
    border-radius: 11px;
}

.category-field .treeselect-input__edit,
.category-field .treeselect-list__item-label,
.category-field .treeselect-list__empty-text {
    font-size: 17px;
}

.address-suggestions {
    max-height: 250px;
}

/* UX Dropzone generates its markup, so its integration needs scoped styles. */
.takeback-form .dropzone-container {
    min-height: 70px;
    padding: 12px;
    border: 1px dashed #c4cebc;
    border-radius: 11px;
    background: #f4f6f1;
    transition: border-color .2s, background .2s, box-shadow .2s
}

.takeback-form .dropzone-container:hover {
    border-color: #839473;
    background: #edf0e7
}

.takeback-form .dropzone-container:focus-within {
    border-color: #839473;
    box-shadow: 0 0 0 3px #aab6a233
}

.takeback-form .dropzone-input {
    padding: 0;
    border: 0
}

.takeback-form .dropzone-placeholder {
    color: #627063;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5
}

.takeback-form .dropzone-preview-list {
    margin: 12px 0 0;
    padding: 0;
    color: #40544a
}

.takeback-form .dropzone-preview-list-item {
    min-width: 0;
    border-top: 1px solid #e5e8df;
    font-size: 15px
}

.takeback-form .dropzone-preview-filename {
    min-width: 0;
    overflow-wrap: anywhere
}

.takeback-form .dropzone-preview-list-remove {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    color: #a36c61
}

.takeback-form .dropzone-preview-list-remove:hover {
    background: #f7e9e5;
    color: #873f36
}

.takeback-form .dropzone-preview-list-remove:focus-visible {
    outline: 2px solid #839473;
    outline-offset: 2px
}

/* Native details have no Bootstrap utility for their marker or open-state icon. */
.location-heading::-webkit-details-marker, .item-comment summary::-webkit-details-marker {
    display: none;
}

details[open] > summary .disclosure-chevron {
    transform: rotate(180deg);
}

.request-comment {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.request-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
}

.request-actions {
    z-index: 5;
}

.pwa-toast-stack { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 12.75rem); z-index: 1080; width: min(26rem, calc(100vw - 2rem)); max-height: 55dvh; overflow-y: auto; }
.pwa-toast { position: relative; width: 100%; margin-top: .75rem; border: 1px solid #cedbc8; border-left: 4px solid #638354; border-radius: 1rem; background: #fff; color: #302b24; box-shadow: 0 6px 24px #30271e20; }
.pwa-toast .toast-body { padding: 1rem 2.75rem 1rem 1rem; }
.pwa-toast .btn-close { position: absolute; right: .75rem; top: .8rem; }
.pwa-toast-error { border-left-color: #ab2925; }

.pwa-menu {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1060;
}

.pwa-menu-toggle {
    display: grid;
    place-items: center;
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #ab2925;
    color: white;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 6px 24px #50241d30;
}

.pwa-menu-toggle::-webkit-details-marker, .pwa-action-toggle::-webkit-details-marker { display: none; }
.pwa-menu-toggle:focus-visible { outline: 3px solid #839473; outline-offset: 4px; }
.pwa-menu-indicator { position: absolute; top: .1rem; right: .1rem; width: .65rem; height: .65rem; border-radius: 50%; background: #a9cf9a; border: 2px solid white; }
.pwa-menu-indicator[hidden] { display: none; }
/* The three actions fan into the screen from the corner menu button. */
.pwa-menu-symbol { transition: transform .18s ease; }
.pwa-menu[open] > summary .pwa-menu-symbol { transform: rotate(45deg); }
.pwa-menu-actions { position: absolute; right: 0; bottom: 0; width: 3.5rem; height: 3.5rem; pointer-events: none; }
.pwa-menu-section { position: absolute; pointer-events: auto; }
.pwa-menu-actions > .pwa-connection { right: 4.75rem; bottom: 0; }
.pwa-menu-actions > .pwa-notifications { right: 3.5rem; bottom: 3.75rem; }
.pwa-menu-actions > .pwa-install { right: 0; bottom: 5.25rem; }
.pwa-action-toggle { display: grid; place-items: center; position: relative; width: 3rem; height: 3rem; border: 1px solid #e5d2cb; border-radius: 50%; background: #fff; color: #ab2925; box-shadow: 0 6px 24px #50241d20; cursor: pointer; list-style: none; }
.pwa-action-toggle:focus-visible, .pwa-menu-section[open] > .pwa-action-toggle { outline: 3px solid #839473; outline-offset: 3px; }
.pwa-connection-toggle { color: #3c6730; background: #f2f7ef; border-color: #d8e3d1; }
.pwa-connection-toggle.is-offline { color: #80520b; background: #fff3d4; border-color: #e6d3a0; }
.pwa-install-toggle { background: #fbf4f1; }
@media (prefers-reduced-motion: reduce) { .pwa-menu-symbol { transition: none; } }
.pwa-menu-panel { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 9.25rem); width: min(22rem, calc(100vw - 2rem)); max-height: min(60dvh, calc(100dvh - 12rem)); overflow-y: auto; padding: 1.5rem; border: 1px solid #e5e4de; border-radius: 1.25rem; background: white; box-shadow: 0 12px 48px #30271e24; }
.pwa-update-dialog { width: min(28rem, calc(100vw - 2rem)); padding: 2.5rem 2rem; border: 0; border-radius: 1.5rem; text-align: center; color: #302b24; }
.pwa-update-dialog::backdrop { background: #24201b99; backdrop-filter: blur(5px); }
.pwa-update-spinner { width: 2.5rem; height: 2.5rem; margin: 0 auto 1.5rem; border: 3px solid #eee8df; border-top-color: #ab2925; border-radius: 50%; animation: pwa-spin 1s linear infinite; }
@keyframes pwa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pwa-update-spinner { animation-duration: 3s; } }


/* The shared menu keeps connection status visible while its sections are closed. */
.pwa-menu-connection { position: absolute; left: -.15rem; bottom: -.15rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 2px solid white; border-radius: 50%; color: #3c6730; background: #f2f7ef; }
.pwa-menu-toggle.is-offline .pwa-menu-connection { color: #80520b; background: #fff3d4; }
.pwa-pending-count { position: absolute; top: -.25rem; right: -.35rem; min-width: 1.4rem; padding: .15rem .35rem; border: 2px solid white; border-radius: 2rem; background: #ab2925; color: white; font-size: .7rem; line-height: 1; text-align: center; }
.pwa-queue-list ul { margin-bottom: 0; font-size: .85rem; }

.pwa-install-dialog { width: min(30rem, calc(100vw - 2rem)); max-height: 85dvh; overflow-y: auto; padding: 2rem; border: 0; border-radius: 1.5rem; text-align: center; color: #302b24; }
.pwa-install-dialog::backdrop { background: #24201b99; backdrop-filter: blur(5px); }
.pwa-install-logo { margin-bottom: 1.25rem; border-radius: 1rem; }

/* Legal reading layout: full text stays visible and native anchors work offline. */
.terms-page {
    max-width: 1240px;
    margin-inline: auto;
}

.terms-heading {
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border: 1px solid #d9e0d2;
    border-radius: 1.5rem;
    background: linear-gradient(120deg, #edf0e7, #f6f7f2);
}

.terms-heading h1 {
    max-width: 24ch;
    margin: 1rem 0 1.25rem;
    color: #2e3b30;
    font: 800 clamp(1.75rem, 3.5vw, 2.75rem)/1.18 Manrope, sans-serif;
    letter-spacing: -.04em;
    overflow-wrap: break-word;
    scroll-margin-top: 1.5rem;
}

.terms-updated {
    margin: 0;
    color: #4b5b4e;
    font-size: .875rem;
    line-height: 1.6;
}

.terms-reading-link {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    min-height: 44px;
    margin-top: 1rem;
    color: #90221f;
    font-size: .9375rem;
    font-weight: 700;
    text-underline-offset: .25em;
}

.terms-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.terms-navigation {
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    background: #fff;
}

.terms-navigation h2 {
    margin: 0 0 .75rem;
    color: #4b5b4e;
    font: 800 .875rem/1.5 Manrope, sans-serif;
}

.terms-navigation ol {
    display: grid;
    gap: .125rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.terms-navigation a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .625rem .75rem;
    border-radius: .625rem;
    color: #38453b;
    font-size: .875rem;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: break-word;
}

.terms-navigation a:hover {
    color: #90221f;
    background: #f7eeee;
}

.terms-page a:focus-visible,
.terms-section:focus-visible,
.terms-heading h1:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.terms-content {
    min-width: 0;
}

.terms-section {
    margin-bottom: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    background: #fff;
    scroll-margin-top: 1.5rem;
}

.terms-section:target {
    border-color: #ab2925;
    box-shadow: 0 0 0 1px #ab2925;
}

.terms-section h2 {
    max-width: 40ch;
    margin: 0 0 1.5rem;
    color: #2e3b30;
    font: 800 clamp(1.125rem, 2vw, 1.375rem)/1.4 Manrope, sans-serif;
    letter-spacing: -.025em;
}

.terms-section p {
    max-width: 72ch;
    margin: 0 0 1.25rem;
    color: #38413a;
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: break-word;
}

.terms-section p:last-child {
    margin-bottom: 0;
}

.terms-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .5rem 0;
}

.terms-back-to-top {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    color: #4b5b4e;
    font-size: .875rem;
    text-underline-offset: .25em;
}

@media (min-width: 600px) and (max-width: 999.98px) {
    .terms-navigation ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .terms-layout {
        grid-template-columns: 270px minmax(0, 1fr);
        gap: 2rem;
        margin-top: 2rem;
    }

    .terms-navigation {
        position: sticky;
        top: 1.5rem;
        max-height: calc(100dvh - 3rem);
        overflow-y: auto;
    }
}

@media print {
    .terms-page .terms-navigation,
    .terms-page .terms-reading-link,
    .terms-page .terms-actions {
        display: none;
    }

    .terms-layout {
        display: block;
    }

    .terms-heading,
    .terms-section {
        padding: 1rem 0;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }

    .terms-section h2 {
        break-after: avoid;
    }

    .terms-section p {
        max-width: none;
        color: #000;
        orphans: 3;
        widows: 3;
    }
}
