/* Grand Hall Event-Checkliste 0.6.0
 * Designrichtung: PDF-Struktur + Eventplaner-Weboptik.
 * Hintergrund und Grundtextfarbe werden bewusst nicht am Plugin-Container erzwungen,
 * damit diese über die umgebende Divi-Section / das Divi-Textmodul gesteuert werden können.
 */

.gh-checklist {
    --gh-purple: #514a6a;
    --gh-purple-dark: #403a56;
    --gh-purple-soft: #6c6583;
    --gh-lilac: #f2f0f5;
    --gh-line: #d8d4de;
    --gh-white: #ffffff;
    --gh-heading: #414141;
    --gh-danger: #8a2f2f;
    --gh-done: #84966D;
    color: inherit;
    font-family: inherit;
    max-width: 1180px;
    margin: 0 auto;
    background: transparent;
}

.gh-checklist *,
.gh-checklist *::before,
.gh-checklist *::after {
    box-sizing: border-box;
}

/* Keine Card-/App-Rundungen. Hintergrund bleibt transparent und kann in Divi gesetzt werden. */
.gh-checklist__toolbar,
.gh-checklist__loadbox,
.gh-section {
    border-radius: 0;
    background: transparent;
}

.gh-checklist__toolbar {
    color: inherit;
    padding: 0 0 30px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--gh-line);
}

.gh-checklist__progress-copy,
.gh-checklist__status,
.gh-checklist__actions,
.gh-checklist__footer-actions,
.gh-checklist__loadrow,
.gh-item__topline,
.gh-item__fields {
    display: flex;
}

.gh-checklist__progress-copy {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 13px;
    font-family: "Unytour", sans-serif;
    font-size: 18px;
    line-height: 1.35;
}

.gh-checklist__progress-copy strong {
    font-weight: 700;
}

.gh-checklist__progress {
    height: 8px;
    background: rgba(81, 74, 106, .09);
    overflow: hidden;
}

.gh-checklist__progress > span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--gh-purple);
    transition: width 180ms ease;
}

.gh-checklist__actions,
.gh-checklist__footer-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.gh-checklist__status {
    flex-wrap: wrap;
    gap: 7px 20px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.45;
    color: inherit;
    opacity: .72;
}

.gh-checklist__key strong {
    color: var(--gh-purple);
    letter-spacing: .05em;
}

.gh-checklist__share-note {
    max-width: 100%;
    margin: 10px 0 0;
    color: inherit;
    opacity: .72;
    font-size: 14px;
    line-height: 1.55;
}

.gh-checklist__loadbox {
    padding: 0 0 30px;
    margin-bottom: 44px;
    border-bottom: 1px solid var(--gh-line);
}

