/* === Grundlayout === */

.mbastro_root {
    max-width: 1200px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.1rem;
    color: #ffffff;
}

/* === Formulare === */

.mbastro_form {
    background-color: #5a6475;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #8a919e;
}

.mbastro_form_col {
    min-width: 220px;
}

.mbastro_label {
    font-weight: 600;
    font-size: 1.0rem;
    color: #ffffff;
}



/* Eingabefelder hell & neutral */

.mbastro_input {
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d0d7e2;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #ffffff !important;
    color: #111 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mbastro_input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14,165,233,0.25);
}

/* Planner Felder gleiche Höhe */

.mbastro_field_equal {
    min-height: 74px;
}

.mbastro_control_equal {
    min-height: 40px;
}

input.mbastro_control_equal,
button.mbastro_control_equal {
    height: 40px;
}

.mbastro_dir_group.mbastro_control_equal {
    align-items: center;
}

/* Chrome Time Picker Icon sichtbar */
.mbastro_input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    filter: invert(0);
}

/* Katalog Auswahl */

.mbastro_catalog_group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mbastro_catalog_item {
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mbastro_checkbox {
    cursor: pointer;
}

/* === Buttons === */

.mbastro_button {
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    padding: 6px 14px;
    cursor: pointer;
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, color 0.15s ease,
                transform 0.05s ease, box-shadow 0.15s ease,
                border-color 0.15s ease;
}

.mbastro_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(15,23,42, 0.15);
}

/* Paginierungs Buttons korrigieren */
.mbastro_pagination button {
    background-color: #e5f3ff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 999px !important;
    padding: 3px 12px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

/* Hover */
.mbastro_pagination button:hover {
    background-color: #d6e9ff !important;
    transform: translateY(-1px);
}

/* Entfernt das grau bleiben nach Klick */
.mbastro_pagination button:active,
.mbastro_pagination button:focus {
    background-color: #e5f3ff !important;
    color: #0f172a !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Deaktivierte Buttons */
.mbastro_pagination button:disabled {
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: default !important;
    transform: none !important;
}

/* Hauptaction Button */

.mbastro_button_primary {
    background-color: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
    font-weight: 600;
}

.mbastro_button_primary:hover {
    background-color: #0284c7;
    border-color: #0284c7;
}

/* Sekundäre Buttons */

.mbastro_button_secondary {
    background-color: #e5f3ff;
    color: #0f172a;
}

/* Richtungs Buttons */

/* Richtungs Buttons inaktiv */
.mbastro_dir_button {
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background-color: #f1f5f9;
    color: #1f2933;
    font-size: 0.9rem;
    padding: 4px 10px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* inaktiv bei Hover und Fokus exakt gleich lassen */
.mbastro_dir_button:hover,
.mbastro_dir_button:focus,
.mbastro_dir_button:active {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #1f2933;
}

/* Richtungs Buttons aktiv */
.mbastro_dir_button_active {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}

/* aktiv bei Hover und Fokus weiter blau lassen */
.mbastro_dir_button_active:hover,
.mbastro_dir_button_active:focus,
.mbastro_dir_button_active:active {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

.mbastro_timerow .mbastro_input {
    max-width: 140px; 
}

.mbastro_timerow label {
    white-space: nowrap;
}

/* Merken / Entfernen Buttons */

.mbastro_watch_button {
    margin-top: 6px;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #0f172a;               /* gut lesbare dunkle Schrift */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease;
}

.mbastro_watch_button:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    box-shadow: 0 1px 3px rgba(15,23,42,0.18);
}

/* Stern Symbol vor dem Text */
.mbastro_watch_button::before {
    content: "★";
    font-size: 0.85rem;
    opacity: 0.9;
    color: #f59e0b; /* Gold */
}

/* Aktiver Zustand bleibt absichtlich neutral */
.mbastro_watch_active {
    background-color: #fff !important;
    border-color: #ccc !important;
    color: #0f172a !important;
}

.mbastro_watch_active:hover {
    background-color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 1px 3px rgba(15,23,42,0.18);
}

.mbastro_watch_active::before {
    opacity: 0.9;
    color: #f59e0b !important;
}

/* Split Button im Planner */
.mbastro_watch_split {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.mbastro_watch_button_main {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.mbastro_watch_button_drop {
    margin-top: 6px;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    cursor: pointer;
    border: 1px solid #ccc;
    border-left: none;
    background-color: #fff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease;
}

.mbastro_watch_button_drop:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    box-shadow: 0 1px 3px rgba(15,23,42,0.18);
}

/* Popup Menu */
.mbastro_watch_menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    max-width: 85vw;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15,23,42,0.22);
    z-index: 99999;
}

.mbastro_watch_menu_title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin: 2px 6px 8px;
}

.mbastro_watch_menu_item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border: none;
    background: transparent;
    color: inherit;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.2;
    text-transform: unset;
}

