/* Projektportal – Frontend. Zurückhaltend, übernimmt Schrift und Farben des Themes wo möglich. */
.hap {
	--hap-accent: #1f5f8b;
	--hap-accent-ink: #ffffff;
	--hap-border: #d5dbe1;
	--hap-muted: #5b6670;
	--hap-bg: #f6f8fa;
	--hap-ok: #2e7d4f;
	--hap-err: #b3261e;
	--hap-radius: 6px;
	max-width: 860px;
	line-height: 1.5;
}
.hap *, .hap *::before, .hap *::after { box-sizing: border-box; }
.hap h3 { margin: 0 0 .5em; }
.hap h4 { margin: 1.75em 0 .6em; font-size: 1.05em; }
.hap-muted { color: var(--hap-muted); font-size: .93em; }
.hap-small { font-size: .88em; }
.hap .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

.hap-form { display: block; }
.hap-fieldset { border: 1px solid var(--hap-border); border-radius: var(--hap-radius); padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; }
.hap-fieldset legend { font-weight: 600; padding: 0 .4em; }
.hap-field { margin: 0 0 .9rem; }
.hap-field label { display: block; font-weight: 500; margin-bottom: .25rem; }
.hap-field input[type="text"], .hap-field input[type="email"], .hap-field input[type="tel"], .hap-field select, .hap-field textarea {
	width: 100%; padding: .55rem .7rem; border: 1px solid var(--hap-border); border-radius: var(--hap-radius); font: inherit; background: #fff; color: inherit;
}
.hap-field textarea { margin-top: .25rem; font-weight: 400; }
.hap-field input:focus, .hap-field select:focus, .hap-field textarea:focus { outline: 2px solid var(--hap-accent); outline-offset: 1px; border-color: var(--hap-accent); }
.hap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.hap-row .hap-field:first-child:has(input[name="object_zip"]) { max-width: 10rem; }
.hap-check label { display: block; position: relative; padding-left: 1.6rem; font-weight: 400; }
.hap-check input[type="checkbox"] { position: absolute; left: 0; top: .2rem; margin: 0; }
.hap-req { color: var(--hap-err); }
.hap-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hap-button, .hap .hap-new > summary.hap-button {
	display: inline-block; cursor: pointer; background: var(--hap-accent); color: var(--hap-accent-ink); border: 0; border-radius: var(--hap-radius);
	padding: .65rem 1.3rem; font: inherit; font-weight: 600; text-decoration: none; line-height: 1.3;
}
.hap-button:hover { filter: brightness(1.08); color: var(--hap-accent-ink); }
.hap-button:disabled { opacity: .6; cursor: progress; }
.hap-button--secondary { background: transparent; color: var(--hap-accent); border: 1px solid var(--hap-accent); }
.hap-button--secondary:hover { color: var(--hap-accent); background: var(--hap-bg); }
.hap-new { margin-top: 1.5rem; }
.hap-new > summary { list-style: none; margin-bottom: 1rem; }
.hap-new > summary::-webkit-details-marker { display: none; }
.hap-link-button { background: none; border: 0; padding: 0; color: var(--hap-err); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9em; }

