/**
 * Frontend Stylesheet für HKK Veranstaltungen
 */

.hkk-registration-wrapper {
    margin: 32px 0;
    font-family: inherit;
    box-sizing: border-box;
    --hkk-teal: #3b227b;
    --hkk-teal-dark: #2a175c;
    --hkk-green: #8eba1a;
    --hkk-green-light: #e3ebe4;
    --hkk-coral: #e77263;
    --hkk-cream: #faf5d5;
    --hkk-lime: #f2be55;
}

.hkk-booking-dialog {
	--hkk-teal: #3b227b;
	--hkk-teal-dark: #2a175c;
	--hkk-green: #8eba1a;
	--hkk-green-light: #e3ebe4;
	--hkk-coral: #e77263;
	--hkk-cream: #faf5d5;
	--hkk-lime: #f2be55;
    width: min(66rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 1.75rem;
    background: #ffffff;
    box-shadow: 0 1.5rem 5rem rgba(42, 23, 92, 0.38);
}

.hkk-booking-dialog::backdrop {
    background: rgba(42, 23, 92, 0.7);
    backdrop-filter: blur(3px);
}

.hkk-booking-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--hkk-green);
    color: #ffffff;
}

.hkk-booking-dialog__header h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.hkk-booking-dialog__close {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: var(--hkk-green);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.hkk-booking-dialog__close:hover,
.hkk-booking-dialog__close:focus-visible {
    background: var(--hkk-lime);
    color: var(--hkk-teal-dark);
}

.hkk-booking-dialog__content {
    padding: 1rem 1.5rem 1.5rem;
    background: var(--hkk-cream);
}

.hkk-booking-confirmation {
    max-width: 44rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 5vw, 3rem);
    text-align: center;
}

.hkk-booking-confirmation__eyebrow {
    margin: 0 0 0.45rem;
    color: var(--hkk-teal);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hkk-booking-confirmation h3 {
    margin: 0;
    color: var(--hkk-teal);
    font-size: clamp(1.55rem, 4vw, 2.3rem);
}

.hkk-booking-confirmation__event {
    display: grid;
    gap: 0.3rem;
    margin: 2rem 0 1.25rem;
    padding: 1.25rem;
    border: 1px solid #d5e8d7;
    border-radius: 1rem;
    background: #ffffff;
}

.hkk-booking-confirmation__event span {
    color: var(--hkk-teal);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hkk-booking-confirmation__event strong {
    color: var(--hkk-teal-dark);
    font-size: 1.2rem;
}

.hkk-booking-confirmation__event small {
    font-size: 1rem;
}

.hkk-booking-confirmation .hkk-alert {
    margin: 0;
}

.hkk-booking-confirmation__close {
    min-width: 12rem;
    margin-top: 1.5rem;
}

.hkk-booking-dialog .hkk-registration-wrapper {
    margin: 0;
}

.hkk-registration-wrapper * {
    box-sizing: border-box;
}

/* Event Info Card */
.hkk-event-card {
    background: #ffffff;
    border: 1px solid #d5e8d7;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 28px rgba(59, 34, 123, 0.1);
}

.hkk-event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #d5e8d7;
    padding-bottom: 12px;
}

.hkk-event-card-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--hkk-teal);
    font-weight: 700;
}

.hkk-event-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px;
}

.hkk-detail-item {
    text-align: center;
    font-size: 0.95rem;
}

.hkk-detail-item > div {
    display: grid;
    gap: 0.2rem;
    justify-items: center;
}

.hkk-detail-item strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

/* Badges */
.hkk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.hkk-badge-success {
    background: var(--hkk-green-light);
    color: var(--hkk-teal-dark);
    border: 1px solid #b9d966;
}

.hkk-badge-warning {
    background: #fff0ed;
    color: #a84343;
    border: 1px solid #efaaa4;
}

/* Alerts */
.hkk-alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hkk-alert-success {
    background: var(--hkk-green-light);
    color: var(--hkk-teal-dark);
    border: 1px solid #b9d966;
}

.hkk-alert-warning {
    background: #fff0ed;
    color: #8e3e3e;
    border: 1px solid #efaaa4;
}

.hkk-alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Externe Anmeldung / Zahlung */
.hkk-external-booking-notice {
    margin: 2rem 0 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid #d5e8d7;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 0.75rem 2rem rgba(59, 34, 123, 0.08);
}