.mbastro_watch_menu_item:hover {
    background: #f1f5f9;
}

.mbastro_watch_star {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #94a3b8;
}

.mbastro_watch_star.is_on {
    color: #f59e0b;
}

.mbastro_watch_menu_name {
    flex: 1 1 auto;
}

.mbastro_watch_menu_empty {
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.mbastro_watch_toast {
    position: absolute;
    left: 0;
    top: -34px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15,23,42,0.92);
    color: #ffffff;
    font-size: 0.8rem;
    line-height: 1.15;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(0);
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.mbastro_watch_toast.is_hide {
    opacity: 0;
    transform: translateY(-4px);
}
/* Pop Animation für den Stern beim Merken */

@keyframes mbastro_star_pop {
    0% {
        transform: scale(1);
        text-shadow: none;
    }
    40% {
        transform: scale(1.6);
        text-shadow: 0 0 6px rgba(245, 158, 11, 0.9);
    }
    100% {
        transform: scale(1);
        text-shadow: none;
    }
}

/* Klasse die die Animation auslöst */
.mbastro_watch_pop::before {
    animation: mbastro_star_pop 0.35s ease-out;
}


/* === Statusmeldung === */

.mbastro_status {
    font-size: 1.1rem;
    padding: 8px 12px;
    background-color: #5a6475;
    border-radius: 6px;
    border: 1px solid #8a919e;
    margin-bottom: 12px;
}

/* === Karten Layout (Planner und Merkliste) === */

.mbastro_list {
    display: flex;
    flex-direction: column;
    gap: 16px;              /* Abstand zwischen Karten */
    margin-top: 8px;
}

.mbastro_card {
    border: 1px solid #8a919e;
    border-radius: 10px;
    padding: 14px 16px 16px;
    background-color: #5a6475;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06);
    position: relative;
    z-index: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    transition: box-shadow 0.15s ease, transform 0.05s ease;
}

.mbastro_card:hover {
    box-shadow: 0 4px 10px rgba(15,23,42,0.12);
    transform: translateY(-1px);
    z-index: 2;
}

.mbastro_card_left,
.mbastro_card_image,
.mbastro_card_chart {
    flex: 1 1 0;
    min-width: 220px;
}

/* Textbereich links */

.mbastro_card_left strong {
    font-size: 1.15rem;
    color: #ffffff;
    display: block;
    margin-bottom: 4px;
}

/* Link in der Card Überschrift */
.mbastro_card_left a.mbastro_object_link,
a.mbastro_object_link {
    color: #9bdfff;
    text-decoration: none;
}

.mbastro_card_left a.mbastro_object_link:hover,
a.mbastro_object_link:hover {
    text-decoration: underline;
}

.mbastro_card_left a.mbastro_object_link:visited,
a.mbastro_object_link:visited {
    color: #9bdfff;
}

.mbastro_card_left div {
    margin-top: 2px;
    font-size: 1rem;
        line-height: 1.8rem;
}


/* === Bilder === */

.mbastro_card_image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbastro_card_image img,
.mbastro_card_image div {
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.24);
}

/* Status Karte mit integrierter Paginierung */

.mbastro_status_card {
    margin-top: 8px;
}

/* Status Inhalt in Karte ohne eigenen Rahmen */

.mbastro_status_card .mbastro_status {
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
}

/* Obere und untere Paginierung etwas kompakter */

