/**
 * Schollin Schulfrei Kalender — Frontend-Styles
 *
 * Keine Inline-Styles im PHP-Template.
 * Dynamische Farben kommen als CSS Custom Properties via wp_add_inline_style().
 */

/* Wrapper */
.schollin-sf-calendar-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Kalender-Container */
#schollin-sf-calendar {
    width: 100%;
    min-height: 500px;
}

/* Speichern-Button */
/*
#schollin-sf-save {
    display: block;
    margin: 20px auto;
    padding: 10px 28px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    background-color: #1a73e8;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    transition:
        background-color 0.15s,
        box-shadow 0.15s;
}

#schollin-sf-save:hover {
    background-color: #1558b0;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.4);
}

#schollin-sf-save:active {
    background-color: #0f3f7f;
    box-shadow: none;
}

#schollin-sf-save:disabled {
    background-color: #a8c7f5;
    cursor: not-allowed;
    box-shadow: none;
}
*/
.schollin-sf-calendar-wrapper .et_pb_button_module_wrapper {
    margin-top: 16px;
    margin-bottom: 0 !important;
    text-align: center;
}
/* Legende */
#schollin-sf-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

/* Legenden-Pill: Grundstil */
.schollin-sf-legend-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}

/* Legenden-Pills: Farben aus CSS Custom Properties */
.schollin-sf-legend-pill--beweglich {
    background-color: var(--schollin-sf-beweglich-bg, #3366ff);
    color: var(--schollin-sf-beweglich-text, #ffffff);
}

.schollin-sf-legend-pill--wenig {
    background-color: var(--schollin-sf-wenig-bg, #ffcc00);
    color: var(--schollin-sf-wenig-text, #000000);
}

.schollin-sf-legend-pill--kurz {
    background-color: var(--schollin-sf-kurz-bg, #ff8800);
    color: var(--schollin-sf-kurz-text, #ffffff);
}

.schollin-sf-legend-pill--ferien {
    background-color: var(--schollin-sf-ferien-bg, #cceecc);
    color: var(--schollin-sf-ferien-text, #155724);
}

/* FullCalendar-Anpassungen */

/* Gesperrte Tage: Wochenenden */
.schollin-sf-day--weekend .fc-daygrid-day-frame {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.schollin-sf-day--weekend .fc-daygrid-day-number {
    color: #aaaaaa;
}

/* Gesperrte Tage: Vergangenheit und heutiger Tag */
.fc-day-past .fc-daygrid-day-frame,
.fc-day-today .fc-daygrid-day-frame {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.fc-day-past .fc-daygrid-day-number,
.fc-day-today .fc-daygrid-day-number {
    color: #bbbbbb;
}

.fc-event-title {
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.3 !important;
}

.fc-event {
    cursor: pointer;
    overflow: visible !important;
}

/* Status-Meldung — Toast oben rechts */
#schollin-sf-status {
    position: fixed;
    top: 120px;
    right: 24px;
    z-index: 9999;
    background: #333333;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 0.9em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    pointer-events: none;
}

#schollin-sf-status.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Login-Formular */
.schollin-sf-login-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.schollin-sf-login {
    width: 100%;
    max-width: 360px;
    padding: 32px;
    box-sizing: border-box;
}

.schollin-sf-login h2 {
    margin: 0 0 24px;
    font-size: 1.4em;
    text-align: center;
}

.schollin-sf-login label {
    position: absolute;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
}

.schollin-sf-login input[type='text'],
.schollin-sf-login input[type='password'] {
    background: #e9e9e9;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    padding: 0 14px;
    font-size: 17px;
    color: rgb(59, 59, 59);
    line-height: 100%;
    transition:
        border 0.15s,
        box-shadow 0.15s;
    height: 43px;
    width: 100%;
    display: block;
    vertical-align: middle;
}
.schollin-sf-login input[type='text']:focus,
.schollin-sf-login input[type='password']:focus {
    border-color: #d63637;
    box-shadow: 0 0 0 1px #d63637;
}
/*
.schollin-sf-login input[type='submit'] {
    font-size: 17px;
    color: #fff;
    background-color: #3b3b3b;
    height: 41px;
    width: 100%;
    line-height: 100%;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    padding: 0 15px;
}

.schollin-sf-login input[type='submit']:hover {
    background: #353535;
}
.schollin-sf-login input[type='submit']:focus:after {
    content: '';
    position: absolute;
    border: 2px solid #066aab;
    border-radius: calc(3px + 2px);
    top: calc(-4px - 1px, 1px);
    right: calc(-4px - 1px, 1px);
    bottom: calc(-4px - 1px, 1px);
    left: calc(-4px - 1px, 1px);
}
*/
.schollin-sf-login .et_pb_button_module_wrapper {
    margin-top: 16px;
}
.schollin-sf-login .et_pb_button {
    display: block;
    width: 100%;
}
.schollin-sf-login .et_pb_button {
    display: block;
    width: 100%;
}
.schollin-sf-login .et_pb_button:after {
    transition: all 300ms ease 0ms;
}

.schollin-sf-login__error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6c6;
    border-radius: var(--wpforms-field-border-radius, 4px);
    padding: 10px var(--wpforms-field-size-padding-h, 14px);
    margin-bottom: 16px;
    font-size: var(--wpforms-label-size-sublabel-font-size, 14px);
}

.fc-event-title {
    line-height: inherit !important;
}
.fc-h-event .fc-event-title-container {
    text-align: center !important;
}
.fc .fc-view-harness {
    max-height: 65vh !important;
}
.fc-theme-standard td {
    padding: 0 !important;
}
.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {
    min-height: 2em !important;
}

.fc-scrollgrid-sync-table {
    max-height: 100% !important;
}
/* Responsive */
@media (max-width: 600px) {
    .schollin-sf-calendar-wrapper {
        padding: 0 8px;
    }

    .fc-event-title {
        font-size: 0.75em !important;
    }

    .fc-col-header-cell-cushion,
    .fc-daygrid-day-number {
        font-size: 0.8em !important;
        padding: 2px !important;
    }
}

/**
 * DIVI OVerrides:
 */

.entry-content table:not(.variations) {
    border: initial !important;
    margin: 0 !important;
}
.entry-content thead th,
.entry-content tr th {
    font-size: 17px !important;
    color: initial !important;
    padding: initial !important;
}
.entry-content tr td {
    border-top: initial !important;
    padding: initial !important;
}
