/* ========================================
  DASHBOARD-LAYOUT (index.php)
  Einheitliche Kacheln, die bei jeder Fensterbreite sauber umbrechen:
  - Kacheln einer Reihe gleich hoch, symmetrische Abstaende
  - Link-Zeilen: Icon in fester Spalte, Text bricht daneben um
    (nie unter das Icon, nie ueber den Kachelrand, kein "..."-Abschneiden)
  Wird nach custom.css / custom-glass-integration.css geladen.
======================================== */

/* ---------- Login ---------- */
.login-form {
    padding-top: 15px;
    padding-bottom: 15px;
}

/* ---------- Kopfbereich (Willkommen) ---------- */
.container-fluid > .container > .row.pad15.abstando:first-child {
    margin-left: 0;
    margin-right: 0;
}
@media (max-width: 767px) {
    .container-fluid > .container > .row.pad15.abstando:first-child {
        padding: 20px 5px !important;
    }
}
@media (min-width: 992px) {
    .welcome-text {
        padding-right: 60px;
    }
}

/* Kontaktspalte: lange E-Mail-Adressen umbrechen, Icon bleibt vorne */
.welcome-contact a.white {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.welcome-contact a.white .mail,
.welcome-contact a.white .fa {
    flex: 0 0 auto;
}

/* Footer: Spalten auf schmalen Bildschirmen etwas absetzen */
@media (max-width: 767px) {
    .portal-footer > [class*="col-"] + [class*="col-"] {
        margin-top: 15px;
    }
}

/* ---------- Bereichsueberschriften ---------- */
.dashboard-tiles {
    padding-left: 0;
    padding-right: 0;
}
.dashboard-tiles > .row.pad15 {
    margin-left: 0;
    margin-right: 0;
    padding: 15px !important; /* ueberschreibt inline padding-right:0 der Module */
}
.dashboard-tiles > .row.pad15 > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}
@media (max-width: 767px) {
    .row.pad15 h1.white {
        font-size: 28px;
    }
}

/* ---------- Kachel-Raster ---------- */
.row-flex {
    margin-left: 0;
    margin-right: 0;
}
.row-flex > [class*="col-"] {
    display: flex;
    flex-direction: column;
    float: none;
    min-width: 0;
}
.row-flex > [class*="col-"].pad15 {
    padding: 15px;
}
@media (max-width: 767px) {
    .row-flex > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
}
/* Grosse Smartphones quer / kleine Tablets: zwei Kacheln nebeneinander */
@media (min-width: 560px) and (max-width: 767px) {
    .row-flex > .col-sm-6,
    .row-flex > .col-sm-4 {
        flex-basis: 50%;
        max-width: 50%;
    }
}

/* Kacheln fuellen die Spalte -> gleiche Hoehe innerhalb einer Reihe */
.row-flex > [class*="col-"] > .box,
.row-flex > [class*="col-"] > .box-pano {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
.row-flex .box-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}
.row-flex .box-text-v8a {
    min-height: 0;
}
.row-flex .box-text strong {
    overflow-wrap: break-word;
    -webkit-hyphens: manual;
    hyphens: manual;
}

/* Bildbereiche */
.tile-media {
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}
.tile-media a,
.tile-media img {
    display: block;
    width: 100%;
    height: 100%;
}
.tile-media img {
    object-fit: cover;
}
.tile-logo {
    max-height: 165px;
    overflow: hidden;
    text-align: center;
}
.tile-logo img {
    padding: 0 20px;
    border-radius: 0;
}
.tile-logo-inactive {
    filter: grayscale(100%) opacity(50%);
}
/* Grosse Einzel-Icons (z.B. "keine Touren") mittig - FA7-Icons haben feste Breite */
.row-flex .box > i,
.row-flex .box-pano > i {
    align-self: center;
}
.tile-centered {
    text-align: center;
}

/* Hinweistexte in Kacheln */
.box-text p.tile-note {
    margin: 10px 0;
    font-size: inherit;
    line-height: 1.5;
}

/* ---------- Kacheltitel mit Icon (z.B. Slidevideo) ---------- */
.box-text .tile-title {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.box-text .tile-title i {
    float: none;
    padding: 0;
    margin: 0;
    font-size: 16px;
    line-height: inherit;
}

/* ---------- Link-Zeilen in Kacheln ---------- */
.box-text .tile-row {
    display: flex;
    align-items: flex-start;
    min-width: 0;
}
.box-text .tile-row-spaced {
    margin-top: 10px;
}
.box-text .tile-link {
    display: flex;
    align-items: flex-start;
    flex: 0 1 auto;
    min-width: 0;
    padding: 4px 0;
    line-height: 22px;
    cursor: pointer;
    text-decoration: none;
}
.box-text .tile-icon {
    flex: 0 0 35px;
    width: 35px;
    height: 22px;
    display: flex;
    align-items: center;
}
.box-text .tile-icon i,
.box-text .tile-icon img {
    float: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    line-height: 1;
}
.box-text .tile-link .beschreibung {
    margin: 0;
    height: auto;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
/* Hilfe-"?" hinter einem Link */
.box-text .tile-row > a:not(.tile-link) {
    flex: 0 0 auto;
    padding: 4px 0 4px 8px;
    line-height: 22px;
}
.box-text .tile-row > a:not(.tile-link) i {
    float: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    vertical-align: middle;
}

/* Chatbot-Menue (aufklappbare Gruppen) */
.chatbot-menu-group > .tile-link {
    width: 100%;
    font-weight: bold;
}
.chatbot-menu-group > .tile-link .chatbot-menu-chevron {
    line-height: 22px;
}

/* ---------- FAQ-/Hilfe-Links ---------- */
.help-item {
    padding-top: 5px;
    padding-bottom: 5px;
}
.help-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #ffffff !important;
    background: rgba(0, 151, 248, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background 0.3s ease, transform 0.3s ease;
}
.help-link:hover,
.help-link:focus {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    color: #ffffff !important;
}
.help-icon,
.help-arrow {
    flex: 0 0 auto;
}
.help-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
}
.help-link i {
    float: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .help-link {
        transition: none;
    }
}
