/*
 * 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;
}

/* 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;
}

.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;
}

/* Summary section */
.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;
}