/* Eishockey Spielplanung – Frontend */

/* Kalender und Filterleiste loesen sich bewusst aus der (oft schmalen)
   Inhaltsspalte des WordPress-Themes und nutzen 90% der Fensterbreite,
   zentriert. Funktioniert unabhaengig von Theme-Containerbreiten; falls das
   Theme "overflow: hidden" auf einem Elternelement des Inhaltsbereichs
   setzt, kann dieser Effekt dort ausnahmsweise nicht greifen. */
.ehsp-filter-bar,
.ehsp-calendar-container {
    width: 90vw;
    max-width: 90vw;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: calc(-45vw) !important;
    margin-right: calc(-45vw) !important;
}

@media (max-width: 900px) {
    .ehsp-filter-bar,
    .ehsp-calendar-container {
        width: 96vw;
        max-width: 96vw;
        margin-left: calc(-48vw) !important;
        margin-right: calc(-48vw) !important;
    }
}

.ehsp-calendar-container {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.ehsp-calendar {
    width: 100%;
}

.ehsp-filter-bar {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ehsp-filter-bar label {
    font-weight: 600;
}

.ehsp-filter-bar select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ehsp-user-hint {
    font-size: 13px;
    color: #555;
}

.ehsp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0 25px;
    font-size: 13px;
}

.ehsp-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ehsp-legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #bbb;
    border-radius: 3px;
}

