/**
 * BLACKONION - Chat Styles v6.5
 * Neues Layout: Lupe oben, Buttons unten
 */

/* Search Bar Container */
.search-bar-container {
    position: fixed !important;
    top: 100px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 900px !important;
    padding: 0 20px !important;
    z-index: 1000 !important;
}

.search-bar-container.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.search-bar-wrapper {
    position: relative !important;
    overflow: visible !important;
}

/* Search Bar - Dunkles Design */
.search-bar-container .search-bar,
.search-bar {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(30, 30, 35, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid #000000 !important;
    border-radius: 20px !important;
    padding: 1rem 1.25rem !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.45) !important;
    overflow: visible !important;
}

/* OBERE ZEILE: Input + Lupe */
.search-bar-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

/* Input */
.search-bar-container .search-bar-input,
.search-bar-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding: 0.5rem 0 !important;
    outline: none !important;
    caret-color: #000000 !important;
    height: auto !important;
    min-height: unset !important;
    border-radius: 0 !important;
    min-width: 0 !important;
}

.search-bar-input::placeholder {
    color: #ffffff !important;
    opacity: 0.85 !important;
    font-size: 0.95rem !important;
}

/* Suchbutton - Dunkelgrau, eckig, OBEN RECHTS */
.search-bar-top .search-bar-btn,
.search-bar-container .search-bar-top .search-bar-btn,
button.search-bar-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #3d3d42 !important;
    border: none !important;
    color: rgba(255,255,255,0.65) !important;
    width: 38px !important;
    height: 32px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    transition: background 0.15s, color 0.15s !important;
}

.search-bar-btn:hover {
    background: #4d4d52 !important;
    color: #ffffff !important;
}

.search-bar-btn svg {
    width: 15px !important;
    height: 15px !important;
    stroke: currentColor !important;
    fill: none !important;
}

/* UNTERE ZEILE: Beratung links, Gesprächsverlauf rechts */
.search-bar-bottom {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding-top: 12px !important;
    margin-top: 10px !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    gap: 12px !important;
}

/* Beratung anfragen Button - LINKS */
.cta-btn-small {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #000000, #333333) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 6px 16px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.cta-btn-small:hover {
    background: linear-gradient(135deg, #000000, #000000) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Gesprächsverlauf Button - RECHTS - Schwarzes Design wie Search-Bar */
.search-bar-container .chat-history-btn,
.search-bar-bottom .chat-history-btn,
button.chat-history-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(30, 30, 35, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid #000000 !important;
    color: #ffffff !important;
    padding: 5px 12px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    margin-left: auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.chat-history-btn:hover {
    background: #3d3d42 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.chat-history-btn svg {
    width: 13px !important;
    height: 13px !important;
    stroke: currentColor !important;
    fill: none !important;
    flex-shrink: 0 !important;
    opacity: 0.75 !important;
}

.chat-history-btn span {
    display: inline !important;
}

/* Inline Answer - Dunkles Design */
.inline-answer {
    margin-top: 12px !important;
    background: #1e1e22 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
    color: #e5e5e5 !important;
}

.inline-answer-content {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    color: #e5e5e5 !important;
}

/* Mobile */
@media (max-width: 768px) {
    .search-bar-container {
        top: 80px !important;
        padding: 0 15px !important;
    }
    .search-bar-input::placeholder {
        font-size: 0.85rem !important;
    }
    .cta-btn-small,
    .chat-history-btn {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }
}

/* v6.6 - Button Fix + Neuer Placeholder */

/* Beratung anfragen Button - FORCE BLAU */
.search-bar-container a.cta-btn-small,
.search-bar a.cta-btn-small,
.search-bar-bottom a.cta-btn-small,
a.cta-btn-small {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #000000, #333333) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 6px 16px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

a.cta-btn-small:hover {
    background: linear-gradient(135deg, #000000, #000000) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Gesprächsverlauf dezenter */
.search-bar-bottom .chat-history-btn {
    background: rgba(30, 30, 35, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid #000000 !important;
    color: #ffffff !important;
}

/* v6.7 - Layout Fix für Buttons */
.search-bar-container .search-bar {
    overflow: visible !important;
}

.search-bar-bottom {
    overflow: visible !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#chatBeratungBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #000000, #333333) !important;
    border: none !important;
    color: #fff !important;
    padding: 6px 16px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    margin: 0 !important;
}

#chatBeratungBtn:hover {
    background: linear-gradient(135deg, #000000, #000000) !important;
}

/* v6.7c - FORCE FIX alle Container overflow */
.search-bar-container,
.search-bar-container *,
.search-bar-wrapper,
.search-bar-wrapper *,
.search-bar,
.search-bar *,
.search-bar-top,
.search-bar-top *,
.search-bar-bottom,
.search-bar-bottom * {
    overflow: visible !important;
}

/* Button Container Layout */
.search-bar-bottom {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 12px 0 0 0 !important;
    margin: 10px 0 0 0 !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    gap: 12px !important;
    position: relative !important;
    left: 0 !important;
}

/* Force Beratung Button sichtbar */
#chatBeratungBtn {
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    transform: none !important;
}

/* v6.8 - Bottom-Row rechts gruppieren + Button wieder normal */
.search-bar-bottom.search-bar-bottom--right {
    justify-content: flex-end !important;
}

/* sicherstellen, dass Beratung NICHT als Icon-Button behandelt wird */
#chatBeratungBtn {
    width: auto !important;
    height: 28px !important;
    padding: 6px 16px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
}


/* v6.8b - Bottom-Buttons rechts gruppieren */
.search-bar-bottom.search-bar-bottom--right {
  justify-content: flex-end !important;
  gap: 12px !important;
}
.search-bar-bottom.search-bar-bottom--right .chat-history-btn {
  margin-left: 0 !important;
}


/* v7.0 - Lupe größer + blau bei Text */
.search-bar-top .search-bar-btn {
  width: 44px !important;
  height: 36px !important;
  border-radius: 8px !important;
}
.search-bar-top .search-bar-btn svg {
  width: 18px !important;
  height: 18px !important;
}
/* wenn im Feld Text steht */
.search-bar-top .search-bar-btn.has-text {
  background: linear-gradient(135deg, #000000, #333333) !important;
  color: #ffffff !important;
}
.search-bar-top .search-bar-btn.has-text:hover {
  background: linear-gradient(135deg, #000000, #000000) !important;
}
