/* --- HEADER --- */
.ms-dashboard-header-wrapper {
    background: linear-gradient(135deg, #F46513 0%, #ff9045 100%);
    color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 40px; border-radius: 15px;
    box-shadow: 0 10px 25px rgba(244, 101, 19, 0.25);
    margin-bottom: 30px; flex-wrap: wrap; gap: 20px;
}
.ms-header-left h2 { margin: 5px 0 0 0; font-size: 32px; color: #fff !important; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.ms-welcome-label { font-size: 14px; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px; }

.ms-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ms-meta-item { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ms-time-highlight { font-size: 24px; font-weight: 700; background: rgba(255,255,255,0.2); padding: 5px 15px; border-radius: 8px; backdrop-filter: blur(5px); }

/* --- TOOLBAR & BUTTONS --- */
.ms-dashboard-toolbar { margin-bottom: 20px; text-align: right; display: flex; justify-content: flex-end; gap: 10px; }

/* Primär Button (Orange/Dunkel) */
.ms-btn-primary { background: #333; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
.ms-btn-primary:hover { background: #F46513; transform: translateY(-2px); }

/* NEU: Sekundär Button (Für Tipps) */
.ms-btn-secondary { background: #fff; color: #555; border: 1px solid #ddd; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
.ms-btn-secondary:hover { background: #f0f0f0; color: #333; transform: translateY(-2px); border-color: #ccc; }

/* --- GRID --- */
.ms-dashboard-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 25px; width: 100%; box-sizing: border-box !important; }

.ms-grid-item {
    position: relative; background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 350px; flex: 0 0 350px; min-height: 250px;
    box-sizing: border-box !important; transition: none;
    display: flex; flex-direction: column; overflow: hidden;
}

/* --- INTERAKTION & INHALT --- */
.ms-drag-handle {
    position: absolute; top: 0; right: 0; width: 40px; height: 40px;
    cursor: grab; color: #ccc; font-size: 20px; display: flex; align-items: center; justify-content: center; z-index: 50; transition: color 0.2s; background: transparent;
}
.ms-drag-handle:hover { color: #F46513; background: rgba(0,0,0,0.02); border-radius: 0 12px 0 12px; }

.ms-widget-content {
    flex: 1; width: 100%; padding: 20px; padding-top: 30px; padding-bottom: 30px;
    box-sizing: border-box; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ddd transparent;
}

.ms-resize-handle {
    position: absolute; bottom: 5px; right: 5px; color: #ccc; cursor: se-resize; width: 25px; height: 25px;
    display: flex; align-items: center; justify-content: center; font-size: 18px; transform: rotate(90deg); z-index: 60;
}
.ms-resize-handle:hover { color: #F46513; }

/* --- LOGIK --- */
.ms-grid-item[style*="width"] { flex-grow: 0 !important; flex-shrink: 0 !important; min-width: auto !important; max-width: 100% !important; }
.ui-state-highlight { background: rgba(244, 101, 19, 0.05) !important; border: 2px dashed #F46513 !important; border-radius: 12px; margin-bottom: 25px; min-height: 150px; width: 100%; flex-grow: 1; visibility: visible !important; }

/* --- POPUPS & TOOLTIPS --- */
.ms-success-popup { position: fixed; top: 15%; left: 50%; transform: translateX(-50%); z-index: 999999; background: #edfff4; color: #28a745; border: 1px solid #28a745; padding: 12px 30px; border-radius: 50px; font-weight: bold; }
.ms-flash-green { background-color: #28a745 !important; border-color: #28a745 !important; }

/* NEU: USABILITY TOOLTIPS (Info Style) */
.ms-tour-tooltip {
    position: absolute;
    z-index: 9999999; /* Über allem */
    background-color: #e3f2fd; /* Sehr helles Blau */
    border: 2px solid #2196f3; /* Blau */
    color: #0d47a1; /* Dunkelblau Text */
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    animation: ms-pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Der kleine Pfeil am Tooltip */
.ms-tour-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Pfeil unten */
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #2196f3 transparent;
    display: block;
    width: 0;
}

/* "Klicken zum Fortfahren" Hinweis */
.ms-tour-hint {
    display: block;
    font-size: 11px;
    margin-top: 10px;
    text-align: right;
    opacity: 0.7;
    font-weight: bold;
    text-transform: uppercase;
}

@keyframes ms-pop-in {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* WIDGET STYLES (Header, Lists etc.) */
.ms-widget-header h3 { margin: 0 0 15px 0; font-size: 16px; font-weight: 700; text-transform: uppercase; color: #444; display: flex; align-items: center; gap: 8px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }
.ms-widget-header .dashicons { font-size: 20px; color: #F46513; }
.ms-flex-header { display: flex; justify-content: space-between; align-items: center; }
.ms-view-toggle { display: flex; gap: 5px; background: #f5f5f5; padding: 3px; border-radius: 6px; }
.ms-toggle-btn { border: none; background: transparent; cursor: pointer; padding: 4px; border-radius: 4px; color: #999; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.ms-toggle-btn:hover { color: #555; background: #e0e0e0; }
.ms-toggle-btn.active { background: #fff; color: #F46513; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Course Widget Views (bleiben gleich) */
.ms-courses-list { display: flex; flex-direction: column; gap: 20px; }
.ms-view-grid .ms-course-item { display: flex; flex-direction: column; padding: 15px; border: 1px solid #f0f0f0; border-radius: 8px; background: #fafafa; }
.ms-view-grid .ms-course-thumb-link { width: 100%; height: 120px; display: block; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.ms-view-grid .ms-course-img { width: 100%; height: 100%; object-fit: cover; }
.ms-view-grid .ms-course-center { margin-bottom: 10px; } .ms-view-grid .ms-course-right { width: 100%; }
.ms-view-list { display: flex; flex-direction: column; gap: 10px; }
.ms-view-list .ms-course-item { display: flex; flex-direction: row; align-items: center; padding: 10px; border: 1px solid #f0f0f0; border-radius: 8px; background: #fff; gap: 15px; }
.ms-view-list .ms-course-left { flex-shrink: 0; } .ms-view-list .ms-course-thumb-link { width: 50px; height: 50px; display: block; border-radius: 6px; overflow: hidden; }
.ms-view-list .ms-course-img { width: 100%; height: 100%; object-fit: cover; } .ms-view-list .ms-course-center { flex-grow: 1; } .ms-view-list .ms-course-title { font-size: 14px; margin: 0; } .ms-view-list .ms-course-right { flex-shrink: 0; width: 120px; text-align: right; }
.ms-progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: #888; margin-bottom: 3px; font-weight: 600; }
.ms-progress-percent { color: #28a745; } .ms-progress-bar-bg { width: 100%; height: 6px; background-color: #e9ecef; border-radius: 3px; overflow: hidden; } .ms-progress-bar-fill { height: 100%; background-color: #28a745; border-radius: 3px; } .ms-no-thumb { background: #eee; display: flex; align-items: center; justify-content: center; color: #ccc; }

/* --- FOLLOWER SPEZIAL STYLES --- */

/* Im Grid: Avatar zentrieren und rund machen */
.ms-view-grid .ms-follower-item {
    align-items: center;
    text-align: center;
}
.ms-view-grid .ms-follower-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    margin: 0 auto 10px auto; /* Zentriert */
}

/* In der Liste: Avatar klein */
.ms-view-list .ms-follower-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
}


/* --- BUTTONS GLOBAL ORANGE STYLE ------------------------------------------------------ */

/* Alle Dashboard Buttons erfassen */
.ms-btn-primary, 
.ms-btn-secondary, 
.ms-btn-small {
    background-color: #F46513 !important; /* Dein Orange */
    color: #ffffff !important; /* Weiße Schrift */
    border: 1px solid transparent !important; /* Standard kein Rahmen */
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(244, 101, 19, 0.2); /* Leichter oranger Schatten */
}

/* HOVER EFFEKT */
.ms-btn-primary:hover, 
.ms-btn-secondary:hover, 
.ms-btn-small:hover {
    /* 1. Hellerer Verlauf */
    background: linear-gradient(135deg, #ff8c4b 0%, #F46513 100%) !important;
    
    /* 2. Dunklerer Rahmen (Stärke 1) */
    border: 1px solid #d14900 !important; 
    
    /* 3. Text bleibt weiß */
    color: #ffffff !important;
    
    /* 4. Leichtes Anheben */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(244, 101, 19, 0.3);
}

/* Sonderfall: Der "Tipps" Button war vorher weiß. 
   Wenn du ihn auch orange haben willst, passt der Code oben.
   Falls er weiß bleiben soll, entferne .ms-btn-secondary oben aus der Liste.
   Laut Anweisung: "Die Buttons sollen alle unser Orange als Hintergrund haben" -> also auch der! 
*/

/* Anpassung für kleine Buttons (z.B. Empty State) */
.ms-btn-small {
    padding: 8px 16px;
    font-size: 11px;
    width: auto !important;
}

/* Link-Farben in Widgets anpassen, damit sie zum Orange passen */
.ms-widget-footer-link a {
    color: #F46513;
    font-weight: 600;
}
.ms-widget-footer-link a:hover {
    color: #d14900;
    text-decoration: underline;
}

/* --- BUTTONS GLOBAL ORANGE STYLE END------------------------------------------------------ */


/* --- NOTIFICATION WIDGET ------------------------------------------------------------ */

.ms-notification-controls {
    position: relative;
}

/* Das Dropdown selbst */
.ms-dropdown {
    border: 1px solid #eee;
    background: #f9f9f9;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}
.ms-dropdown:hover, .ms-dropdown:focus {
    border-color: #F46513; /* Orange Fokus */
    background: #fff;
}

/* Liste der Benachrichtigungen */
.ms-notif-list {
    max-height: 300px; /* Scrollbar wenn zu viele */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.ms-notif-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0 !important;
}

.ms-notif-text {
    font-size: 13px;
    color: #333;
    display: block;
    line-height: 1.4;
    margin-bottom: 4px;
}
/* Links in Notifications fett & orange machen */
.ms-notif-text a {
    font-weight: 600;
    color: #F46513;
    text-decoration: none;
}
.ms-notif-text a:hover {
    text-decoration: underline;
}

.ms-delete-notif {
    width: 24px; height: 24px;
    font-size: 12px;
}
.ms-delete-notif:hover {
    background: #e74c3c; /* Rot beim Löschen hover */
    color: #fff;
}

/* --- NOTIFICATION WIDGET END ------------------------------------------------------------ */

/* --- NACHRICHTEN WIDGET SPECIAL LAYOUT -------------------------------------- */

/* 1. Wir entfernen das Standard-Padding vom Container NUR für das Nachrichten Widget */
.ms-grid-item[data-slug="widget-messages"] .ms-widget-content {
    padding: 0 !important; /* WICHTIG: Damit Header/Footer bis zum Rand gehen */
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 2. Styling für den Footer Button (Posteingang) */
.ms-widget-footer .ms-btn-secondary {
    background-color: #fff !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
}
.ms-widget-footer .ms-btn-secondary:hover {
    background-color: #F46513 !important; /* Orange beim Hover */
    color: #fff !important;
    border-color: #F46513 !important;
}

/* 3. Scrollbar verschönern (optional) */
.ms-scrollable-area::-webkit-scrollbar {
    width: 6px;
}
.ms-scrollable-area::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

/* --- NACHRICHTEN WIDGET SPECIAL LAYOUT -------------------------------- */
/* --- NACHRICHTEN WIDGET STYLES --- */

/* 1. Die Zeile (Flexbox) */
.ms-message-row {
    display: flex !important; /* Zwingt Elemente nebeneinander */
    align-items: center !important; /* Vertikal mittig */
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0 !important;
    background: none !important;
}
.ms-message-row:last-child {
    border-bottom: none;
}

/* 2. Avatar Bild */
.ms-friend-avatar img {
    border-radius: 50%;
    display: block;
    width: 45px !important;
    height: 45px !important;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 3. Das Auge (Button) */
.ms-read-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.ms-read-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ms-read-btn:hover {
    background-color: #F46513; /* Orange beim Hover */
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(244, 101, 19, 0.3);
}

/* Sicherheits-Reset für Listenpunkte */
ul.ms-friends-list, li.ms-message-row {
    list-style-type: none !important;
    list-style: none !important;
}
.ms-friends-list li::before {
    content: none !important; /* Falls das Theme "Punkte" per CSS-Content einfügt */
    display: none !important;
}
/* --- NACHRICHTEN WIDGET STYLES --- */

/* --- MODAL / POPUP OVERLAY --- */
.ms-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(5px); /* Milchglas Effekt */
}

.ms-modal-content {
    background: #fff; width: 90%; max-width: 800px;
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden; animation: ms-pop-in 0.3s ease;
}

.ms-modal-header {
    background: #f9f9f9; padding: 20px 30px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.ms-modal-header h3 { margin: 0; font-size: 18px; color: #333; display: flex; align-items: center; gap: 10px; }
.ms-close-modal { cursor: pointer; color: #999; font-size: 24px; transition: color 0.2s; }
.ms-close-modal:hover { color: #333; }

.ms-modal-body { padding: 30px; max-height: 60vh; overflow-y: auto; }
.ms-modal-footer { padding: 20px 30px; border-top: 1px solid #eee; text-align: right; background: #f9f9f9; }

/* --- WIDGET TOGGLE GRID --- */
.ms-widget-toggler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Responsive Grid */
    gap: 15px;
}

.ms-widget-toggle-item {
    display: flex; align-items: center; gap: 10px;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    user-select: none;
}

/* AKTIV ZUSTAND (Grün statt Orange) */
.ms-widget-toggle-item.active {
    background-color: #e8f5e9 !important; /* Hellgrün */
    border: 1px solid #2e7d32 !important;  /* Dunkelgrüner Rahmen */
    color: #1b5e20 !important;             /* Dunkelgrüner Text */
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15); /* Sanfter grüner Schatten */
}
/* Das Icon im aktiven Zustand auch grün färben */
.ms-widget-toggle-item.active .dashicons {
    color: #2e7d32 !important;
}
/* Hover Effekt für aktive Items */
.ms-widget-toggle-item.active:hover {
    background-color: #c8e6c9 !important; /* Etwas dunkleres Hellgrün beim Drüberfahren */
}
.ms-widget-toggle-item.active .ms-toggle-name { font-weight: 700; flex-grow: 1; }

/* INAKTIV (Grau) */
.ms-widget-toggle-item.inactive {
    background: #f5f5f5;
    border-color: #ddd;
    color: #aaa;
    opacity: 0.8;
}
.ms-widget-toggle-item.inactive:hover {
    opacity: 1; border-color: #ccc;
}
.ms-widget-toggle-item.inactive .ms-toggle-name { font-weight: 500; flex-grow: 1; }


/* --- PREMIUM WARNUNG --- */
.ms-warning-popup {
    position: fixed; 
    top: 15%; 
    left: 50%; 
    transform: translateX(-50%);
    z-index: 999999; 
    background: #fff8e1; /* Helles Orange/Gelb */
    color: #F46513; /* Dein Orange */
    border: 1px solid #F46513;
    padding: 15px 30px; 
    border-radius: 50px; 
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex; 
    align-items: center; 
    gap: 10px;
}

/* Wackel-Animation (Nein-Sagen) */
@keyframes ms-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
.ms-shake {
    animation: ms-shake 0.4s ease-in-out;
    border-color: red !important; /* Kurzer roter Rahmen */
}
/* --- SICHERHEITS FIX FÜR AVATARE --- */
.ms-friend-avatar img.ms-safe-avatar, 
.ms-friend-avatar img.avatar {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 1px solid #eee !important;
}

/* Verhindert, dass Flex-Items ausbrechen */
.ms-friend-item {
    overflow: hidden;
}

/* --- LIMIT INFO POPUP (Hellblau) ------------------------------------ */

.ms-info-popup {
    background-color: #e1f5fe !important; /* Helles Blau */
    border: 1px solid #0288d1 !important; /* Dunkleres Blau als Rand */
    color: #0277bd !important; /* Dunkelblauer Text */
    padding: 15px 25px !important;
    border-radius: 50px !important;
    box-shadow: 0 5px 15px rgba(2, 119, 189, 0.2) !important;
}

/* Der Link im Popup */
.ms-upgrade-link {
    color: #01579b !important; /* Sehr dunkles Blau für Kontrast */
    font-weight: 800 !important;
    text-decoration: underline;
    margin-left: 5px;
    cursor: pointer;
}

.ms-upgrade-link:hover {
    text-decoration: none;
    color: #0288d1 !important; /* Etwas heller beim Hover */
}

/* Icon etwas anpassen */
.ms-info-popup .dashicons {
    color: #0288d1;
}

/* --- LIMIT INFO POPUP (Hellblau) ENDE ----------------------- */
/* --- TOUR CLOSE BUTTON (X) --- */
.ms-close-tour {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    color: #666; /* Dezentes Grau */
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
    transition: color 0.2s;
    z-index: 1001;
}

.ms-close-tour:hover {
    color: #d32f2f; /* Rot beim Drüberfahren */
}

/* Damit das X Platz hat, geben wir der Tooltip-Box etwas Padding oben */
.ms-tour-tooltip {
    padding-top: 25px !important; 
    padding-right: 25px !important;
}/* --- ACTIVITY FEED WIDGET STYLING --- */

/* Der Text im Post */
.ms-activity-content {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    word-wrap: break-word; /* Lange Wörter umbrechen */
}

.ms-activity-content p {
    margin-bottom: 10px;
}

/* BILDER: Müssen sich anpassen */
.ms-activity-content img,
.ms-activity-content .bp-activity-media-image {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin-top: 5px;
    display: block;
}

/* VIDEOS / IFRAMES (Youtube etc.) */
.ms-activity-content iframe,
.ms-activity-content video,
.ms-activity-content embed,
.ms-activity-content object {
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 16 / 9; /* Modernes Seitenverhältnis */
    border-radius: 8px;
    margin-top: 5px;
}

/* LINKS im Text */
.ms-activity-action a,
.ms-activity-content a {
    color: #F46513;
    text-decoration: none;
    font-weight: 500;
}

/* META BUTTONS (Like, Comment) unten */
.ms-activity-meta a {
    display: inline-block;
    margin-right: 15px;
    font-size: 12px;
    color: #888;
    text-decoration: none;
    background: #f9f9f9;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ms-activity-meta a:hover {
    background: #eee;
    color: #333;
}

/* Icons in den Buttons */
.ms-activity-meta a:before {
    font-family: 'dashicons';
    margin-right: 3px;
    vertical-align: middle;
}
/* Optional: Dashicons hinzufügen, falls BP keine eigenen nutzt */
.acomment-reply:before { content: "\f101"; } /* Sprechblase */
.fav:before { content: "\f154"; } /* Stern/Herz */
.delete-activity:before { content: "\f182"; } /* Mülleimer */


/* BRIDGE: Versteckt die Hauptansicht des Shortcodes im Widget */
#nh-bridge-hidden .nh-wrapper {
    display: none !important;
}

/* Aber das Modal (Popup) muss sichtbar sein und ganz oben liegen */
.nh-modal {
    z-index: 100000 !important; /* Über dem Dashboard */
}
 