/* Formular */
.ehsp-frontend-form-container {
    max-width: 760px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ehsp-perm-hint {
    font-size: 13px;
    color: #555;
    background: #f4f8ff;
    border-left: 4px solid #2271b1;
    padding: 10px 12px;
}

.ehsp-frontend-form-container .form-group,
.ehsp-game-form .form-group {
    margin-bottom: 20px;
}

.ehsp-frontend-form-container label,
.ehsp-game-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.ehsp-frontend-form-container input[type="text"],
.ehsp-frontend-form-container input[type="time"],
.ehsp-frontend-form-container input[type="date"],
.ehsp-frontend-form-container select,
.ehsp-game-form input[type="text"],
.ehsp-game-form input[type="time"],
.ehsp-game-form input[type="date"],
.ehsp-game-form select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

.ehsp-date-picker {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    background: #fff;
}

.ehsp-date-picker .fc-daygrid-day.ehsp-day-selected {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
    background: #eaf3ff;
}

.ehsp-form-message {
    display: inline-block;
    margin-left: 12px;
    font-weight: 600;
}

.ehsp-form-message.success {
    color: #2f8f46;
}

.ehsp-form-message.error {
    color: #dc323f;
}

.ehsp-meta {
    font-size: 12px;
    color: #777;
}

.ehsp-hint {
    font-size: 13px;
    color: #b26500;
}

.ehsp-notice {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.ehsp-notice-warning {
    background: #fff8e5;
    border-left: 4px solid #ffb900;
}

.ehsp-login-box {
    max-width: 420px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ehsp-login-box input[type="text"],
.ehsp-login-box input[type="password"] {
    width: 100%;
    padding: 9px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Modal */
.ehsp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    padding: 30px 15px;
    overflow: auto;
}

.ehsp-modal-content {
    background: #fff;
    width: 90vw;
    max-width: 90vw;
    box-sizing: border-box;
    margin: 30px auto;
    padding: 28px 25px 25px;
    border-radius: 6px;
    position: relative;
}

@media (max-width: 900px) {
    .ehsp-modal-content {
        width: 96vw;
        max-width: 96vw;
    }
}

.ehsp-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.ehsp-button-danger {
    background: #dc323f !important;
    border-color: #dc323f !important;
    color: #fff !important;
}

/* Kalender */
.fc {
    width: 100%;
    font-size: 14px;
}

.fc .fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.fc .fc-daygrid-day.fc-day-today {
    background: #eef6ff;
}

.fc-event {
    cursor: pointer;
}

.fc-event.ehsp-event-deleted,
.fc-event.ehsp-event-deleted .fc-event-title,
.fc-event.ehsp-event-deleted .fc-event-time {
    text-decoration: line-through;
    opacity: 0.65;
}

@media (max-width: 768px) {
    .ehsp-frontend-form-container {
        margin: 10px;
        padding: 15px;
    }

    .ehsp-modal-content {
        margin: 10px auto;
        padding: 22px 15px 15px;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1em;
    }
}

/* ---- Eigenständige Benutzerverwaltung / Anmeldung ---- */

.ehsp-btn {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.ehsp-btn:hover {
    background: #eceded;
}

.ehsp-btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.ehsp-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.ehsp-notice-error {
    background: #fdf1f1;
    border-left: 4px solid #dc323f;
}

.ehsp-notice-success {
    background: #f0f8f1;
    border-left: 4px solid #2f8f46;
}

.ehsp-notice-info {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
}

.ehsp-auth-form .form-group {
    margin-bottom: 16px;
}

.ehsp-auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.ehsp-auth-form input[type="text"],
.ehsp-auth-form input[type="email"],
.ehsp-auth-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

label.ehsp-inline {
    display: block;
    font-weight: 400;
    margin-bottom: 6px;
}

.ehsp-kv {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ehsp-kv th,
.ehsp-kv td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.ehsp-kv th {
    width: 45%;
    font-weight: 600;
}

/* Benutzerverwaltung */
.ehsp-usermgr .ehsp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: #fff;
}

.ehsp-usermgr .ehsp-table th,
.ehsp-usermgr .ehsp-table td {
    border: 1px solid #e2e2e2;
    padding: 8px 10px;
    font-size: 14px;
    vertical-align: top;
    text-align: left;
}

.ehsp-usermgr .ehsp-table thead th {
    background: #f6f7f7;
    font-weight: 600;
}

.ehsp-row-inactive {
    background: #f7f7f7;
    color: #777;
}

.ehsp-edit-row > td {
    background: #fafbfc;
}

.ehsp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.ehsp-user-form .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.ehsp-user-form input[type="text"],
.ehsp-user-form input[type="email"],
.ehsp-user-form input[type="password"],
.ehsp-user-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.ehsp-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
}

.ehsp-status-active {
    color: #2f8f46;
    font-weight: 600;
}

.ehsp-status-deleted {
    color: #dc323f;
    font-weight: 600;
}

@media (max-width: 782px) {
    .ehsp-usermgr .ehsp-table,
    .ehsp-usermgr .ehsp-table thead,
    .ehsp-usermgr .ehsp-table tbody,
    .ehsp-usermgr .ehsp-table tr,
    .ehsp-usermgr .ehsp-table td,
    .ehsp-usermgr .ehsp-table th {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .ehsp-usermgr .ehsp-table thead {
        display: none;
    }

    .ehsp-usermgr .ehsp-table tr {
        margin-bottom: 12px;
        border: 1px solid #ddd;
    }
}

/* Abmelde-Button im Profilfenster */
.ehsp-btn-logout {
    background: #fff;
    border-color: #dc323f;
    color: #dc323f;
    text-decoration: none;
    line-height: 1.4;
}

.ehsp-btn-logout:hover {
    background: #dc323f;
    color: #fff;
}

.ehsp-profile-box .ehsp-form-actions {
    align-items: center;
    margin-bottom: 0;
}

/* ---- Freie Termine (CSV-Import) ---- */

.fc-event.ehsp-slot-event {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 6px, #eaf6ec 6px, #eaf6ec 12px) !important;
    border: 1px dashed #2f8f46 !important;
    color: #1d5c30 !important;
    font-style: italic;
}

.fc-event.ehsp-slot-event:hover {
    background: #dff2e3 !important;
}

.ehsp-legend-color.ehsp-legend-slot {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 4px, #eaf6ec 4px, #eaf6ec 8px);
    border: 1px dashed #2f8f46;
}

.ehsp-slot-panel {
    margin-top: 28px;
}

.ehsp-slotmgr .form-group {
    margin-bottom: 12px;
}

.ehsp-slotmgr .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.ehsp-slotmgr .form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.ehsp-slot-import {
    background: #fafbfc;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}

.ehsp-slot-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 16px;
}

.ehsp-slot-table th,
.ehsp-slot-table td {
    border: 1px solid #e2e2e2;
    padding: 7px 10px;
    text-align: left;
    font-size: 14px;
}

.ehsp-slot-table thead th {
    background: #f6f7f7;
    font-weight: 600;
}

.ehsp-inline-form {
    display: inline;
    margin: 0;
}

.ehsp-slot-errors {
    margin: 8px 0 0 18px;
    font-size: 13px;
}

.ehsp-slot-selected {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #eaf6ec;
    border: 1px solid #2f8f46;
    border-radius: 4px;
    padding: 10px 12px;
    color: #1d5c30;
    font-weight: 600;
}

.ehsp-notice-warning {
    background: #fff8e5;
    border-left: 4px solid #dba617;
}

/* ---- Login- und Profil-Leiste ---- */

.ehsp-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 10px 14px;
    margin: 0 0 18px;
    font-size: 14px;
}

.ehsp-bar-title {
    font-weight: 700;
    color: #1d2327;
    white-space: nowrap;
}

.ehsp-bar-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0;
    flex: 1 1 auto;
}

.ehsp-bar-field {
    display: block;
    margin: 0;
}

.ehsp-bar-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.ehsp-bar-field input {
    min-width: 170px;
    padding: 6px 9px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
}

.ehsp-bar-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
    color: #50575e;
}

.ehsp-bar .ehsp-btn {
    padding: 7px 14px;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.ehsp-bar-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    flex: 1 1 auto;
}

.ehsp-bar-item {
    color: #50575e;
    white-space: nowrap;
}

.ehsp-bar-item small {
    color: #787c82;
}

.ehsp-bar-badge {
    background: #e3f0ff;
    border: 1px solid #a7c7f0;
    border-radius: 12px;
    padding: 2px 10px;
    color: #1d4e89;
    font-size: 13px;
}

.ehsp-bar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ehsp-bar-message {
    flex: 1 1 100%;
    border-radius: 3px;
    padding: 7px 10px;
    font-size: 13px;
}

.ehsp-bar-error {
    background: #fdeceb;
    border-left: 4px solid #dc323f;
    color: #8a1f28;
}

.ehsp-bar-success {
    background: #edfaef;
    border-left: 4px solid #2f8f46;
    color: #1d5c30;
}

.ehsp-bar-warning {
    background: #fff8e5;
    border-left: 4px solid #dba617;
    color: #7a5c05;
}

.ehsp-modal-narrow {
    width: 90vw;
    max-width: 90vw;
}

.ehsp-kv {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
}

.ehsp-kv th,
.ehsp-kv td {
    border-bottom: 1px solid #ececec;
    padding: 6px 8px;
    text-align: left;
}

.ehsp-kv th {
    width: 40%;
    color: #50575e;
    font-weight: 600;
}

@media (max-width: 782px) {
    .ehsp-bar-field input {
        min-width: 0;
        width: 100%;
    }

    .ehsp-bar-field,
    .ehsp-bar-form,
    .ehsp-bar-actions {
        width: 100%;
        margin-left: 0;
    }

    .ehsp-bar-actions .ehsp-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ---- Breite Darstellung für [ehsp_frontend_form] ---- */
/* Loest sich wie Kalender/Verband-Bereich bewusst aus der Theme-Spalte und
   erzwingt 90% der tatsaechlichen Fensterbreite, unabhaengig vom Theme. */
.ehsp-frontend-form-container.ehsp-wide {
    width: 90vw;
    max-width: 90vw;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: calc(-45vw) !important;
    margin-right: calc(-45vw) !important;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ehsp-wide-notice {
    width: 90vw;
    max-width: 90vw;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: calc(-45vw) !important;
    margin-right: calc(-45vw) !important;
    margin-top: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .ehsp-frontend-form-container.ehsp-wide,
    .ehsp-wide-notice {
        width: 96vw;
        max-width: 96vw;
        margin-left: calc(-48vw) !important;
        margin-right: calc(-48vw) !important;
    }
}

.ehsp-frontend-form-container.ehsp-wide .ehsp-slot-table,
.ehsp-frontend-form-container.ehsp-wide .ehsp-slot-import {
    max-width: none;
}

@media (max-width: 768px) {
    .ehsp-frontend-form-container.ehsp-wide,
    .ehsp-wide-notice {
        width: auto;
        margin: 10px;
    }
}


/* ---- Freie Termine je Halle und Sperrungen ---- */

.fc-event.ehsp-slot-event.ehsp-slot-salzgittersee {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 7px, #cdebd3 7px, #cdebd3 14px) !important;
    border: 1px dashed #2f8f46 !important;
    color: #1d5c30 !important;
}

.fc-event.ehsp-slot-event.ehsp-slot-braunlage {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 7px, #f8cfcf 7px, #f8cfcf 14px) !important;
    border: 1px dashed #c0392b !important;
    color: #8a1f28 !important;
}

.fc-event.ehsp-slot-event.ehsp-slot-other {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 7px, #e6e8ea 7px, #e6e8ea 14px) !important;
    border: 1px dashed #6c7781 !important;
    color: #3c434a !important;
}

.fc-event.ehsp-block-event {
    background: repeating-linear-gradient(135deg, #e9e9e9, #e9e9e9 7px, #cfcfcf 7px, #cfcfcf 14px) !important;
    border: 1px solid #6c7781 !important;
    color: #3c434a !important;
    font-weight: 600;
}

.ehsp-legend-color.ehsp-legend-slot-sz {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 4px, #cdebd3 4px, #cdebd3 8px);
    border: 1px dashed #2f8f46;
}

.ehsp-legend-color.ehsp-legend-slot-brl {
    background: repeating-linear-gradient(135deg, #ffffff, #ffffff 4px, #f8cfcf 4px, #f8cfcf 8px);
    border: 1px dashed #c0392b;
}

.ehsp-legend-color.ehsp-legend-block {
    background: repeating-linear-gradient(135deg, #e9e9e9, #e9e9e9 4px, #cfcfcf 4px, #cfcfcf 8px);
    border: 1px solid #6c7781;
}

.ehsp-slot-subhead {
    margin: 26px 0 8px;
    font-size: 17px;
}

.ehsp-block-times {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.ehsp-block-times .form-group {
    margin-bottom: 0;
}


/* ---- Druck- und Export-Schaltflächen ---- */

.ehsp-output-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 12px;
}

.ehsp-output-buttons .ehsp-button {
    display: inline-block;
    padding: 6px 14px;
    background: #2f5f8f;
    color: #ffffff !important;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none !important;
}

.ehsp-output-buttons .ehsp-button:hover {
    background: #24496e;
}

.ehsp-output-buttons .ehsp-button.ehsp-secondary {
    background: #ffffff;
    color: #2f5f8f !important;
    border: 1px solid #2f5f8f;
}

.ehsp-output-buttons .ehsp-button.ehsp-secondary:hover {
    background: #eef4fa;
}

@media (max-width: 600px) {
    .ehsp-output-buttons {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ---- Import von Spielterminen ---- */

.ehsp-game-import {
    margin: 24px 0;
    padding: 16px 18px;
    background: #f7f9fb;
    border: 1px solid #d8dde2;
    border-radius: 6px;
}

.ehsp-game-import h3 {
    margin-top: 0;
}

.ehsp-game-import .ehsp-hint {
    font-size: 13px;
    color: #50575e;
}

.ehsp-import-errors {
    margin: 8px 0 0 18px;
    font-size: 13px;
}


/* ---- Terminanfragen ---- */

/* Vormerkungen: Hallenfarbe, Streifen gegenläufig zu den freien Zeiten */

.fc-event.ehsp-request-event,
.fc-event.ehsp-request-event.ehsp-request-salzgittersee,
.fc-event.ehsp-request-event.ehsp-request-braunlage,
.fc-event.ehsp-request-event.ehsp-request-other {
    background: repeating-linear-gradient(135deg, #e3e5e7, #e3e5e7 5px, #c4c8cc 5px, #c4c8cc 10px) !important;
    border: 1px dashed #6c7781 !important;
    color: #3c434a !important;
}

.ehsp-legend-color.ehsp-legend-request {
    background: repeating-linear-gradient(135deg, #e3e5e7, #e3e5e7 4px, #c4c8cc 4px, #c4c8cc 8px);
    border: 1px dashed #6c7781;
}

/* Spieltermine: Hintergrund nach Austragungsstätte */

.fc-event.ehsp-game-salzgittersee { color: #1d5c30 !important; }
.fc-event.ehsp-game-braunlage { color: #8a1f28 !important; }
.fc-event.ehsp-game-other { color: #3c434a !important; }

.ehsp-request-form .ehsp-request-slot {
    padding: 10px 12px;
    background: #f2f6fa;
    border-left: 4px solid #2f5f8f;
    margin-bottom: 14px;
}

.ehsp-request-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.ehsp-request-form input[type="text"],
.ehsp-request-form input[type="email"],
.ehsp-request-form select {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.ehsp-request-form .ehsp-hint {
    font-size: 13px;
    color: #50575e;
}

.ehsp-request-message:empty {
    display: none;
}

/* ---- Panel für offene Anfragen ---- */

.ehsp-request-panel {
    margin: 24px 0;
    padding: 16px 18px;
    background: #fff8ee;
    border: 1px solid #f0d3a8;
    border-radius: 6px;
}

.ehsp-request-panel h3 {
    margin-top: 0;
}

.ehsp-request-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ehsp-request-table th,
.ehsp-request-table td {
    border: 1px solid #e3d3bb;
    padding: 7px 9px;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
    background: #ffffff;
}

.ehsp-request-table th {
    background: #fdf1de;
}

.ehsp-inline-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
}

/* ---- Entscheidung im Kalender-Popup ---- */

.ehsp-request-decide {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e3d3bb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ehsp-decide-message {
    width: 100%;
    margin: 4px 0 0;
    font-size: 14px;
    color: #1f7a3d;
}

.ehsp-decide-message.ehsp-error {
    color: #b32d2e;
}

.ehsp-decide-message:empty {
    display: none;
}

/* Anfragen ohne E-Mail-Bestätigung */

.fc-event.ehsp-request-event.ehsp-request-unconfirmed {
    border-style: dotted !important;
    opacity: 0.85;
}

/* ---- Schnelleintrag aus dem Kalender ---- */

.ehsp-quick-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.ehsp-quick-form input[type="text"],
.ehsp-quick-form input[type="time"],
.ehsp-quick-form select {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-weight: 400;
}

.ehsp-quick-form p {
    margin: 0 0 12px;
}

.ehsp-quick-message.success { color: #1f7a3d; }
.ehsp-quick-message.error { color: #b32d2e; }
.ehsp-quick-message:empty { display: none; }

/* ---- Vereinsauswahl und offene Spiele ---- */

.ehsp-team-manual {
    margin-top: 6px;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.ehsp-open-games {
    margin: 24px 0;
    padding: 16px 18px;
    background: #f4f8fb;
    border: 1px solid #cfdce8;
    border-radius: 6px;
}

.ehsp-open-games h3 {
    margin-top: 0;
}

.ehsp-open-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.ehsp-open-table th,
.ehsp-open-table td {
    border: 1px solid #d3dde6;
    padding: 6px 9px;
    font-size: 14px;
    text-align: left;
    background: #ffffff;
}

.ehsp-open-table th {
    background: #e8f0f7;
}

.ehsp-open-table tr.ehsp-open-done td {
    color: #1f7a3d;
}

.ehsp-open-table tr.ehsp-open-pending td:last-child {
    color: #b32d2e;
    font-weight: 600;
}

/* ---- Spielevereinbarungen im Popup ---- */

.ehsp-agreements {
    max-height: 70vh;
    overflow: auto;
}

.ehsp-agreements-sub {
    margin: 0 0 10px;
    color: #50575e;
    font-size: 13px;
}

.ehsp-agreements-actions {
    margin: 0 0 14px;
}

.ehsp-agreements table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.ehsp-agreements th,
.ehsp-agreements td {
    border: 1px solid #c3c4c7;
    padding: 6px 8px;
    font-size: 13px;
    text-align: left;
    vertical-align: top;
}

.ehsp-agreements th {
    background: #f0f0f1;
}

.ehsp-agreements h2 {
    font-size: 16px;
    margin: 18px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #1d2327;
}

.ehsp-agreements h3.ehsp-sub-head {
    font-size: 14px;
    margin: 12px 0 6px;
}

.ehsp-agreements span.ehsp-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #1d2327;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: -2px;
}

.ehsp-agreements td.ehsp-venue-salzgittersee { background: #d6f5dc; }
.ehsp-agreements td.ehsp-venue-braunlage { background: #fbd9d9; }
.ehsp-agreements td.ehsp-venue-other { background: #ececec; }

.ehsp-agreements td.ehsp-open-cell {
    background: #f7c8c8;
    height: 30px;
}

.ehsp-agreements td.ehsp-open-pick {
    cursor: pointer;
    color: #8a1f28;
    font-weight: 600;
}

.ehsp-agreements td.ehsp-open-pick:hover {
    background: #f2aeae;
}

.ehsp-agreements .ehsp-empty {
    color: #50575e;
    font-style: italic;
}

.ehsp-agreements .ehsp-color-hint {
    font-size: 12px;
    color: #50575e;
}

.ehsp-agreements .ehsp-color-hint span {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 8px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
}

/* Terminauswahl */

.ehsp-slot-pick h4 {
    margin: 14px 0 6px;
    font-size: 14px;
}

.ehsp-slot-list {
    max-height: 40vh;
    overflow: auto;
}

.ehsp-slot-table {
    width: 100%;
    border-collapse: collapse;
}

.ehsp-slot-table th,
.ehsp-slot-table td {
    border: 1px solid #d3dde6;
    padding: 5px 8px;
    font-size: 13px;
    text-align: left;
}

.ehsp-slot-table th {
    background: #e8f0f7;
}

.ehsp-btn-small {
    padding: 3px 10px;
    font-size: 12px;
}

.ehsp-slot-message.error {
    color: #b32d2e;
}

/* Breitere Darstellung, wenn die Spielevereinbarungen im Popup stehen */
.ehsp-modal-content.ehsp-modal-wide {
    width: 90vw;
    max-width: 90vw;
}

/* Kollisionen in der Terminauswahl */

.ehsp-slot-table tr.ehsp-slot-same td {
    background: #f7c8c8;
}

.ehsp-slot-table tr.ehsp-slot-near td {
    background: #fdf0b4;
}

.ehsp-slot-table td.ehsp-slot-note {
    font-size: 12px;
    color: #50575e;
}

.ehsp-slot-legend {
    margin: 0 0 6px;
    font-size: 12px;
    color: #50575e;
}

.ehsp-slot-key {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 4px 0 10px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    vertical-align: -2px;
}

.ehsp-slot-key-same { background: #f7c8c8; }
.ehsp-slot-key-near { background: #fdf0b4; }

/* Legende: Anfrage ohne E-Mail-Bestätigung */
.ehsp-legend-color.ehsp-legend-unconfirmed {
    background: repeating-linear-gradient(135deg, #e3e5e7, #e3e5e7 4px, #c4c8cc 4px, #c4c8cc 8px);
    border: 2px dotted #6c7781;
}

/* Häkchen „Freie Eiszeiten anzeigen“ in der Filterleiste */
.ehsp-filter-bar .ehsp-slot-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 18px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.ehsp-filter-bar .ehsp-slot-toggle-label input[type="checkbox"] {
    margin: 0;
}

/* Begründung bei Ablehnung und Löschung */
.ehsp-reason-label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #333;
}

.ehsp-reason-label textarea,
.ehsp-reason-box textarea {
    width: 100%;
    min-width: 220px;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #c3c8d0;
    border-radius: 4px;
    font: inherit;
    font-size: 13px;
}

.ehsp-reason-box p {
    margin: 0 0 10px;
}

.ehsp-reason-message:empty {
    display: none;
}

.ehsp-reason-message.ehsp-error {
    color: #a12128;
    font-weight: 600;
}

/* Vorgemerkte Termine schraffiert darstellen */
.ehsp-agreements tr.ehsp-hatched td,
.ehsp-plan-table tr.ehsp-hatched td {
    background-image: repeating-linear-gradient(135deg, #c4c8cc 0 5px, #e3e5e7 5px 10px) !important;
}

.ehsp-hatch-text {
    display: inline-block;
    padding: 1px 4px;
    background-image: repeating-linear-gradient(135deg, #c4c8cc 0 5px, #e3e5e7 5px 10px) !important;
}

.ehsp-pending-note {
    display: inline-block;
    margin-top: 2px;
    font-size: 11px;
    color: #50575e;
}

.ehsp-color-hint span.ehsp-hatch-key {
    background-image: repeating-linear-gradient(135deg, #c4c8cc 0 5px, #e3e5e7 5px 10px) !important;
}

/* Schraffur unabhängig vom umgebenden Container */
tr.ehsp-hatched td {
    background-image: repeating-linear-gradient(135deg, #c4c8cc 0 5px, #e3e5e7 5px 10px) !important;
}

/* Schraffierter Button für Vormerkungen */
.ehsp-btn.ehsp-btn-hatched {
    background-color: #f3f4f5;
    background-image: repeating-linear-gradient(135deg, #c4c8cc 0 5px, #e3e5e7 5px 10px);
    border: 1px dashed #6c7781;
    color: #1d2327;
    font-weight: 600;
}

.ehsp-btn.ehsp-btn-hatched:hover {
    background-color: #e8eaec;
    border-color: #1d2327;
}

.ehsp-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Spielfest/Turnier */
.ehsp-check-line small,
.ehsp-tournament-group small {
    display: block;
    color: #50575e;
    font-size: 12px;
}

.ehsp-tournament-note {
    margin: 6px 0;
    padding: 4px 8px;
    background: #eef4ff;
    border-left: 3px solid #2271b1;
    font-size: 13px;
}

td.ehsp-covered-cell {
    background: #e9eaec !important;
    color: #8a8f94 !important;
    font-style: italic;
}

span.ehsp-tournament-tag {
    font-size: 11px;
    color: #50575e;
}

/* Freigeben/Ablehnen direkt in den Spielevereinbarungen */
.ehsp-decide-inline {
    display: block;
    margin-top: 6px;
}

.ehsp-decide-inline .ehsp-btn-small {
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.6;
}

.ehsp-decide-inline .ehsp-decide-reason {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 3px 6px;
    font-size: 11px;
    border: 1px solid #c4c8cc;
    border-radius: 3px;
}

.ehsp-decide-inline .ehsp-decide-message {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-style: italic;
}

.ehsp-decide-inline .ehsp-decide-message.ehsp-error {
    color: #b32d2e;
    font-style: normal;
}

@media print {
    .ehsp-decide-inline { display: none; }
}

/* Offene Spiele in der Ligen-Überschrift */
.ehsp-group-open {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.ehsp-group-open-red {
    background: #f7c8c8;
    color: #8a1f1f;
}

.ehsp-group-open-done {
    background: #d8ecd8;
    color: #205020;
}

/* Bestätigen ohne vorliegende E-Mail-Bestätigung */
.ehsp-btn-force {
    background: #f0b849;
    border-color: #d09215;
    color: #3c2f00;
}

.ehsp-btn-force:hover {
    background: #e0a530;
}

/* Geplante Spiele je Liga und Gesamtübersicht */
.ehsp-group-planned {
    background: #d8ecd8;
    color: #205020;
}

.ehsp-total-line {
    margin: 0 0 14px;
    font-size: 13px;
}

.ehsp-total-line span {
    display: inline-block;
    margin-right: 8px;
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.ehsp-total-planned {
    background: #d8ecd8;
    color: #205020;
}

.ehsp-total-open {
    background: #f7c8c8;
    color: #8a1f1f;
}

/* Vorgemerkte Spiele in Überschrift und Gesamtübersicht */
.ehsp-group-pending,
.ehsp-total-pending {
    background-image: repeating-linear-gradient(135deg, #c4c8cc 0 5px, #e3e5e7 5px 10px);
    color: #3c4043;
}

/* Reiter (Tabs) in den Vereins-Einstellungen */
.ehsp-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.ehsp-settings-tabs button {
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
}

.ehsp-settings-tabs button.ehsp-settings-tab-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
