  /*
 * Umbraco Forms Save and Return - Minimal Styles
 *
 * These provide baseline layout for the save-and-return functionality.
 * Override these in your consuming project's stylesheet for custom branding.
 *
 * CSS custom properties can be set on :root or .umbraco-forms-saveandreturn:
 *   --sar-btn-bg, --sar-btn-color, --sar-btn-border
 *   --sar-modal-bg, --sar-modal-border-radius, --sar-modal-shadow
 */

:root {
    --hie-dark-blue: #142143;
}

/* Steps: hide all by default, shown via JS */
.sar-form-step {
    display: none;
}

.sar-form-step:first-of-type {
    display: block;
    padding: 0;
}

/* Navigation bar */
.sar-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Buttons - minimal, unstyled baseline */
.sar-btn {
    width: 100% !important;
    justify-content: center;
}

@media screen and (min-width: 768px) {
    .sar-nav {
        gap: .75rem;
    }

    .sar-btn {
        width: fit-content !important;
    }

    .sar-btn.order-last {
        order: 3;
    }
}

.sar-btn--loading {
    opacity: 0.6;
    cursor: wait;
}

.stepped-progress__step-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    text-decoration: none;
}

.stepped-progress__list-item--clickable .stepped-progress__step-button span {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.stepped-progress__list-item--clickable .stepped-progress__step-button:hover span {
    text-decoration: none;
}

.stepped-progress__list-item--current .stepped-progress__step-button:hover span {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.stepped-progress__step-button:disabled {
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

/* .stepped-progress__step-button:disabled span {
   
} */

/* Mobile submitted state */
.stepped-conic-progress__chart--complete {
    background: var(--hie-blue, #23408F) !important;
}

body:has(.saved-forms-stepper .umbraco-forms-submitmessage) .stepped-conic-progress__chart,
body:has(.saved-forms-stepper .umbraco-forms-submitmessage-html) .stepped-conic-progress__chart {
    background: var(--hie-blue, #23408F) !important;
}

.stepped-conic-progress__chart--complete::before {
    background: var(--hie-blue, #23408F);
}

body:has(.saved-forms-stepper .umbraco-forms-submitmessage) .stepped-conic-progress__chart::before,
body:has(.saved-forms-stepper .umbraco-forms-submitmessage-html) .stepped-conic-progress__chart::before {
    background: var(--hie-blue, #23408F);
}

.stepped-conic-progress__tick {
    display: block;
    width: 2rem;
    height: 2rem;
    fill: #fff;
}

body:has(.saved-forms-stepper .umbraco-forms-submitmessage) .stepped-conic-progress__content,
body:has(.saved-forms-stepper .umbraco-forms-submitmessage-html) .stepped-conic-progress__content {
    font-size: 0;
}

body:has(.saved-forms-stepper .umbraco-forms-submitmessage) .stepped-conic-progress__content:not(:has(.stepped-conic-progress__tick))::before,
body:has(.saved-forms-stepper .umbraco-forms-submitmessage-html) .stepped-conic-progress__content:not(:has(.stepped-conic-progress__tick))::before {
    content: "";
    display: block;
    width: 2rem;
    height: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M9%2016.2%204.8%2012l-1.4%201.4L9%2019%2021%207l-1.4-1.4z%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Save modal (native <dialog>) */
.sar-modal {
    border: none;
    border-radius: var(--sar-modal-border-radius, 32px);
    box-shadow: var(--sar-modal-shadow, 0 4px 24px rgba(0, 0, 0, 0.2));
    padding: 2rem;
    max-width: 480px;
    width: 90vw;
}

.sar-modal::backdrop {
    background-color: #142143;
    opacity:0.8;
}

.sar-modal-close,
.sar-modal .dialog-close {
    position: absolute;
    top: 0.5rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.sar-save-success-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sar-close-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: #707070;
    cursor: pointer;
    font: inherit;
    padding: 0.75rem 0;
    text-decoration: underline;
}

.sar-close-form-btn:hover {
    text-decoration: none;
}

/* Summary section */
.sar-summary-legend {
    color: #142143;
    font-size: 1.563rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    padding: 0;
}

@media screen and (min-width: 40em) {
    .sar-summary-legend {
        font-size: 1.875rem;
    }
}

.sar-summary-section {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}
.sar-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.sar-summary-header h5 {
    margin: 0;
}
.sar-summary-edit {
    font-size: 0.875rem;
}
.sar-summary-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}
.sar-summary-list dt {
    font-weight: 600;
}
.sar-summary-list dd {
    margin: 0;
    padding-bottom: 1rem;
}

/* Saved file indicator */
.sar-saved-file-indicator {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-radius: 4px;
    font-size: 0.875rem;
}
.sar-saved-file-remove {
    margin-left: 0.5rem;
    color: #c00;
}

/* File upload */

.fileupload .umbraco-forms-field-wrapper {
    padding: 0 !important;
}

.fileupload input[type="file"] {
    background-color: white;
    border: 2px solid #A7A7A7;
    padding: .75rem 1.25rem;
}
