/**
 * ShepWise Chat Application Stylesheet
 *
 * Eine umfassende Stylesheet-Datei für die ShepWise Chat-Anwendung.
 * Die Styles sind nach Komponenten und Funktionalitäten organisiert,
 * um die Wartbarkeit zu verbessern.
 */

/*******************************
 * 1. FARBSCHEMA & VARIABLEN
 *******************************/
:root {
    /* Primäre Farbpalette */
    --primary-dark: #2C4A3B;
    --primary: #3A6351;
    --primary-light: #88A793;

    /* Akzent- und Kontrastfarben */
    --accent: #C17817;
    --background: #F5F3EE;
    --text-dark: #2A2826;
    --text-light: #F9F6F0;

    /* Signalfarben */
    --dark-red: #8B0000;
    --maroon: #800000; /* Dunkleres Rot für Hover-Zustände */
    --white: #FFFFFF;
}

/*******************************
 * 2. ALLGEMEINE STILE
 *******************************/
body {
    background-color: var(--background);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Klasse für Serif-Schriften in bestimmten Elementen */
.serif-font {
    font-family: 'Playfair Display', serif;
}

/* Einheitliche Schriftart für Überschriften */
h1, h3, h4, h5 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/*******************************
 * 3. NAVIGATION & HEADER
 *******************************/
/* Navbar-Logo Größe */
.navbar-light .navbar-brand img {
    max-height: 50px;
}

/* Stilisierung des Home-Icons */
.outline-home {
    color: transparent;
    -webkit-text-stroke: 1px #9e9e9e;
    font-size: 20px;
}

/*******************************
 * 4. SEKTIONEN DER HAUPTSEITE
 *******************************/
/* ===== Hero-Bereich ===== */
.hero {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
}

.hero ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.hero ul li {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.hero ul li i {
    color: var(--accent);
    margin-right: 10px;
}

/* ===== Trenner zwischen Sektionen ===== */
.section-divider {
    border-top: 1px solid #eaeaea;
    margin: 50px 0;
}

/* ===== Card-Icons ===== */
.card i {
    color: var(--accent);
}

/* ===== Hinweisbereich ===== */
.notice-section {
    background-color: #f8f9fa;
    padding: 40px 0;
}

.notice-section h3 {
    color: var(--primary-dark);
    margin-bottom: 30px;
}

.notice-section h5 {
    color: var(--primary);
    margin-bottom: 15px;
}

/* ===== Call-to-Action Bereich ===== */
.cta-section {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.cta-section .btn {
    background-color: var(--accent);
    color: var(--text-light);
    padding: 15px 30px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.cta-section .btn:hover {
    filter: brightness(90%);
    transform: translateY(-2px);
}

/*******************************
 * 5. CHAT-INTERFACE
 *******************************/
/* ===== Chat-Container ===== */
.chat-container {
    max-width: 800px;
    margin: 50px auto;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(44,74,59,0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 80vh;
}

/* ===== Chat-Kopfzeile ===== */
.chat-header {
    padding: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.chat-header h3 {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
    margin: 0;
}

/* ===== Chat-Nachrichtenbereich ===== */
.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===== Chat-Blasen ===== */
/* Grundlegendes Aussehen aller Chat-Blasen */
.chat-bubble {
    max-width: 75%;
    padding: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    transition: transform 0.2s ease;
    animation: slideIn 0.3s ease forwards;
}

.chat-bubble:hover {
    transform: translateY(-2px);
}

/* Stil für Benutzer-Nachrichten */
.user-message {
    background-color: var(--primary-light);
    color: var(--text-dark);
    border-radius: 18px 18px 4px 18px;
    align-self: flex-end;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Stil für Bot-Nachrichten */
.bot-message {
    background-color: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 18px 18px 18px 4px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Codeblock in Chat-Blasen */
.chat-bubble pre {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    color: #2C3E2E;
}

/* ===== Chat-Eingabebereich ===== */
.chat-input {
    padding: 20px;
    background: linear-gradient(180deg, rgba(245,243,238,0) 0%, rgba(245,243,238,1) 100%);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.chat-input input[type="text"] {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.chat-input input[type="text"]:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(136,167,147,0.2);
    outline: none;
}

/* Stil für Fieldsets im Chat-Eingabebereich */
.chat-input fieldset {
    margin-bottom: 15px;
}

.chat-input legend {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== Toggle-Schalter für persönlich/sachlich ===== */
/* Diese Styles passen den Bootstrap Custom Switch an und sorgen für eine einheitliche Darstellung in der gesamten App. */


/* ===== Download-Button für Chat-Inhalte ===== */
#download_md {
    margin: 10px;
    display: none; /* Initial versteckt, wird via JS angezeigt */
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    transition: all 0.3s ease;
}

#download_md:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/*******************************
 * 6. FORMULARELEMENTE
 *******************************/
/* ===== Checkboxen und Radio-Buttons ===== */
.form-check-input {
    margin-right: 5px;
}

.form-check-label {
    margin-right: 15px;
    font-weight: 400;
}

/* ===== Fokus-Stile für Eingabefelder ===== */
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(58,99,81,0.2);
    border-color: var(--primary);
}

/*******************************
 * 7. BUTTONS
 *******************************/
/* ===== Standard-Buttons ===== */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.2s ease;
}

.btn-primary, .btn-light {
    border: none;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-light:hover {
    filter: brightness(90%);
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--accent);
}

.btn-success {
    background-color: var(--accent);
    border: none;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: var(--accent);
    filter: brightness(90%);
    transform: translateY(-1px);
}

/* ===== Button-Ripple-Effekt ===== */
/* Erzeugt einen Welleneffekt bei Buttonklicks */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/*******************************
 * 8. FEEDBACK-SYSTEM
 *******************************/
/* ===== Bewertungsoptionen ===== */
.feedback-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-top: 20px;
}

.feedback-options label {
    cursor: pointer;
}

.feedback-options i {
    font-size: 3em;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Positive Bewertung (Daumen hoch) */
.feedback-positive i {
    color: var(--primary);
}

.feedback-positive i:hover {
    color: var(--primary-dark);
    transform: scale(1.2);
}

/* Negative Bewertung (Daumen runter) */
.feedback-negative i {
    color: var(--dark-red);
}

.feedback-negative i:hover {
    color: var(--maroon);
    transform: scale(1.2);
}

/* Ausgewählte Bewertungsoption */
.feedback-options input[type="radio"]:checked + i {
    transform: scale(1.2);
}

.feedback-options input[type="radio"] {
    display: none; /* Versteckt die eigentlichen Radio-Buttons */
}

/*******************************
 * 9. TEXTAREA UND INPUT GROUPS
 *******************************/
/* Anpassungen für Textbereiche und Eingabegruppen */
.input-group textarea.form-control {
    flex: 1 1 auto;
    width: auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    align-self: flex-start;
    height: auto;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Anpassungen für die wachsende Texteingabe */
textarea.auto-resize {
    resize: vertical; /* Erlaubt nur vertikales Vergrößern */
    min-height: 114px; /* Standardhöhe eines Bootstrap-Inputfelds */
    overflow-y: hidden; /* Verhindert Scrollbar während des automatischen Wachsens */
    transition: height 0.1s ease; /* Smooth-Animation beim Wachsen */
}

/* Stellt sicher, dass die Textarea mit dem Button richtig ausgerichtet ist */
.input-group textarea.form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Anpassung der Schriftart für Textarea und Placeholder */
textarea.form-control {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1rem;  /* Standardgröße wie im restlichen Formular */
}

/* Anpassung der Placeholder-Formatierung */
textarea.form-control::placeholder {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1rem;
    color: #6c757d;  /* Bootstrap's Standard-Placeholder-Farbe */
}

/*******************************
 * 10. FAQ-SEITE
 *******************************/
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.faq-question {
    cursor: pointer;
}

.faq-answer {
    background-color: #f9f9f9;
}

.toggle-answer {
    border: none;
    background: none;
    font-size: 1.2rem;
}

.toggle-answer:focus {
    outline: none;
}

/* Stil für die Antworten */
.faq-answer td {
    padding-top: 0;
    padding-bottom: 15px;
}

/* Verhindert Hover-Effekt auf Antwortzeilen */
.faq-answer:hover {
    background-color: #f9f9f9 !important;
}

/*******************************
 * 11. EINSTELLUNGSSEITE
 *******************************/
.settings-body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

.dimension {
    margin-bottom: 30px;
}

.facet {
    margin: 10px 0;
    padding: 5px;
    border-bottom: 1px solid #eee;
    margin-left: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.facet-label {
    flex: 1 1 200px;
    margin-right: 10px;
}

.slider-container {
    flex: 1 1 300px;
    margin-right: 10px;
}

.prompt-characteristic {
    flex: 1 1 200px;
    margin-right: 10px;
}

.selected-label {
    flex: 1 1 200px;
}

.slider-label {
    display: inline-block;
    width: 400px;
}

.slider {
    width: 300px;
}

#results {
    margin-top: 30px;
}

textarea {
    width: 100%;
    font-family: monospace;
}

/* Akkordeon-Komponente für Settings */
.accordion-header {
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-header {
    background-color: #e6e6e6;
    margin-left: 20px;
}

.accordion-content {
    padding: 10px;
    margin-left: 20px;
}

.dimension-description {
    font-style: italic;
    color: #666;
}

/*******************************
 * 12. FOOTER
 *******************************/
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

.footer a {
    color: var(--white);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/*******************************
 * 13. ANIMATIONEN
 *******************************/
/* Einblendeffekt für neue Nachrichten */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation für Erfolgsmeldungen */
@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: success 0.3s ease;
}

/*******************************
 * 14. RESPONSIVE DESIGN
 *******************************/
/* ===== Mittlere Bildschirmgrößen ===== */
@media (max-width: 768px) {
    /* Chat-Kontainer-Anpassungen */
    .chat-container {
        margin: 0;
        height: 90vh;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
        padding: 10px;
    }

    .chat-header h3 {
        font-size: 1.2rem;
    }

    .chat-bubble {
        max-width: 85%;
        padding: 12px;
    }

    .chat-input {
        padding: 10px;
    }

    #download_md {
        width: 100%;
        margin: 10px 0;
    }

    /* Anpassungen für Hero-Sektion */
    .hero h1 {
        font-size: 2rem;
    }

    .hero ul li {
        font-size: 1rem;
    }

    /* Button-Anpassungen */
    .cta-section .btn {
        font-size: 1rem;
        padding: 10px 20px;
    }

    /* FAQ-Anpassungen */
    .faq-question td {
        font-size: 1rem;
    }
}

/* ===== Kleine Bildschirmgrößen ===== */
@media (max-width: 576px) {
    .chat-messages {
        height: 90vh;
        padding: 15px;
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 0.95rem;
    }

    .btn {
        padding: 8px 12px;
    }

    
}

/* ===== Querformat auf Mobilgeräten ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-container {
        height: auto;
        min-height: 100vh;
    }

    .chat-messages {
        max-height: 50vh;
    }
}

/*******************************
 * 15. SPEZIFISCHE KOMPONENTEN-ÜBERSCHREIBUNGEN
 *******************************/
/* Korrektur für die Stil-Toggle-Button-Group */
.stil-toggle-group .btn-primary {
    background-color: #007bff; /* Standard Bootstrap Primary Blue */
    border-color: #007bff;
}

.stil-toggle-group .btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.stil-toggle-group .btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.stil-toggle-group .btn-primary.active,
.stil-toggle-group .btn-primary:active {
    background-color: #0056b3; /* Dunkleres Blau für aktiven/gedrückten Zustand */
    border-color: #0056b3;
}

/*******************************
 * 16. PRO-VERSION LANDING PAGE
 *******************************/
.feature-tile {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(44, 74, 59, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(44, 74, 59, 0.12);
}

.feature-tile h3 {
    font-size: 1.25rem;
    margin-top: 15px;
    color: var(--primary-dark);
}

.feature-tile p {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.feature-tile i {
    color: var(--accent);
}

/* == Comparison Table Styling == */
#comparison .table thead th {
    vertical-align: middle;
}

/* Styling for the highlighted "Pro" column in the table body */
#comparison .table tbody .pro-column {
    background-color: rgba(58, 99, 81, 0.05); /* A very light green */
    font-weight: 600;
}

/* Styling for the "Pro" column header to make it stand out */
#comparison .table thead .pro-column {
    background-color: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark); /* Match the background for a solid look */
}

/*******************************
 * 17. NEW NAVIGATION COMPONENTS
 *******************************/
/* ===== Breadcrumbs ===== */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

/* ===== Tabs ===== */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    color: var(--primary-light);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--primary-dark);
    background-color: var(--background);
    border-color: #dee2e6 #dee2e6 var(--background);
    font-weight: 600;
}

.tab-content {
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-top: none;
    background-color: #fff;
    border-bottom-left-radius: .25rem;
    border-bottom-right-radius: .25rem;
}


/* ===== User Dropdown Menu ===== */
.navbar-nav .dropdown-menu {
    background-color: var(--white);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(44,74,59,0.08);
}

.dropdown-item {
    color: var(--text-dark);
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--text-dark);
}


/* 18. Persona Page Accordion */
.accordion-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: background-color 0.2s ease-in-out;
}

.accordion-header:hover {
    background-color: #e9ecef;
}

.accordion-header h2, .accordion-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.accordion-header .accordion-icon {
    font-size: 1.25rem;
    color: var(--primary);
    transition: transform 0.2s ease-in-out;
}

.accordion-header.open .accordion-icon {
    transform: rotate(90deg);
}

.sub-header {
    background-color: #f1f1f1;
}

/*******************************
 * 19. COOKIE CONSENT BANNER
 *******************************/
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 15px 0;
    z-index: 1050; /* High z-index to appear above other content */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease-in-out;
}

#cookie-consent-banner.d-none {
    transform: translateY(100%);
}

#cookie-consent-banner p {
    margin: 0;
    font-size: 0.9rem;
}
