/* ============================================================
   ActiveHome CSS – Komplette Datei
   ============================================================ */

/* Radiate Header komplett entfernen */
#headerimg,
#masthead,
.header-image,
.header-wrapper {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

#header {
    visibility: hidden;
}

/* Radiate-Container auf volle Breite setzen */
#content,
.container,
.inner-wrap,
.site-content,
.clearfix,
.activehome-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Entfernt alle HR-Linien im ActiveHome */
hr,
.wp-block-separator {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* WordPress-Footer ("Stolz präsentiert von WordPress") komplett ausblenden –
   inkl. Container #colophon/.site-footer, der sonst Inhalt überlagert.
   Die App-Seiten haben ihren eigenen .all-footer. */
#colophon,
.site-footer,
.site-info {
    display: none !important;
}

/* ============================================================
   LISTEN IM UNIT-VIEW
   ============================================================ */
#learning-view {
    width: 100%;
    min-height: 400px;
}

#unit-view-wrapper {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    margin-top: 1rem;
}

#unit-view-wrapper ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

#unit-view-wrapper ul li {
    position: relative;
    padding-left: 1.4em;
    margin-bottom: 0.4em;
}

#unit-view-wrapper ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.25em;
    width: 0.9em;
    height: 0.9em;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e67e22' viewBox='0 0 16 16'><path d='M4 2l6 6-6 6'/></svg>");
}

/* ============================================================
   LOGIN / GAST
   ============================================================ */
.activehome-guest-wrapper {
    max-width: 900px;
    margin: 50px auto;
}

.activehome-login-wrapper {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
}