.mbastro_pagination_top span,
.mbastro_pagination_bottom span {
    white-space: nowrap;
}


/* === Diagramm === */

.mbastro_card_chart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbastro_chart {
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e5e7eb;          /* feiner Rahmen */
    box-shadow: 0 2px 6px rgba(15,23,42,0.18); /* ähnlich wie beim Bild */
    overflow: hidden;                   /* falls die Linie minimal übersteht */
}

/* === Mobile Layout === */

@media (max-width: 768px) {
    .mbastro_form {
        padding: 12px;
        gap: 12px;
    }

    .mbastro_card {
        flex-direction: column;
    }

    .mbastro_card_image,
    .mbastro_card_chart {
        min-width: 100%;
    }
}

/* Login und Registrieren Panel im gleichen Stil */

.mbastro_login_wrapper {
    position: relative;
    max-width: 460px;
    margin: 20px auto;
    padding: 10px 26px 10px;
    border-radius: 14px;
    background: #5a6475;
    border: 1px solid #8a919e;
    color: #0f172a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.1rem;
    overflow: hidden;
}


/* Titel oben */

.mbastro_login_wrapper h2 {
    position: relative;
    margin: 0 0 18px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    color: #ffffff;
}

.mbastro_login_wrapper h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

/* Formular Inhalt */

.mbastro_login_wrapper form {
    position: relative;
    z-index: 1;
}

/* Labels im Formular */

.mbastro_login_wrapper label {
    display: block;
    font-size: 0.95rem;
    margin: 2px 0 2px;
    color: #ffffff;
    font-weight: 500;
}

/* Abstände der Absätze im Formular
   wirkt auf Login Felder aus wp_login_form und auf Register Felder */

.mbastro_login_wrapper form > p {
    margin-bottom: 4px !important;
}

/* Speziell Login Benutzername und Passwort, falls Theme hier eigene Abstände setzt */

.mbastro_login_wrapper p.login-username,
.mbastro_login_wrapper p.login-password {
    margin-bottom: 4px !important;
}

/* Eingabefelder im Login und Register Panel
   hier auch Schriftfarbe und Hintergrund fest verdrahtet */

.mbastro_login_wrapper input[type="text"],
.mbastro_login_wrapper input[type="email"],
.mbastro_login_wrapper input[type="password"] {
    width: 100%;
    padding: 4px 4px;
    margin: 0 0 4px;
    border-radius: 8px;
    border: 1px solid #d0d7e2;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 1rem;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

/* Platzhalter Farbe */

.mbastro_login_wrapper input[type="text"]::placeholder,
.mbastro_login_wrapper input[type="email"]::placeholder,
.mbastro_login_wrapper input[type="password"]::placeholder {
    color: #94a3b8 !important;
}

/* Fokus Zustand der Felder */

.mbastro_login_wrapper input[type="text"]:focus,
.mbastro_login_wrapper input[type="email"]:focus,
.mbastro_login_wrapper input[type="password"]:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14,165,233,0.25);
    transform: translateY(-1px);
}

/* Merken Zeile im Login Formular */

.mbastro_login_wrapper .forgetmenot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 12px;
    font-size: 0.95rem;
    color: #334155;
}

.mbastro_login_wrapper .forgetmenot input[type="checkbox"] {
    accent-color: #0ea5e9;
}

/* Button für Login und Register */

.mbastro_login_wrapper input[type="submit"] {
    width: 100%;
    padding: 11px 12px;
    margin-top: 6px;
    border-radius: 999px;
    border: none;
    background-color: #0ea5e9;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.mbastro_login_wrapper input[type="submit"]:hover {
    background-color: #0284c7;
    box-shadow: 0 4px 12px rgba(15,23,42,0.24);
    transform: translateY(-1px);
}

.mbastro_login_wrapper input[type="submit"]:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
}

/* Links unter Login und Register */

.mbastro_login_links {
    position: relative;
    margin-top: 18px;
    text-align: center;
}

.mbastro_login_links p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: #ffffff;
}

