/* --- Cards.css --- */

/* Basis-Kartenlayout */
.card {
    width: 100%;
    max-width: 18rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    position: relative;
}

.card-grid {
    display: flex;
    flex-wrap: wrap; /* Stellt sicher, dass die Kacheln umgebrochen werden */
    justify-content: center; /* Horizontal zentrieren */
    align-items: center; /* Vertikal zentrieren */
    gap: 20px;
    padding: 10px;
    width: 100%;
    height: 100%;
}


.card-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* Benutzerbild in der Karte */
.card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 20px auto 0 auto;
    z-index: 1;
    position: relative;
}

/* Platzhalterbild bei fehlendem Bild */
.card::before {
    content: "";
    background-size: cover;
    background-position: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-top: 20px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

/* Überschrift in der Karte */
.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

/* Abgesetzter Text, z. B. Benutzername */
.text-muted {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.2;
}

/* Buttons mit Icons innerhalb der Card */
.card-body .btn-link i {
    font-size: 1.2rem;
    color: black;
    transition: color 0.2s ease-in-out;
}

.card-body .btn-link i:hover {
    color: #007bff;
}

/* Card Header */
.card .card-header-custom {
    font-weight: bold;
    padding: 1rem 0 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

/* Card Body */
.card .card-body {
    padding: 5px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card Footer */
.card-footer-custom {
    font-weight: bold;
    padding: 5px;
    margin-top: 0.5rem;
    text-align: center;
}

/* Dropdown-Menü in der Card */
.card .dropdown {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
    z-index: 2;
}

.card .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
    right: 0;
    text-align: left;
    border: 1px solid #ccc;
    border-radius: 5px;
    white-space: nowrap;
}

.card .dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    text-align: left;
}

.card .dropdown-content a:hover {
    background-color: #f1f1f1;
}

.card .dropdown-content a i {
    margin-right: 10px;
}

.card .dropdown-content.show {
    display: block;
}

.card .dropdown-content.dropdown-up {
    bottom: 100%;
    top: auto;
}

/* Badge-Stile */
.badge {
    padding: 0.5em;
    font-size: 0.875rem;
    margin-right: 0.25em;
}

/* Fließtext innerhalb des Card-Bodys */
.card-body p {
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Kartenvarianten nach Status */
.card-einstallen { border-left: 5px solid #28a745; }
.card-ausstallen { border-left: 5px solid #ffc107; }
.card-verlust { border-left: 5px solid #dc3545; }
.card-storniert { border-left: 5px solid #dc3545; }
.card-aktiv { border-left: 5px solid #28a745; }
.card-inaktiv { border-left: 5px solid #6c757d; }
.card.card-partner {border-right: 5px solid #ffc107;
}

/* Zusätzliche visuelle Elemente */
.vollgetankt-icon,
.nicht-vollgetankt-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.vollgetankt-icon { color: #28a745; }
.vollgetankt-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: #28a745;
}

.nicht-vollgetankt-icon { color: #ffc107; }
.nicht-vollgetankt-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffc107;
}

@media (max-width: 576px) {
    .col-lg-4.col-md-6.col-sm-12 {
        padding-left: 0;
        padding-right: 0;
    }

    .card {
        width: 80% !important;
        max-width: 80% !important;
        margin: 0 auto 20px auto;
    }

    .card-body p {
        font-size: 0.95rem;
    }

    .card-header-custom {
        font-size: 1rem;
        text-align: center;
    }

    .card .dropdown-content {
        min-width: 100%;
        right: auto;
        left: 0;
    }
}


/* Verhindert Unterstreichung beim Hover für alle Kachellinks */
.ap-kachel__link,
.ap-kachel__link:hover,
.ap-kachel__link:focus {
    text-decoration: none;
}


.ap-kachel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 2rem 1rem;
}

.ap-kachel {
    position: relative;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease;
    min-height: 180px;
}

.ap-kachel:hover {
    transform: translateY(-2px);
}

.ap-kachel__link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    color: inherit;
    text-decoration: none;
    padding: 1.5rem 1rem;
    padding-top: 2.5rem;
}

.ap-kachel__header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.ap-kachel__meta {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.ap-kachel__type-label {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    padding: 0.5rem 0;
    background-color: transparent;
    border-top: none;
}

/* DROPDOWN BUTTON oben rechts */
.ap-kachel .dropdown {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.ap-kachel .dropdown .btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #444;
    cursor: pointer;
    padding: 5px;
}

/* DROPDOWN INHALT */
.ap-kachel .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 35px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    min-width: 150px;
    z-index: 2;
}

.ap-kachel .dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
}

.ap-kachel .dropdown-content a:hover {
    background-color: #f0f0f0;
}

/* FARBKODIERUNG pro Typ */
.ap-kachel--prozess { border-left: 5px solid #28a745; }
.ap-kachel--protokoll { border-left: 5px solid #007bff; }
.ap-kachel--rezept { border-left: 5px solid #ffc107; }
.ap-kachel--zaehler { border-left: 5px solid #6f42c1; }
.ap-kachel--system {
    border-left: 5px solid #adb5bd;
    background-color: #f8f9fa;
}
.ap-kachel--system .ap-kachel__type-label {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* ===== Nachrichten-Card: gleiche Optik wie deine anderen Cards ===== */

/* Hülle: weiß, runde Ecken, zarter Shadow – wie bei den Card-Kacheln */
.nachricht-card{
  width:100%;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #e5e7eb;            /* identische Randfarbe */
  border-radius:14px;                   /* weiche Ecken */
  box-shadow:0 6px 18px rgba(0,0,0,.06);/* dezenter Drop-Shadow wie bei den Cards */
  padding:1rem 1.25rem;
  position:relative;
  overflow:hidden;                      /* wichtig für die Seitenleiste */
  display:grid;
  grid-template-columns:420px 1fr;      /* links Meta, rechts Inhalt */
  gap:1rem;
  align-items:stretch;
}