.hkk-external-booking-notice__eyebrow {
    margin: 0 0 0.35rem;
    color: #d59b1a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hkk-external-booking-notice h3 {
    margin: 0;
    color: var(--hkk-teal);
    font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.hkk-external-booking-notice__text p {
    margin: 0.85rem 0;
}

.hkk-external-booking-notice .hkk-submit-btn {
    display: inline-flex;
    width: auto;
    margin-top: 0.4rem;
    text-decoration: none;
}

/* Form Styles */
.hkk-form {
    background: #ffffff;
    border: 1px solid #d5e8d7;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 28px rgba(59, 34, 123, 0.1);
}

.hkk-fieldset {
    min-inline-size: 0;
    border: 1px solid #d5e8d7;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    background: #ffffff;
}

.hkk-fieldset legend {
    max-width: 100%;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--hkk-teal);
    padding: 0 8px;
}

.hkk-fieldset-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    line-height: 1.4;
    vertical-align: middle;
}

.hkk-fieldset-heading > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hkk-fieldset-icon {
    display: block;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.hkk-fieldset-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0;
    margin-bottom: 16px;
}

.hkk-sepa-box {
    background: var(--hkk-green-light);
    border: 1px solid #d5e8d7;
}

.hkk-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px 14px -8px;
}

.hkk-form-group {
    min-width: 0;
    padding: 0 8px;
    margin-bottom: 8px;
}

.hkk-col-3 { width: 25%; }
.hkk-col-4 { width: 33.333%; }
.hkk-col-5 { width: 41.666%; }
.hkk-col-6 { width: 50%; }
.hkk-col-8 { width: 66.666%; }
.hkk-col-12 { width: 100%; }

@media (max-width: 640px) {
    .hkk-col-3, .hkk-col-4, .hkk-col-5, .hkk-col-6, .hkk-col-8, .hkk-col-12 {
        width: 100%;
    }
}

.hkk-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hkk-teal-dark);
    margin-bottom: 4px;
}

.hkk-label-with-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hkk-label-with-help > label {
    margin: 0;
}

.hkk-help-button {
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: #ffffff;
    color: var(--hkk-teal);
    cursor: help;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.hkk-help-tooltip {
    position: absolute;
    z-index: 2;
    top: calc(100% + 0.5rem);
    left: 0;
    width: min(19rem, calc(100vw - 4rem));
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    background: var(--hkk-teal-dark);
    color: #ffffff;
    box-shadow: 0 0.7rem 1.5rem rgba(42, 23, 92, 0.22);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.25rem);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.hkk-help-button:hover + .hkk-help-tooltip,
.hkk-help-button:focus-visible + .hkk-help-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hkk-field-error {
    margin: 0.35rem 0 0;
    color: #a84343;
    font-size: 0.82rem;
    font-weight: 600;
}

.hkk-required {
    color: #dc2626;
}

.hkk-form-group input[type="text"],
.hkk-form-group input[type="email"],
.hkk-form-group input[type="tel"],
.hkk-form-group input[type="number"],
.hkk-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bad6d9;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hkk-form-group input:focus,
.hkk-form-group select:focus {
    outline: none;
    border-color: var(--hkk-teal);
    box-shadow: 0 0 0 3px rgba(59, 34, 123, 0.15);
}

.hkk-form-group input[readonly] {
    background: #f4f8f4;
    color: var(--hkk-teal-dark);
    cursor: default;
}

.hkk-participant-fields {
    margin: 4px 0 18px;
    padding-top: 12px;
    border-top: 1px solid #d5e8d7;
}

.hkk-participant-fields h3 {
    margin: 16px 0 4px;
    font-size: 1rem;
    color: var(--hkk-teal-dark);
}

.hkk-participant-fields p {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: #64748b;
}

.hkk-participant-row[hidden] {
    display: none;
}

.hkk-cost-summary {
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #bad6d9;
}

.hkk-total-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hkk-teal);
}

/* Checkboxes */
.hkk-checkbox-group {
    margin-bottom: 12px;
}

.hkk-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--hkk-teal-dark);
    cursor: pointer;
    line-height: 1.4;
}

.hkk-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Submit */
.hkk-form-submit {
    margin-top: 24px;
    text-align: center;
}

.hkk-submit-btn {
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    width: 100%;
    max-width: 420px;
}

.hkk-btn-primary {
    background: var(--hkk-green);
    color: #fff;
}

.hkk-btn-primary:hover {
    background: var(--hkk-green);
    color: #fff;
    filter: brightness(0.88);
}

.hkk-btn-warning {
    background: var(--hkk-teal);
    color: white;
}

.hkk-btn-warning:hover {
    background: var(--hkk-teal-dark);
}

@media (max-width: 640px) {
    .hkk-booking-dialog {
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
        border-radius: 1.25rem;
    }

    .hkk-booking-dialog__header {
        padding: 1rem;
    }

    .hkk-booking-dialog__content {
        padding: 0.75rem;
    }

    .hkk-event-card,
    .hkk-form {
        padding: 1rem;
        border-radius: 1rem;
    }

    .hkk-fieldset {
        padding: 1rem;
    }
}