.mbastro_login_links a {
    color: #0ea5e9;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mbastro_login_links a:hover {
    color: #0284c7;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .mb_user_menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #05060a;
        color: #fff;
        padding: 60px 20px 20px;
        box-sizing: border-box;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 99998;
    }

    .mb_user_menu.is_open {
        transform: translateX(0);
    }

    .mb_user_menu_list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mb_user_menu_list li {
        margin-bottom: 0.8rem;
    }

    .mb_user_menu_list a {
        display: block;
        text-decoration: none;
        color: inherit;
        font-size: 1rem;
        padding: 0.4rem 0;
    }
}
/* Root Container */
.mbastro_watch_root {
  width: 100%;
  box-sizing: border-box;
}

.mbastro_watch_status {
  margin-bottom: 12px;
}

/* Formular */
.mbastro_watch_form {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mbastro_field {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

/* Cards Liste */
.mbastro_watch_card {
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

/* Spalten */
.mbastro_watch_left,
.mbastro_watch_image,
.mbastro_watch_chart {
  flex: 1 1 0;
  min-width: 220px;
}

/* Bild Spalte */
.mbastro_watch_image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.mbastro_watch_img,
.mbastro_watch_img_placeholder {
  width: 100%;
  max-width: 260px;
  height: 150px;
  border-radius: 4px;
}

.mbastro_watch_img {
  object-fit: cover;
  display: block;
}

.mbastro_watch_img_placeholder {
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #555;
}

/* Credits */
.mbastro_watch_credit {
  font-size: 0.75rem;
  color: #fff;
  text-align: center;
  width: 100%;
  line-height: 1.1;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none !important;
  border-radius: 0;
}

/* Chart */
.mbastro_watch_chart {
  text-align: center;
}

.mbastro_watch_chart_el {
  width: 100%;
  max-width: 260px;
  height: 150px;
}

/* Fallback */
.mbastro_watch_fallback {
  font-size: 0.8rem;
}
  .mbastro_card_left .mbastro_watch_divider{
    display: block;
    width: 100%;
    height: 1px;
    background-color: rgba(255,255,255,0.18);
    margin-top: 12px;
    margin-bottom: 6px;
}
/* Mobile */
@media (max-width: 640px) {
  .mbastro_watch_card {
    flex-direction: column;
    align-items: stretch;
  }

  .mbastro_watch_left,
  .mbastro_watch_image,
  .mbastro_watch_chart {
    min-width: 0;
    width: 100%;
  }

  .mbastro_watch_img,
  .mbastro_watch_img_placeholder,
  .mbastro_watch_chart_el {
    max-width: 100%;
  }


}


/* === Watchlist Header (mehrere Listen) === */

.mbastro_watch_status {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mbastro_watchlist_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 50;
}

.mbastro_watchlist_header_left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mbastro_watchlist_header_right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mbastro_watchlist_select {
  display: none !important;
}

/* Links: Name + Pfeil */
.mbastro_watchlist_picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.mbastro_watchlist_name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #9bdfff;
  line-height: 1.1;
}

.mbastro_watchlist_pick_btn {
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.mbastro_watchlist_pick_btn:hover {
  opacity: 1;
}

.mbastro_watchlist_pick_btn:focus-visible {
  outline: 2px solid rgba(14,165,233,0.65);
  outline-offset: 2px;
  border-radius: 6px;
}

.mbastro_watchlist_pick_menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  max-width: min(360px, 85vw);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15,23,42,0.22);
  z-index: 100000;
  display: none;
}

.mbastro_watchlist_picker.is_open .mbastro_watchlist_pick_menu {
  display: block;
}

.mbastro_watchlist_pick_item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  text-transform: unset;
}

.mbastro_watchlist_pick_item:hover {
  background: #f1f5f9;
}

.mbastro_watchlist_pick_item.is_active {
  background: #e5f3ff;
  font-weight: 700;
}

.mbastro_icon_button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: rgba(255,255,255,0.95);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.mbastro_icon_button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(15,23,42, 0.15);
}

.mbastro_icon_button:disabled,
.mbastro_icon_button.is_disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.mbastro_watchlist_add {
  padding: 6px 12px;
}

.mbastro_watchlist_summary {
  font-weight: 600;
  white-space: nowrap;
}

