/**
 * B2B-Explorer.net - Child Window CSS
 * Version: 1.5.0 - Todo 372 (CSS aus brv-child.php ausgelagert)
 * 
 * Spezielle Styles für das Child-Fenster der D3-Visualisierung
 */

body { 
    margin: 0; 
    padding: 0; 
    overflow: hidden; 
    background-color: #f8f9fa; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#network-graph { 
    width: 100vw; 
    height: 100vh; 
    background-color: #f8f9fa;
}

/* .child-window-header entfernt - wird weiter unten definiert */
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex: 0 0 auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

/* Todo 210: Bootstrap Button Overrides - exakt wie in brv.php */
.btn-sm {
    padding: 6px 12px !important; /* Todo 210: Gleiche Dimensionen wie brv.php */
    font-size: 12px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    white-space: nowrap !important; /* Todo 210: Verhindert Umbruch */
    min-width: auto !important; /* Todo 210: Variable Breite */
    width: auto !important; /* Todo 210: Variable Breite */
}

.btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
    transition: all 0.2s ease !important; /* Todo 210: Smooth transitions */
}

.btn-outline-primary:hover {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    transform: translateY(-1px) !important; /* Todo 210: Hover-Effekt wie brv.php */
}

.btn-outline-info {
    color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    background-color: transparent !important;
    transition: all 0.2s ease !important; /* Todo 210: Smooth transitions */
}

.btn-outline-info:hover {
    color: #000 !important;
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    transform: translateY(-1px) !important; /* Todo 210: Hover-Effekt wie brv.php */
}

.btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: transparent !important;
}

.btn-outline-danger:hover {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    transform: translateY(-1px) !important; /* Todo 210: Hover-Effekt wie brv.php */
}

.btn-outline-warning {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
    background-color: transparent !important;
    transition: all 0.2s ease !important; /* Todo 210: Smooth transitions */
}

.btn-outline-warning:hover {
    color: #000 !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    transform: translateY(-1px) !important; /* Todo 210: Hover-Effekt wie brv.php */
}

/* Todo 210: Entfernt doppelte .btn-sm Definition */

/* Todo 210: Dropdown-Styles wie brv.php */
select {
    padding: 6px 12px !important; /* Todo 210: Gleiche Dimensionen wie brv.php */
    border: 1px solid #495057 !important; /* Todo 210: Dunklerer Border wie brv.php */
    border-radius: 4px !important;
    font-size: 12px !important;
    background-color: #ffffff !important;
    color: #495057 !important;
    transition: all 0.2s ease !important; /* Todo 210: Smooth transitions */
    min-width: 80px !important;
}

select:focus {
    border-color: #0d6efd !important; /* Todo 210: Focus-Color wie brv.php */
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    outline: none !important;
}

select:hover {
    border-color: #0d6efd !important; /* Todo 210: Hover-Effekt wie brv.php */
}

/* Todo 210: Input-Styles entfernt - verwende nur brt-search-input CSS-Klasse */

/* Todo 351: Spezielle Anpassung für Child-Window Header */
.child-window-header .brt-search-input {
    min-width: 800px !important; /* TODO 351: Erhöht von 200px auf 800px */
    max-width: 1200px !important; /* TODO 351: Erhöht von 500px auf 1200px für flexible Breite */
    background: #0d1117 !important; /* Dunkler Hintergrund wie in brv.php */
    border: 1px solid #21262d !important; /* Dunkler Border wie in brv.php */
    color: #f0f6fc !important; /* Helle Textfarbe wie in brv.php */
    border-radius: 8px !important; /* Rundung wie in brv.php */
    padding: 10px 14px !important; /* Padding wie in brv.php */
    font-size: 14px !important; /* Font-size wie in brv.php */
    min-height: 44px !important; /* Höhe wie in brv.php */
}

.child-window-header .brt-search-input:focus {
    border-color: #58a6ff !important; /* Blaue Border bei Focus */
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1) !important; /* Blauer Glow */
    outline: none !important;
}

.child-window-header .brt-search-input::placeholder {
    color: #8b949e !important; /* Graue Placeholder-Farbe */
}

/* TODO 351: Responsive Breakpoints für brv-child.php */
@media (max-width: 1400px) {
    .child-window-header .brt-search-input {
        min-width: 600px !important;
        max-width: 1000px !important;
    }
}

@media (max-width: 1200px) {
    .child-window-header .brt-search-input {
        min-width: 500px !important;
        max-width: 800px !important;
    }
}

@media (max-width: 992px) {
    .child-window-header .brt-search-input {
        min-width: 400px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Todo 365: Mobile Styles */
.mobile-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #161b22 !important;
    color: white !important;
    padding: 12px 16px !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border-bottom: 2px solid #58a6ff !important;
    height: 60px !important;
    min-height: 60px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.mobile-header .title-section {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.mobile-header .earth-animation {
    font-size: 20px !important;
    animation: earthRotate 4s linear infinite !important;
}

@keyframes earthRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mobile-header .icons-section {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.mobile-header .icon-btn {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 4px !important;
    transition: background-color 0.2s !important;
}

.mobile-header .icon-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.mobile-bottom-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #0d1117 !important;
    padding: 12px 16px !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    border-top: 1px solid #21262d !important;
    height: 60px !important;
}

.mobile-bottom-container .search-input {
    flex: 1 !important;
    background: #21262d !important;
    border: 1px solid #30363d !important;
    color: white !important;
    padding: 8px 12px 8px 35px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 12px center !important;
    background-size: 16px 16px !important;
}

.mobile-bottom-container .search-input:focus {
    outline: none !important;
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1) !important;
}

.mobile-content {
    margin-top: 0px !important;
    margin-bottom: 60px !important;
    height: calc(100vh - 120px) !important;
    overflow: hidden !important;
}

.mobile-modal .modal-content {
    background: #0d1117 !important;
    color: white !important;
    border: 1px solid #21262d !important;
}

.mobile-modal .modal-header {
    border-bottom: 1px solid #21262d !important;
}

.mobile-modal .modal-footer {
    border-top: 1px solid #21262d !important;
}

.mobile-modal .form-select {
    background: #21262d !important;
    border: 1px solid #30363d !important;
    color: white !important;
}

.mobile-modal .form-select:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1) !important;
}

.child-window-header i {
    margin-right: 8px;
    color: #17a2b8;
}

#return-to-main-btn {
    transition: all 0.2s ease;
}

#return-to-main-btn:hover {
    transform: translateX(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.no-data-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    color: #6c757d;
}

.no-data-message i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Todo 216: Frameless Browser Window Styles */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: var(--cursor-bg-primary);
}

.child-window-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: var(--cursor-bg-secondary) !important;
    border-bottom: 1px solid var(--cursor-border-primary) !important;
    backdrop-filter: blur(10px) !important;
    height: 60px !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
}

#network-graph {
    position: fixed !important;
    top: 60px !important; /* Header-Höhe */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: var(--cursor-bg-primary) !important;
}
