/**
 * Event Slide-In CSS - Links-Version
 */

/* Basis-Stile für das Slide-In */
.ets-slide-in {
    position: fixed;
    top: 50%;
    left: -400px; /* Von rechts nach links geändert */
    width: 400px;
    max-width: 90vw;
    transform: translateY(-50%);
    background-color: #fff;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2); /* Schatten angepasst */
    border-radius: 0 8px 8px 0; /* Border-Radius umgedreht */
    z-index: 9999;
    transition: left 0.5s ease-in-out; /* Transition geändert */
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Wenn das Slide-In aktiv/sichtbar ist */
.ets-slide-in.active {
    left: 0; /* Von rechts nach links geändert */
}

/* Der Hauptinhalt des Slide-Ins */
.ets-slide-in-content {
    width: calc(100% - 50px);
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

/* Der seitliche Tab/Button mit dem 90°-gedrehten Text */
.ets-slide-in-tab {
    width: 50px;
    background-color: #D3B574;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 8px 0; /* Border-Radius umgedreht */
    position: absolute;
    right: -50px; /* Von links nach rechts geändert */
    top: 0;
    bottom: 0;
}

/* Der gedrehte Text im Tab */
.ets-slide-in-tab span {
    transform: rotate(-90deg);
    white-space: nowrap;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    text-align: center;
}

/* Close-Button */
.ets-slide-in-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.ets-slide-in-close:hover {
    color: #333;
}

/* Header-Bereich */
.ets-slide-in-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ets-slide-in-header h3 {
    margin: 0;
    font-size: 18px;
    color: #96CEBC;
}

/* Event-Titel */
.ets-slide-in-event h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
    line-height: 1.3;
}

/* Datum und Ort */
.ets-slide-in-date,
.ets-slide-in-location {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
}

.ets-slide-in-date .dashicons,
.ets-slide-in-location .dashicons {
    margin-right: 8px;
    color: #96CEBC;
}

/* Exzerpt/Beschreibung */
.ets-slide-in-excerpt {
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.ets-slide-in-excerpt p {
    margin: 0 0 10px 0;
}

/* Call-to-Action Button */
.ets-slide-in-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #96CEBC;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.ets-slide-in-button:hover {
    background-color: #7AB5A3; /* Angepasste Hover-Farbe */
    color: white;
}

/* Mobile Position: Links */
.ets-slide-in.mobile-left {
    left: -400px;
    right: auto;
}

.ets-slide-in.mobile-left.active {
    left: 0;
    right: auto;
}

.ets-slide-in.mobile-left .ets-slide-in-tab {
    left: auto;
    right: -50px;
    border-radius: 0 8px 8px 0;
}

/* Mobile Position: Rechts */
.ets-slide-in.mobile-right {
    right: -400px;
    left: auto;
}

.ets-slide-in.mobile-right.active {
    right: 0;
    left: auto;
}

.ets-slide-in.mobile-right .ets-slide-in-tab {
    right: auto;
    left: -50px;
    border-radius: 8px 0 0 8px;
}

/* Responsive-Anpassungen für Tablets */
@media (max-width: 768px) {
    .ets-slide-in {
        max-width: 90vw;
    }
    
    .ets-slide-in-tab {
        width: 36px;
    }
    
    .ets-slide-in-tab span {
        font-size: 11px;
    }
}

/* Responsive-Anpassungen für Mobile - Kompakter Tab im eingeklappten Zustand */
@media (max-width: 500px) {
    .ets-slide-in {
        max-width: 85vw;
    }
    
    .ets-slide-in.mobile-left {
        left: -85vw;
    }
    
    .ets-slide-in.mobile-right {
        right: -85vw;
    }
    
    /* Tab im eingeklappten Zustand: Kompakt und dezent */
    .ets-slide-in-tab {
        width: 28px;
        opacity: 0.85;
        transition: opacity 0.3s ease, width 0.3s ease;
    }
    
    /* Tab wird beim Hover/Touch etwas größer */
    .ets-slide-in-tab:hover,
    .ets-slide-in-tab:active {
        opacity: 1;
        width: 32px;
    }
    
    .ets-slide-in.mobile-left .ets-slide-in-tab {
        right: -28px;
        left: auto;
    }
    
    .ets-slide-in.mobile-left .ets-slide-in-tab:hover,
    .ets-slide-in.mobile-left .ets-slide-in-tab:active {
        right: -32px;
    }
    
    .ets-slide-in.mobile-right .ets-slide-in-tab {
        left: -28px;
        right: auto;
    }
    
    .ets-slide-in.mobile-right .ets-slide-in-tab:hover,
    .ets-slide-in.mobile-right .ets-slide-in-tab:active {
        left: -32px;
    }
    
    /* Kleinere Schrift im Tab */
    .ets-slide-in-tab span {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
    
    .ets-slide-in-content {
        width: calc(100% - 28px);
        padding: 15px;
    }
    
    /* Wenn aktiv (ausgefahren), normale Größe */
    .ets-slide-in.active .ets-slide-in-tab {
        width: 36px;
        opacity: 1;
    }
    
    .ets-slide-in.active.mobile-left .ets-slide-in-tab {
        right: -36px;
    }
    
    .ets-slide-in.active.mobile-right .ets-slide-in-tab {
        left: -36px;
    }
    
    .ets-slide-in.active .ets-slide-in-tab span {
        font-size: 11px;
    }
    
    .ets-slide-in.active .ets-slide-in-content {
        width: calc(100% - 36px);
    }
}