/* Rechts: Einstellungen */
.mbastro_watchlist_settings {
  position: relative;
  display: inline-flex;
}

.mbastro_watchlist_settings_btn {
  border: none;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.9rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.9;
  appearance: none;
}

.mbastro_watchlist_settings_btn:hover {
  opacity: 1;
}

.mbastro_watchlist_settings_btn:focus-visible {
  outline: 2px solid rgba(14,165,233,0.65);
  outline-offset: 2px;
  border-radius: 6px;
}


.mbastro_watchlist_settings_menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  max-width: min(320px, 85vw);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15,23,42,0.22);
  z-index: 100000;
  display: none;
}

.mbastro_watchlist_settings.is_open .mbastro_watchlist_settings_menu {
  display: block;
}

.mbastro_watchlist_settings_item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  text-transform: unset;
}

.mbastro_watchlist_settings_item:hover {
  background: #f1f5f9;
}

.mbastro_watchlist_settings_item.is_danger {
  color: #b91c1c;
  font-weight: 600;
}

.mbastro_watchlist_settings_item:disabled,
.mbastro_watchlist_settings_item.is_disabled {
  opacity: 0.45;
  cursor: default;
}

.mbastro_watchlist_message {
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  /* Mobile: Zahnrad immer rechts oben im Header fixieren */
  .mbastro_watchlist_header {
    padding-right: 42px;
  }

  .mbastro_watchlist_header_left {
    max-width: calc(100% - 42px);
  }

  .mbastro_watchlist_header_right {
    position: absolute;
    top: 0;
    right: 0;
  }

  /* Wenn die Zeile eng wird, soll die Anzahl lieber umbrechen als schrumpfen */
  .mbastro_watchlist_summary {
    white-space: nowrap;
    flex: 0 0 auto;
  }
}

/* Sehr schmale Screens: falls die Summary trotzdem nicht passt, darf sie im zweiten Zeilenumbruch umbrechen */
@media (max-width: 420px) {
  .mbastro_watchlist_summary {
    white-space: normal;
  }
}

/* === Watchlist Verwaltung: Modal und Toast (ohne Browser Dialoge) === */

.mbastro_modal_overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 999999;
}

.mbastro_modal_overlay.is_busy {
    cursor: progress;
}

.mbastro_modal {
    width: min(460px, 100%);
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px;
    border: 1px solid rgba(203,213,225,0.9);
    box-shadow: 0 18px 44px rgba(15,23,42,0.35);
    overflow: hidden;
}

.mbastro_modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    background: linear-gradient(90deg, rgba(14,165,233,0.14), rgba(56,189,248,0.10));
}

.mbastro_modal_title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

.mbastro_modal_close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(203,213,225,0.9);
    background: rgba(241,245,249,0.9);
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
}

.mbastro_modal_close:hover {
    background: rgba(226,232,240,0.95);
}

.mbastro_modal_body {
    padding: 14px;
}

.mbastro_modal_label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.mbastro_modal_text {
    font-size: 0.98rem;
    color: #0f172a;
}

.mbastro_modal_input {
    width: 100% !important;
    max-width: 100% !important;
}

.mbastro_modal_actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(15,23,42,0.08);
}

/* Button Variante fuer Loeschen */
.mbastro_button_danger {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.mbastro_button_danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
}

/* Toast Meldungen */
.mbastro_toast_stack {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000000;
    pointer-events: none;
}

.mbastro_toast {
    min-width: 220px;
    max-width: min(520px, calc(100vw - 24px));
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15,23,42,0.92);
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.25;
    box-shadow: 0 12px 26px rgba(15,23,42,0.28);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.mbastro_toast.is_ok {
    background: rgba(2,132,199,0.95);
}

.mbastro_toast.is_err {
    background: rgba(185,28,28,0.95);
}

.mbastro_toast.is_hide {
    opacity: 0;
    transform: translateY(6px);
}

@media (max-width: 640px) {
    .mbastro_modal_overlay {
        padding: 12px;
    }

    .mbastro_toast {
        min-width: 0;
        width: calc(100vw - 24px);
    }
}