.gh-checklist__loadbox > label {
    display: block;
    margin-bottom: 10px;
    color: inherit;
    font-family: "Unytour", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.gh-checklist__loadrow {
    gap: 12px;
    align-items: flex-start;
}

.gh-checklist__loadrow input {
    flex: 1 1 auto;
}

/* Eventplaner-Buttons: eckig, 18 px, regular, uppercase */
.gh-btn {
    appearance: none;
    min-height: 46px;
    border: 2px solid var(--gh-purple);
    background: transparent;
    color: var(--gh-purple);
    padding: 10px 18px;
    border-radius: 0;
    font-family: "Unytour", sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.15;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.gh-btn:hover:not(:disabled) {
    background: var(--gh-purple);
    color: var(--gh-white);
}

.gh-btn:focus-visible,
.gh-checklist input:focus-visible,
.gh-checklist textarea:focus-visible {
    outline: 3px solid rgba(81, 74, 106, .22);
    outline-offset: 3px;
}

.gh-btn--primary {
    background: var(--gh-purple);
    color: var(--gh-white);
}

.gh-btn--primary:hover:not(:disabled) {
    background: var(--gh-purple-dark);
    border-color: var(--gh-purple-dark);
}

.gh-btn--quiet {
    border-color: var(--gh-line);
    color: inherit;
    opacity: .72;
}

.gh-btn--danger {
    border-color: var(--gh-danger);
    color: var(--gh-danger);
}

.gh-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.gh-section {
    padding: 0 0 52px;
    margin: 0 0 52px;
    border-bottom: 1px solid var(--gh-line);
}

.gh-section > h2 {
    margin: 0 0 30px;
    color: #414141;
    font-family: "Unytour", sans-serif;
    font-size: clamp(31px, 3.3vw, 46px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -.015em;
}

.gh-section__items {
    display: flex;
    flex-direction: column;
}

/* Einträge nicht als Karten, sondern wie die Zeilen der PDF. */
.gh-item {
    padding: 24px 0 26px;
    border-top: 1px solid var(--gh-line);
    border-radius: 0;
    background: transparent;
    transition: opacity 150ms ease;
}

.gh-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.gh-item.is-done {
    opacity: .62;
    background: transparent;
    border-top-color: var(--gh-done);
}

.gh-item__topline {
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
}

.gh-item__check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}

.gh-item__check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gh-item__box {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 1px solid var(--gh-purple);
    border-radius: 0;
    position: relative;
    margin-top: 2px;
    background: var(--gh-white);
}

.gh-item__check input:checked + .gh-item__box {
    background: var(--gh-done);
    border-color: var(--gh-done);
}

.gh-item__check input:checked + .gh-item__box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--gh-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.gh-item__check input:focus-visible + .gh-item__box {
    outline: 3px solid rgba(81, 74, 106, .22);
    outline-offset: 3px;
}

.gh-item__title {
    color: inherit;
    font-family: "Unytour", sans-serif;
    font-size: 20px;
    line-height: 1.28;
    font-weight: 700;
}

.gh-item.is-done .gh-item__title {
    color: inherit;
    text-decoration: none;
}

.gh-item__lead {
    flex: 0 0 auto;
    color: var(--gh-purple-soft);
    font-size: 13px;
    line-height: 1.45;
    text-align: right;
    white-space: nowrap;
}

.gh-item__detail {
    max-width: 790px;
    margin: 6px 0 0 30px;
    color: inherit;
    opacity: .68;
    font-size: 15px;
    line-height: 1.5;
}

.gh-item__fields {
    gap: 18px;
    margin-top: 17px;
    margin-left: 30px;
    align-items: flex-start;
}

.gh-item__fields label {
    flex: 0 0 31%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.gh-item__fields label.gh-item__notes {
    flex: 1 1 auto;
}

.gh-item__fields label > span {
    display: block;
    margin-bottom: 7px;
    color: inherit;
    font-family: "Axiforma", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
}

/* Einheitliche, eckige Eingabefelder wie im Eventplaner. */
.gh-checklist input[type="text"],
.gh-checklist textarea {
    width: 100%;
    border: 1px solid #aaa5b3;
    background: var(--gh-white);
    color: #28252f;
    border-radius: 0;
    padding: 10px 13px;
    font: inherit;
    font-size: 15px;
    line-height: 24px;
    box-shadow: none;
}

.gh-checklist input[type="text"] {
    height: 46px;
    min-height: 46px;
}

/* Schlüssel-Feld exakt so hoch wie die übrigen Textfelder. */
.gh-checklist #gh-checklist-key {
    height: 46px;
    min-height: 46px;
    max-height: 46px;
}

/* Schlüssel und Laden-Button exakt auf einer Grundlinie / identische Höhe. */
.gh-checklist__loadrow #gh-checklist-key,
.gh-checklist__loadrow .gh-btn {
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    margin: 0 !important;
}

.gh-checklist__loadrow .gh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    line-height: 1;
}

.gh-item__fields input[type="text"],
.gh-item__fields textarea {
    margin: 0 !important;
}

/* Notizen pro Checklistenpunkt starten bewusst einzeilig (rows="1"). */
.gh-item__notes textarea {
    height: 46px;
    min-height: 46px;
    resize: vertical;
}

.gh-checklist input[type="text"]:hover,
.gh-checklist textarea:hover {
    border-color: var(--gh-purple-soft);
}

.gh-section--notes textarea {
    height: auto;
    min-height: 230px;
    resize: vertical;
}

.gh-checklist__footer-actions {
    padding: 0 0 34px;
    margin-top: -12px;
}

.gh-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    max-width: min(420px, calc(100vw - 48px));
    padding: 14px 17px;
    border-radius: 0;
    background: var(--gh-purple);
    color: var(--gh-white);
    box-shadow: 0 10px 35px rgba(37, 31, 50, .18);
}

.gh-toast.is-error {
    background: var(--gh-danger);
}

@media (max-width: 980px) {
    .gh-item__topline {
        gap: 18px;
    }

    .gh-item__lead {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .gh-checklist__toolbar {
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .gh-checklist__loadbox {
        padding-bottom: 24px;
        margin-bottom: 36px;
    }

    .gh-checklist__progress-copy,
    .gh-item__topline,
    .gh-item__fields,
    .gh-checklist__loadrow {
        flex-direction: column;
    }

    .gh-checklist__progress-copy {
        gap: 4px;
        font-size: 16px;
    }

    .gh-checklist__actions,
    .gh-checklist__footer-actions {
        gap: 8px;
    }

    .gh-btn {
        width: 100%;
        font-size: 18px;
    }

    .gh-section {
        padding-bottom: 38px;
        margin-bottom: 38px;
    }

    .gh-section > h2 {
        margin-bottom: 23px;
        font-size: clamp(29px, 9vw, 38px);
    }

    .gh-item {
        padding: 22px 0 24px;
    }

    .gh-item__title {
        font-size: 18px;
    }

    .gh-item__lead {
        flex-basis: auto;
        align-self: flex-start;
        margin-left: 30px;
        text-align: left;
        white-space: nowrap;
        font-size: 11.5px;
    }

    .gh-item__detail,
    .gh-item__fields {
        margin-left: 30px;
    }

    .gh-item__fields {
        gap: 14px;
    }

    .gh-item__fields label,
    .gh-item__fields label.gh-item__notes {
        flex-basis: auto;
        width: 100%;
    }

    .gh-section--notes textarea {
        min-height: 180px;
    }
}