.hap-notice { padding: .75rem 1rem; border-radius: var(--hap-radius); margin: 0 0 1rem; border-left: 4px solid var(--hap-accent); background: var(--hap-bg); }
.hap-notice--error { border-left-color: var(--hap-err); background: #fdf0ef; }
.hap-notice--success { border-left-color: var(--hap-ok); background: #eef7f1; }

.hap-dropzone { border: 2px dashed var(--hap-border); border-radius: var(--hap-radius); padding: 1.25rem; text-align: center; background: var(--hap-bg); transition: border-color .15s; }
.hap-dropzone.is-over { border-color: var(--hap-accent); }
.hap-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hap-dropzone__label { cursor: pointer; display: inline-block; padding: .35rem .5rem; }
.hap-dropzone__label strong { color: var(--hap-accent); text-decoration: underline; }
.hap-file-input:focus + .hap-dropzone__label { outline: 2px solid var(--hap-accent); border-radius: 4px; }
.hap-dropzone__hint { margin: .3rem 0 0; color: var(--hap-muted); font-size: .85em; }
.hap-queue { list-style: none; margin: .75rem 0 0; padding: 0; text-align: left; }
.hap-queue__item { display: grid; grid-template-columns: 1fr auto auto; gap: .2rem .8rem; align-items: center; padding: .5rem .6rem; background: #fff; border: 1px solid var(--hap-border); border-radius: 4px; margin-bottom: .4rem; font-size: .92em; }
.hap-queue__name { overflow-wrap: anywhere; }
.hap-queue__state { color: var(--hap-muted); font-size: .9em; }
.hap-queue__bar { grid-column: 1 / -1; height: 4px; background: var(--hap-border); border-radius: 2px; overflow: hidden; }
.hap-queue__bar > span { display: block; height: 100%; width: 0; background: var(--hap-accent); transition: width .2s; }
.hap-queue__item.is-done .hap-queue__state { color: var(--hap-ok); }
.hap-queue__item.is-done .hap-queue__bar > span { background: var(--hap-ok); }
.hap-queue__item.is-error { border-color: var(--hap-err); }
.hap-queue__item.is-error .hap-queue__state { color: var(--hap-err); grid-column: 1 / -1; }

.hap-bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .55rem .9rem; background: var(--hap-bg); border-radius: var(--hap-radius); margin-bottom: 1.25rem; font-size: .92em; }
.hap-back { margin: 0 0 1rem; }
.hap-project__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.hap-project__number { font-variant-numeric: tabular-nums; color: var(--hap-muted); font-size: .9em; letter-spacing: .02em; }
.hap-badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .82em; font-weight: 600; background: #e6edf3; color: #22394d; white-space: nowrap; }
.hap-badge--neu { background: #e3f0fb; color: #164a73; }
.hap-badge--unterlagen_unvollstaendig { background: #fff2d6; color: #6b4a00; }
.hap-badge--vollstaendig { background: #e2f3e8; color: #1d5434; }
.hap-badge--archiviert { background: #eceff1; color: #4a545c; }
.hap-quota { margin-bottom: 1rem; }
.hap-quota__bar { height: 8px; background: var(--hap-border); border-radius: 4px; overflow: hidden; }
.hap-quota__bar > span { display: block; height: 100%; background: var(--hap-accent); }
.hap-quota p { margin: .3rem 0 0; }
.hap-upload { border: 1px solid var(--hap-border); border-radius: var(--hap-radius); padding: 1rem 1.25rem; }
.hap-upload h4 { margin-top: 0; }
.hap-upload .hap-button { margin-top: .9rem; }

.hap-table { width: 100%; border-collapse: collapse; font-size: .93em; }
.hap-table th, .hap-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--hap-border); vertical-align: top; }
.hap-table th { font-weight: 600; background: var(--hap-bg); }
.hap-row--deleted td { color: var(--hap-muted); }
.hap-strike { text-decoration: line-through; }
.hap-lock { color: var(--hap-muted); display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; cursor: help; }
.hap-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; margin: 0; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--hap-err); cursor: pointer; line-height: 0; }
.hap-icon-button:hover { background: var(--hap-bg); border-color: var(--hap-border); }
.hap-icon-button:focus-visible { outline: 2px solid var(--hap-accent); outline-offset: 1px; }
.hap-icon-button:disabled { opacity: .5; cursor: wait; }
.hap-files th.hap-files__action, .hap-files td.hap-files__action { width: 2.5rem; min-width: 2.5rem; padding-left: .25rem; padding-right: .25rem; text-align: center; vertical-align: middle; white-space: nowrap; }

.hap-timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--hap-border); font-size: .9em; }
.hap-timeline__item { position: relative; padding: 0 0 .7rem .5rem; }
.hap-timeline__item::before { content: ""; position: absolute; left: calc(-1rem - 5px); top: .5rem; width: 8px; height: 8px; border-radius: 50%; background: var(--hap-accent); }
.hap-timeline__item time { color: var(--hap-muted); font-variant-numeric: tabular-nums; }
.hap-timeline__item--datei_geloescht_kunde::before, .hap-timeline__item--datei_geloescht_buero::before, .hap-timeline__item--datei_entfernt_frist::before { background: var(--hap-muted); }
.hap-timeline__msg { margin: .3rem 0 0; padding: .5rem .75rem; background: var(--hap-bg); border-radius: 4px; }

@media (max-width: 640px) {
	.hap-row { grid-template-columns: 1fr; }
	.hap-row .hap-field:first-child:has(input[name="object_zip"]) { max-width: none; }
	.hap-table thead { display: none; }
	.hap-table tr { display: block; border-bottom: 1px solid var(--hap-border); padding: .4rem 0; }
	.hap-table td { display: flex; gap: .75rem; border: 0; padding: .2rem 0; }
	.hap-table td[data-label]::before { content: attr(data-label); font-weight: 600; min-width: 7.5rem; color: var(--hap-muted); }
	.hap-project__head { flex-direction: column; }
	.hap-table, .hap-table tbody { display: block; width: 100%; }
	.hap-table td > *, .hap-table td { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
	.hap-files td.hap-files__action { width: auto; justify-content: flex-start; padding-left: 0; }
	.hap-files td.hap-files__action:empty { display: none; }
}
@media (min-width: 641px) {
	.hap-files td:nth-child(2), .hap-files td:nth-child(3) { white-space: nowrap; }
	.hap-files td:nth-child(4) { min-width: 12rem; }
}

.hap-note { margin-top: 1rem; }
.hap-note textarea { width: 100%; box-sizing: border-box; }
.hap-timeline__item--nachricht_kunde::before { background: var(--hap-accent); }
.hap-timeline__files { margin-top: .3rem; font-size: .9em; }