/* Watchlist Menue als Portal an Body, damit es immer ueber den Karten liegt */
.mbastro_watch_menu_portal {
    position: fixed;
    right: auto;
    z-index: 2147483647;
}

.mbastro_watch_toast_portal {
    position: fixed;
    z-index: 2147483647;
}


/* Mobile: Merkliste Button wie Objektseite (nur Stern) und ganz oben rechts in der Karte */
@media (max-width: 640px) {

  /* Die Karte ist bereits position relative definiert */
  .mbastro_card .mbastro_watch_split{
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 10;
  }

  /* Platz rechts fuer den Button, damit der Titel nicht darunter laeuft */
  .mbastro_card .mbastro_card_left{
    padding-right: 58px;
  }

  /* Dropdown Pfeil ausblenden, der Hauptbutton oeffnet weiterhin das Menue */
  .mbastro_card .mbastro_watch_button_drop{
    display: none !important;
  }

  /* Hauptbutton wie auf Objektseite: kein Text, nur Stern zentriert */
  .mbastro_card .mbastro_watch_button_main.mbastro_watch_button{
    font-size: 0 !important;
    line-height: 0 !important;

    width: 36px;
    height: 36px;

    padding: 0 !important;
    gap: 0 !important;

    justify-content: center;
    align-items: center;
    display: inline-flex;

    margin-top: 0 !important;
    box-sizing: border-box;
        border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  .mbastro_card .mbastro_watch_button_main.mbastro_watch_button::before{
    font-size: 1.8rem !important;
    line-height: 1 !important;
    display: block;
    margin: 0 !important;
  }

}


/* === Notizen in der Merkliste === */


.mbastro_note_wrap {
  flex: 1 1 100%;
  min-width: 220px;
  margin-top: 12px;
}

.mbastro_note_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}


.mbastro_note_bar:hover {
  background: rgba(255,255,255,0.08);
}

.mbastro_note_preview {
  flex: 1 1 auto;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mbastro_note_wrap.is_loading .mbastro_note_preview {
  opacity: 0.75;
}

.mbastro_note_wrap.is_empty .mbastro_note_preview {
  color: rgba(255,255,255,0.78);
}

.mbastro_note_actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.mbastro_note_full_icon {
  width: 36px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
}

.mbastro_note_full_icon:hover {
  background: rgba(255,255,255,0.08);
}

.mbastro_note_full_icon:active {
  transform: translateY(1px);
}

.mbastro_note_full_icon {
  font-size: 1.05rem;
}


.mbastro_note_panel {
  display: none;
  margin-top: 10px;
}

.mbastro_note_wrap.is_open .mbastro_note_panel {
  display: block;
}

@media (max-width: 640px) {
  .mbastro_note_bar {
    padding: 8px 9px;
  }

  .mbastro_note_preview {
    font-size: 0.92rem;
  }

  .mbastro_note_full_icon {
    width: 34px;
    height: 32px;
    border-radius: 10px;
  }

  .mbastro_note_text {
    max-height: 150px;
  }
}

.mbastro_note_text {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 170px;
}

.mbastro_note_wrap.is_loading .mbastro_note_text {
  opacity: 0.75;
}

.mbastro_note_wrap.is_empty .mbastro_note_text {
  color: rgba(255,255,255,0.82);
}

.mbastro_note_edit {
  display: inline-block;
  margin-top: 8px;
  color: #9bdfff;
  text-decoration: none;
  font-size: 0.9rem;
}

.mbastro_note_edit:hover {
  text-decoration: underline;
}

.mbastro_note_modal_text {
  white-space: pre-wrap;
  background: rgba(15,23,42,0.06);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
  line-height: 1.45;
}


/* Login Link Hinweis in der Merkliste */
.mbastro_status.mbastro_status_login {
  text-align: center;
}

.mbastro_watchlist_message .mbastro_login_link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(203,213,225,0.55);
  background: rgba(15,23,42,0.25);
  color: #9bdfff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.mbastro_watchlist_message .mbastro_login_link:hover {
  background: rgba(15,23,42,0.35);
}

.mbastro_watchlist_message .mbastro_login_link:focus {
  outline: 2px solid rgba(155,223,255,0.7);
  outline-offset: 2px;
}