.activehome-auth-grid {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.auth-box {
    flex: 1;
    padding: 25px;
    background: #f8f8f9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============================================================
   APP-GRUNDLAYOUT
   ============================================================ */
.activehome-app {
    display: flex;
    height: 100vh;
    background: #f4f7fb;
    position: relative;
}

/* MAIN-BEREICH */
.activehome-main {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    transition: flex-basis 0.35s ease;
}

/* ============================================================
   HEADER
   ============================================================ */
.activehome-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

.header-logo img {
    width: 120px;
    height: auto;
    display: block;
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.header-toprow {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.activehome-search {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.gtranslate_wrapper {
    margin-right: 20px;
}

/* ============================================================
   CONTENT-BEREICH
   ============================================================ */
.content-block {
    margin-bottom: 2.5rem;
}

/* ============================================================
   SEMINAR-BLOCK
   ============================================================ */
.seminar-block {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid #0f6e69;
}

.seminar-title {
    font-size: 1.6rem !important;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.seminar-meta {
    font-size: 0.85rem;
    font-weight: 400;
    color: #94a3b8;
    margin-left: auto;
}

/* Überschriften standalone Sektionen */
.content-block > h3 {
    font-size: 1.6rem !important;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

/* ============================================================
   MODUL-BLOCK
   ============================================================ */
.module-block {
    margin-bottom: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.module-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid transparent;
}

.module-header:hover {
    background: #e8f5f2;
}

.module-header[aria-expanded="true"] {
    background: #e8f5f2;
    border-bottom-color: #e2e8f0;
}

.module-toggle-icon {
    font-size: 0.85rem;
    color: #0f6e69;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.module-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.6rem !important;
    flex: 1;
}

.module-unit-count {
    font-size: 0.8rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    flex-shrink: 0;
}

/* ============================================================
   LERNEINHEITEN-LISTE (aufklappbar)
   ============================================================ */
.unit-list {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    max-height: 2000px;
    opacity: 1;
}

.unit-list.collapsed {
    max-height: 0;
    opacity: 0;
}

.unit-list .unit-table {
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-top: 0 !important;
}

/* ============================================================
   TABELLEN
   ============================================================ */
.activehome-content table,
.unit-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    font-size: 1.6rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.activehome-content th,
.activehome-content td,
.unit-list th,
.unit-list td {
    padding: 12px 16px;
    text-align: left;
    font-size: 1.6rem !important;
}

.activehome-content thead,
.unit-list thead {
    background: #f0f4f8;
    font-weight: bold;
    font-size: 1.6rem;
}

.activehome-content tbody tr:nth-child(even),
.unit-list tbody tr:nth-child(even) {
    background: #fafafa;
}

.activehome-content tbody tr:hover,
.unit-list tbody tr:hover {
    background: #e8f5f2;
}

.activehome-content td:last-child,
.unit-list td:last-child {
    text-align: right;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.start-button,
.activehome-content .start-button {
    background: #0f6e69;
    color: white;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0;
}

.start-button:hover,
.activehome-content .start-button:hover {
    background: #0a524e;
}

/* ============================================================
   STATUS-BADGE
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
}

.status-badge[class*="abgeschlossen"] {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge[class*="Arbeit"] {
    background: #fef3c7;
    color: #d97706;
}

/* ============================================================
   LEERE HINWEISE
   ============================================================ */
.empty-hint {
    padding: 1rem 1.2rem;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}

/* ============================================================
   CHAT SIDEBAR
   ============================================================ */
.activehome-chat {
    width: 360px;
    background: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.35s ease;
    overflow: visible;
    z-index: 20;
}

.activehome-app.chat-collapsed .activehome-chat {
    width: 40px;
}

.activehome-app.chat-collapsed .chat-header,
.activehome-app.chat-collapsed .chat-body,
.activehome-app.chat-collapsed .chat-header-buttons {
    display: none;
}

.activehome-app.chat-collapsed .activehome-main {
    margin-right: 0;
    flex: 1 1 auto;
}

.chat-header {
    padding: 1rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    opacity: 0.6;
    overflow-y: auto;
}

.chat-header-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

#chat-exit {
    width: 32px;
    height: 32px;
    background: #0f172a;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: -2px 4px 10px rgba(0,0,0,0.25);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-exit:hover {
    background: #162042;
}

#chat-toggle {
    position: absolute;
    left: -40px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: #0f172a;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 4px 10px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.3s ease;
}

.activehome-app.chat-collapsed #chat-toggle {
    transform: rotate(180deg);
}

/* ============================================================
   CHAT MESSAGES
   ============================================================ */
#dialog-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dialog-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

.dialog-system {
    align-self: flex-start;
    background: #ffffff;
    color: #222;
    border-bottom-left-radius: 4px;
    border: 1px solid #ddd;
}

.dialog-user {
    align-self: flex-end;
    background: #dcf8c6;
    color: #111;
    border-bottom-right-radius: 4px;
}

.typing-indicator {
    font-style: italic;
    font-size: 13px;
    opacity: 0.7;
    background: #ffffff;
    color: #222;
    border-radius: 18px;
    padding: 8px 12px;
    width: fit-content;
    border-bottom-left-radius: 4px;
}

.dialog-input {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.dialog-input input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

.dialog-input button {
    background: #128c7e;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}

.dialog-input button:hover {
    background: #0b7c6f;
}

/* ============================================================
   DIVERSES
   ============================================================ */
.activehome-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1fr;
    gap: 1rem;
}

.block {
    padding: 2rem;
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.block-units  { background: #0066cc; }
.block-abos   { background: #009e5e; }
.block-reading { background: #cc6600; }
.block-chat   { background: #663399; }

.header-slides {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
}

.slide-chip {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ============================================================
   LE-FORTSCHRITTSBALKEN (Direkt-Einstieg, Variante B)
   Sitzt zwischen .activehome-main und #unit-view-wrapper
   ============================================================ */
#ec-le-progress {
    margin: 0.75rem 0 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.ec-le-pb-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-le-pb-track {
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.ec-le-pb-fill {
    height: 100%;
    background: #0f6e69;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.ec-le-pb-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
}

.ec-le-pb-step,
.ec-le-pb-pct {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1;
}

/* Mobile: etwas kompakter, Titel kürzen */
@media (max-width: 768px) {
    #ec-le-progress {
        margin: 0.5rem 0 0.25rem;
        padding: 0.6rem 0.75rem;
    }

    .ec-le-pb-title {
        font-size: 0.8rem;
    }

    .ec-le-pb-track {
        height: 4px;
    }

    .ec-le-pb-step,
    .ec-le-pb-pct {
        font-size: 0.72rem;
    }
}

/* ============================================================
   MOBILE  (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Grundlayout */
    .activehome-app {
        flex-direction: column;
        height: auto;
    }

    .activehome-main {
        padding: 1rem;
    }

    /* Header */
    .header-toprow {
        display: none !important;
    }

    /* Seminar */
    .seminar-block {
        padding: 1rem;
        border: 2px solid #0f6e69 !important;
        box-shadow: 0 4px 16px rgba(15,110,105,0.15) !important;
    }

    .seminar-title {
        font-size: 1.2rem !important;
    }

    .seminar-meta {
        display: none;
    }

    /* Modul */
    .module-block {
        border: 2px solid #7fb5b0 !important;
        box-shadow: 0 4px 14px rgba(127,181,176,0.18) !important;
        margin-bottom: 1rem;
    }

    .module-header {
        padding: 0.75rem 1rem;
    }

    .module-name {
        font-size: 1.1rem !important;
    }

    /* Tabellen → Cards */
    .activehome-content table,
    .activehome-content thead,
    .activehome-content tbody,
    .activehome-content tr,
    .activehome-content th,
    .activehome-content td,
    .unit-list table,
    .unit-list thead,
    .unit-list tbody,
    .unit-list tr,
    .unit-list th,
    .unit-list td {
        display: block;
        width: 100%;
    }

    .activehome-content thead,
    .activehome-content th,
    .unit-list thead,
    .unit-list th {
        display: none !important;
    }

    .activehome-content tr,
    .unit-list tr {
        margin-bottom: 1rem;
        padding: 1rem;
        background: #ffffff;
        border-radius: 14px;
        border: 2px solid #7fb5b0 !important;
        box-shadow: 0 6px 20px rgba(127,181,176,0.18) !important;
    }

    .activehome-content td,
    .unit-list td {
        padding: 0.35rem 0;
        font-size: 0.95rem !important;
        text-align: left !important;
    }

    .activehome-content td::before,
    .unit-list td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        opacity: 0.6;
        margin-bottom: 2px;
    }

    .activehome-content td:last-child,
    .unit-list td:last-child {
        margin-top: 0.5rem;
    }

    .start-button {
        width: 100%;
        font-size: 1rem;
        padding: 0.7rem;
    }

    /* Abos ausblenden */
    .subscription-table,
    .subscription-table * {
        display: none !important;
    }

    section.content-block:has(.subscription-table) {
        display: none !important;
    }

    /* Footer */
    .site-info {
        display: none !important;
    }

    /* Chat: Bottom Sheet */
    .activehome-chat {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 80vh;
        background: #0f172a;
        border-radius: 18px 18px 0 0;
        transform: translateY(100%);
        transition: transform 0.35s ease;
        z-index: 999;
    }

    .activehome-app.chat-open .activehome-chat {
        transform: translateY(0);
    }

    .activehome-chat.collapsed {
        width: 100%;
    }

    .chat-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .chat-body {
        padding: 1rem;
        overflow-y: auto;
    }

    #chat-toggle {
        position: fixed;
        bottom: 16px;
        right: 16px;
        left: auto;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        font-size: 20px;
        background: #0f172a;
        color: white;
        box-shadow: 0 8px 24px rgba(0,0,0,0.35);
        z-index: 1000;
    }

    /* Flex-Spalten deaktivieren */
    [class*="col-"],
    [class*="columns"],
    [class*="grid"] {
        display: block !important;
    }

    [class*="col-"] > *,
    [class*="columns"] > *,
    [class*="grid"] > * {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }
}


/* ============================================================
   FEEDBACK WIDGET
   ============================================================ */
.feedback-intro {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    line-height: 1.6;
}

.feedback-widget {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

.feedback-stars {
    font-size: 3rem;
    margin-bottom: 1rem;
    user-select: none;
}

.feedback-stars .star {
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    margin: 0 0.2rem;
}

.feedback-stars .star:hover,
.feedback-stars .star.hover {
    color: #fbbf24;
    transform: scale(1.15);
}

.feedback-stars .star.selected {
    color: #f59e0b;
}

.feedback-selected {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    min-height: 1.5rem;
}

.feedback-text {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1.2rem;
    font-family: inherit;
    margin-bottom: 1rem;
    resize: vertical;
}

.feedback-text:focus {
    outline: none;
    border-color: #0f6e69;
    box-shadow: 0 0 0 3px rgba(15,110,105,0.1);
}

.feedback-submit {
    background: #0f6e69;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.feedback-submit:hover:not(:disabled) {
    background: #0a524e;
}

.feedback-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}