/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    color: #1a1a2e;
    min-height: 100vh;
    background: linear-gradient(160deg, #158A2F 45%, #EEEEEE 45%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Layout wrapper ──────────────────────────────────────────────────────── */
.claim-wrap {
    flex: 1;
    padding: 24px 12px 40px;
}

.claim-card-outer {
    max-width: 780px;
    margin: 0 auto;
}

.claim-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

/* ── Card header ──────────────────────────────────────────────────────────── */
.claim-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.claim-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #168c30;
    margin: 0 0 8px;
    line-height: 1.3;
}

.claim-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */
#progressbar {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 20px 24px 16px;
    gap: 0;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

#progressbar li {
    flex: 1;
    position: relative;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: #b0b0b0;
}

#progressbar li span {
    display: block;
    margin-top: 8px;
}

#progressbar li:before {
    content: '';
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    background: #e5e7eb;
    position: relative;
    z-index: 1;
}

#progressbar li:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    top: 14px;
    left: -50%;
    z-index: 0;
}

#progressbar li:first-child:after { display: none; }

#progressbar li.active {
    color: #168c30;
}

#progressbar li.active:before {
    background: #168c30;
}

#progressbar li.active:after {
    background: #168c30;
}

/* ── Form card body ───────────────────────────────────────────────────────── */
fieldset {
    display: none;
    border: none;
    margin: 0;
    padding: 0;
}

fieldset.show {
    display: block;
}

.form-card {
    padding: 20px 20px 24px;
}

.step-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0fdf4;
}

.req {
    color: #dc2626;
    font-size: 0.85em;
}

/* ── Form controls ────────────────────────────────────────────────────────── */
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    display: block;
}

.form-control,
.form-select {
    font-size: 1rem;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #168c30;
    box-shadow: 0 0 0 3px rgba(22, 140, 48, 0.12);
    outline: none;
    background: #fff;
}

.form-control-lg,
.form-select-lg {
    min-height: 48px;
    font-size: 1rem;
}

.form-control[disabled],
.form-select[disabled],
.form-control:disabled,
.form-select:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.8;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ── Character counter ────────────────────────────────────────────────────── */
.char-counter {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 4px;
}

/* ── Age group ────────────────────────────────────────────────────────────── */
.age-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.age-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    user-select: none;
}

.age-option input[type=radio] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: #168c30;
    cursor: pointer;
    margin: 0;
}

/* ── Claim type ───────────────────────────────────────────────────────────── */
.claimtype-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.claimtype-option {
    cursor: pointer;
    display: block;
}

.claimtype-option input[type=radio] {
    display: none;
}

.claimtype-box {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s, background 0.2s;
}

.claimtype-box strong {
    display: block;
    font-size: 0.9rem;
    color: #111827;
    margin-bottom: 4px;
}

.claimtype-box p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.claimtype-option input[type=radio]:checked + .claimtype-box {
    border-color: #168c30;
    background: #f0fdf4;
}

.claimtype-option:hover .claimtype-box {
    border-color: #acd313;
    background: #fafff5;
}

/* ── Accept group ─────────────────────────────────────────────────────────── */
.accept-group {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

.accept-group.selected {
    border-color: #168c30;
    background: #f0fdf4;
}

.accept-group.needed {
    border-color: #dc2626;
    background: #fff5f5;
}

.accept-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a2e;
}

.accept-label input[type=checkbox] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #168c30;
    cursor: pointer;
}

.accept-note {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 10px 0 0;
    line-height: 1.5;
}

.accept-legal {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 10px 0 0;
    line-height: 1.5;
}

.accept-legal a {
    color: #168c30;
    text-decoration: underline;
    font-weight: 600;
}

.accept-legal a[href^="mailto:"] {
    color: #2563eb;
}

/* ── File upload ──────────────────────────────────────────────────────────── */
input[type=file] {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 6px;
}

.file-upload-btn:hover {
    border-color: #168c30;
    background: #f0fdf4;
}

.file-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

.file-optional {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 400;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-claim-next,
.btn-claim-prev {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    padding: 12px 20px;
}

.btn-claim-next {
    background: #168c30;
    color: #fff;
}

.btn-claim-next:hover {
    opacity: 0.9;
}

.btn-claim-next:active {
    transform: scale(0.98);
}

.btn-claim-prev {
    background: #f3f4f6;
    color: #374151;
}

.btn-claim-prev:hover {
    background: #e5e7eb;
}

.fa-long-arrow-right { float: right; margin-top: 2px; }
.fa-long-arrow-left  { float: left;  margin-top: 2px; }

/* ── Link styles in consent ───────────────────────────────────────────────── */
.sub-desc a { color: #168c30 !important; text-decoration: underline !important; font-weight: 600 !important; }
.sub-desc a:hover { color: #005f27 !important; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer.footer-menorca {
    margin-top: 0;
    font-family: inherit;
}

footer.footer-menorca .footer-link:hover { color: #ACD313 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET ≥ 576px
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 576px) {
    .claim-wrap { padding: 32px 20px 48px; }

    .claim-card { border-radius: 24px; }

    .claim-header { padding: 32px 32px 24px; }
    .claim-title  { font-size: 1.55rem; }

    #progressbar { padding: 24px 32px 18px; }

    .form-card { padding: 28px 32px 32px; }

    .btn-row {
        flex-direction: row;
        justify-content: flex-end;
    }

    .btn-claim-next,
    .btn-claim-prev {
        width: auto;
        min-width: 160px;
    }

    .btn-claim-prev { order: -1; }

    .claimtype-group { flex-direction: row; }
    .claimtype-option { flex: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP ≥ 768px
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .claim-wrap { padding: 40px 24px 60px; }

    .claim-title { font-size: 1.7rem; }

    #progressbar li:before { width: 38px; height: 38px; }
    #progressbar li:after  { top: 17px; height: 6px; }
    #progressbar li span   { font-size: 0.75rem; }

    .step-heading { font-size: 1.05rem; }
}
