/**
 * Golcam Header Single Page CSS
 * Reusable header component with search and filter functionality
 * Last update: June 4, 2025
 */

:root {
  --header-primary: #2c539e;
  --header-primary-dark: #10357d;
  --header-accent: #3d89db;
  --header-text: #333333;
  --header-text-light: #777777;
  --header-white: #ffffff;
  --header-light-bg: #f7f9fc;
  --header-border: #e8eef7;
  --header-red: #e53935;
  --header-gradient: linear-gradient(135deg, #2c539e, #3d89db);
  --header-info-bg: #e8f4fd;
  --header-info-border: #bdddf4;
  
  /* Transitions */
  --header-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Header container */
.header-singlepage {
  background-color: var(--header-light-bg);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

/* Background decoration */
.header-singlepage::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  background: var(--header-gradient);
  opacity: 0.05;
  border-radius: 50%;
  transform: translate(30%, -30%);
  z-index: 1;
}

.header-singlepage::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 120px;
  height: 120px;
  background: var(--header-gradient);
  opacity: 0.05;
  border-radius: 50%;
  transform: translate(-30%, 30%);
  z-index: 1;
}

/* Header title */
.header-singlepage-title {
  position: relative;
  color: var(--header-primary);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  z-index: 2;
  display: flex;
  align-items: center;
}

.header-singlepage-title img {
  margin-right: 12px;
  width: 32px;
  height: 32px;
}

/* Search and filters container */
.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

/* Search input */
.header-search {
  flex: 1;
  min-width: 250px;
  position: relative;
  margin-bottom: 0px;
}

.header-search input {
  width: 100%;
  padding: 12px 15px 12px 42px;
  border: 1px solid var(--header-border);
  border-radius: 50px;
  font-size: 15px;
  transition: var(--header-transition);
  background-color: var(--header-white);
  line-height: 30px;
}

.header-search input:focus {
  outline: none;
  border-color: var(--header-accent);
  box-shadow: 0 0 0 3px rgba(61, 137, 219, 0.2);
}

.header-search::before {
  content: '🔍';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--header-text-light);
  z-index: 3;
}

.header-search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--header-primary);
  color: var(--header-white);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  transition: var(--header-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-submit:hover {
  background-color: var(--header-primary-dark);
}

/* Reset button */
.header-reset {
  background-color: var(--header-red);
  color: var(--header-white);
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--header-transition);
  display: flex;
  align-items: center;
}

.header-reset:hover {
  background-color: #c62828;
  transform: translateY(-2px);
}

.header-reset::before {
  content: '↻';
  margin-right: 8px;
  font-size: 16px;
}

/* Filter rows */
.header-filters {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

/* Filter groups */
.header-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-right: 20px;

}

.header-filter-group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--header-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  display: block;
  width: 100%;
  position: relative;
  transition: var(--header-transition);
  border-left: 3px solid var(--header-accent);
  padding-left: 10px;
  margin-top: 17px;
}

.header-filter-group-label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--header-gradient);
  border-radius: 2px;
}

.header-filter-group-label:hover {
  transform: translateX(2px);
}

/* Filter chips */
.header-filter {
  padding: 8px 15px;
  background-color: var(--header-white);
  border-radius: 10px;
  color: var(--header-text);
  font-weight: 600;
  text-decoration: none;
  transition: var(--header-transition);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 13px;
  border: 1px solid var(--header-border);
}

.header-filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: var(--header-primary);
  border-color: var(--header-accent);
}

.header-filter.active {
  background-color: var(--header-primary);
  color: var(--header-white);
  box-shadow: 0 4px 10px rgba(44, 83, 158, 0.3);
  border-color: var(--header-primary);
}

.header-filter img {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

/* Category count styles for header filters */
.header-filter {
  flex-direction: column;
  align-items: center;
  padding-bottom: 6px;
}

.header-filter:hover .gc-compact-category-count {
  color: #edff00 !important;
  font-weight: 600;
}

.header-filter.active .gc-compact-category-count {
  color: rgba(255, 0, 0, 0.85);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-singlepage {
    padding: 20px 15px;
    margin-right: 10px;
    margin-left: 10px;
    border: 2px solid #e6e2e2;
  }
  
  .header-singlepage-title {
    font-size: 24px;
  }
  
  .header-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .header-search {
    width: 100%;
  }
  
  .header-reset {
    align-self: flex-start;
  }
  
  .header-filter-group {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-singlepage-title {
    font-size: 20px;
  }
  
  .header-singlepage-title img {
    width: 24px;
    height: 24px;
  }
  
  .header-filter {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .header-search input {
    padding: 10px 15px 10px 38px;
  }
}

/* Active Filters Info */
.active-filters-info {
  background-color: var(--header-info-bg);
  border: 1px solid var(--header-info-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 20px 0;
  font-size: 14px;
  color: var(--header-primary-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-result-info,
.role-filter-info {
  display: flex;
  align-items: center;
  background-color: var(--header-white);
  border-radius: 50px;
  padding: 5px 12px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-result-info::before {
  content: '🔍';
  margin-right: 6px;
}

.role-filter-info::before {
  content: '👤';
  margin-right: 6px;
}

@media (max-width: 768px) {
  .active-filters-info {
    flex-direction: column;
    gap: 8px;
  }
  
  .search-result-info,
  .role-filter-info {
    width: 100%;
  }
}
