/********************************************************************************
 * Eclipse Tractus-X - Industry Core Hub Frontend
 *
 * Copyright (c) 2025 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Apache License, Version 2.0 which is available at
 * https://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the
 * License for the specific language govern in permissions and limitations
 * under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
********************************************************************************/

@use '../../config/variables' as *;

.search-header {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);

  .search-header-title {
    color: $brand-text;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
  }

  .search-header-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;

    @media (max-width: 768px) {
      flex-direction: column;
      gap: 12px;
    }

    .search-input-section {
      flex: 1;

      .search-input {
        .MuiOutlinedInput-root {
          background: rgba(255, 255, 255, 0.1);
          border-radius: 8px;
          color: $brand-text;

          .MuiOutlinedInput-notchedOutline {
            border-color: rgba(255, 255, 255, 0.3);
          }

          &:hover .MuiOutlinedInput-notchedOutline {
            border-color: rgba(255, 255, 255, 0.5);
          }

          &.Mui-focused .MuiOutlinedInput-notchedOutline {
            border-color: $brand-text;
          }
        }

        .MuiInputLabel-root {
          color: rgba(255, 255, 255, 0.7);

          &.Mui-focused {
            color: $brand-text;
          }
        }
      }

      .search-button {
        background: $header-opaque-gradient-bg;
        color: $brand-text !important;
        border-color: green;
        border-radius: 12px !important;
        margin-top: 12px;
        padding: 10px 24px;
        font-weight: 500;

        &:hover {
          background: $blue-gradient-bg;
          border-color: $brand-text !important;
        }

        &:disabled {
          opacity: 0.6;
        }
      }
    }

    .search-info-section {
      min-width: 180px;
      text-align: right;

      @media (max-width: 768px) {
        min-width: auto;
        text-align: center;
      }

      .search-results-count {
        font-weight: 500;
        color: $brand-text;
        font-size: 0.875rem;
      }

      .search-time-info {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.75rem;
        display: block;
      }
    }
  }
}
