/* ============================================
   Fahrplan Plugin – Card Layout
   ============================================ */

.fahrplan-container {
    max-width: 980px;
    margin: 0 auto;
    font-family: inherit;
}

/* ---- Suchmaske ---- */
.fahrplan-suche {
    background: #f7f8fa;
    border: 1px solid #e0e3e8;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 30px;
}
.fahrplan-suche-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}
.fahrplan-suche-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 155px;
    min-width: 130px;
}
.fahrplan-suche-field label {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.fahrplan-suche-field input[type="text"],
.fahrplan-suche-field select {
    padding: 9px 11px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}
.fahrplan-suche-field input:focus,
.fahrplan-suche-field select:focus {
    outline: none;
    border-color: #1a6faf;
    box-shadow: 0 0 0 3px rgba(26,111,175,0.12);
}
.fp-btn-suche {
    padding: 9px 22px;
    background: #1a6faf;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.fp-btn-suche:hover { background: #145a8f; }
.fp-btn-reset {
    display: inline-block;
    padding: 9px 14px;
    background: #ebebeb;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.fp-btn-reset:hover { background: #ddd; color: #333; }

.fahrplan-count {
    color: #888;
    font-size: 13px;
    margin-bottom: 14px;
}
.fahrplan-no-results {
    background: #fffbe6;
    border-left: 4px solid #f0b400;
    padding: 14px 18px;
    color: #5a4500;
    border-radius: 0 5px 5px 0;
}

/* ---- Card-Liste ---- */
.fahrplan-liste {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---- Einzelne Card ---- */
.fp-card {
    background: #fff;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transition: box-shadow 0.2s, transform 0.2s;
}
.fp-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.11);
    transform: translateY(-2px);
}

/* Bild links */
.fp-card-img {
    flex: 0 0 280px;
    width: 280px;
    overflow: hidden;
    position: relative;
}
.fp-card-img img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.fp-card:hover .fp-card-img img {
    transform: scale(1.03);
}
/* Kein Bild: Platzhalter */
.fp-card-img-placeholder {
    flex: 0 0 280px;
    width: 280px;
    background: linear-gradient(135deg, #e8f0f8 0%, #d0dff0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    color: #a0b4c8;
    font-size: 48px;
}

/* Inhalt rechts */
.fp-card-body {
    flex: 1;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

/* Titel */
.fp-card-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a2a3a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* Datum-Badge */
.fp-card-datum {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eef3f8;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #2a4a6a;
    margin-bottom: 14px;
    width: fit-content;
}
.fp-card-datum svg {
    flex-shrink: 0;
}

/* Zeiten-Block – hervorgehoben */
.fp-card-zeiten {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a6faf;
    color: #fff;
    border-radius: 7px;
    padding: 10px 16px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.fp-card-zeiten svg {
    flex-shrink: 0;
    opacity: 0.9;
}
.fp-card-zeiten-sep {
    opacity: 0.6;
    font-weight: 400;
    font-size: 14px;
    margin: 0 2px;
}

/* Hafen */
.fp-card-hafen {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334;
    margin-bottom: 12px;
}
.fp-card-hafen svg {
    flex-shrink: 0;
    color: #1a6faf;
}

/* Trennlinie */
.fp-card-hr {
    border: none;
    border-top: 1px solid #eaecef;
    margin: 2px 0 14px 0;
}

/* Beschreibung */
.fp-card-content {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 14px 0;
    flex: 1;
}
.fp-card-content p {
    margin: 0 0 8px 0;
}
.fp-card-content p:last-child {
    margin-bottom: 0;
}

/* Preise */
.fp-card-preise {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}
.fp-preis-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
.fp-preis-erw {
    background: #e8f4e8;
    color: #1a5c1a;
    border: 1px solid #b8dcb8;
}
.fp-preis-kind {
    background: #fce8e8;
    color: #8a1a1a;
    border: 1px solid #deb8b8;
}

/* ---- Kompakt-Karten (next_6) ---- */
.fahrplan-liste-kompakt {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}
.fp-card-kompakt {
    background: #fff;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.fp-card-kompakt:hover {
    box-shadow: 0 5px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.fp-card-kompakt .fp-ki {
    height: 170px;
    overflow: hidden;
}
.fp-card-kompakt .fp-ki img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.fp-card-kompakt:hover .fp-ki img { transform: scale(1.04); }
.fp-card-kompakt .fp-ki-placeholder {
    height: 170px;
    background: linear-gradient(135deg, #e8f0f8, #d0dff0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0b4c8;
    font-size: 40px;
}
.fp-card-kompakt .fp-kb {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}
.fp-card-kompakt .fp-kb-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a2a3a;
    line-height: 1.3;
    margin: 0;
}
.fp-card-kompakt .fp-kb-datum {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}
.fp-card-kompakt .fp-kb-zeiten {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #1a6faf;
    color: #fff;
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
}
.fp-card-kompakt .fp-kb-hafen {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.fp-card-kompakt .fp-kb-preise {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.fp-card-kompakt .fp-kp {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 12px;
}
.fp-card-kompakt .fp-kp-erw  { background: #e8f4e8; color: #1a5c1a; }
.fp-card-kompakt .fp-kp-kind { background: #fce8e8; color: #8a1a1a; }

/* ---- jQuery UI Datepicker ---- */
.ui-datepicker { font-size: 13px !important; z-index: 99999 !important; }
.ui-datepicker-header { background: #1a6faf !important; border-color: #145a8f !important; color: #fff !important; }
.ui-datepicker td a.ui-state-active,
.ui-datepicker td span.ui-state-active { background: #1a6faf !important; }

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .fahrplan-suche-row { flex-direction: column; }
    .fahrplan-suche-field { flex: 1 1 100%; }
    .fp-card { flex-direction: column; }
    .fp-card-img,
    .fp-card-img-placeholder { flex: 0 0 auto; width: 100%; min-height: 200px; }
    .fp-card-img img { min-height: 200px; }
    .fahrplan-liste-kompakt { grid-template-columns: 1fr; }
}
