/* ===========================
   HEADER CONTROLS - INTEGRATED LAYOUT
   File: css/karyawan/header-controls.css
=========================== */

/* Main Controls Container */
.employee-page .controls-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

/* Top Row: Button + View Toggle */
.employee-page .controls-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Add Employee Button - Enhanced */
.employee-page .btn-add-employee {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.employee-page .btn-add-employee::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.employee-page .btn-add-employee:hover::before {
  width: 300px;
  height: 300px;
}

.employee-page .btn-add-employee:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.employee-page .btn-add-employee:active {
  transform: translateY(0);
}

.employee-page .btn-add-employee svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.employee-page .btn-add-employee span {
  position: relative;
  z-index: 1;
}

/* Bottom Row: Search + Filters */
.employee-page .controls-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Search Box - Enhanced */
.employee-page .search-container {
  flex: 1;
  min-width: 280px;
  max-width: 450px;
  position: relative;
}

.employee-page .search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid #e3f2fd;
  border-radius: 10px;
  font-size: 14px;
  background: #fafafa;
  transition: all 0.3s ease;
  outline: none;
  font-weight: 500;
}

.employee-page .search-input:hover {
  background: white;
  border-color: #bbdefb;
}

.employee-page .search-input:focus {
  border-color: #0066cc;
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.employee-page .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 18px;
  pointer-events: none;
  transition: color 0.3s ease;
}

.employee-page .search-input:focus + .search-icon,
.employee-page .search-container:hover .search-icon {
  color: #0066cc;
}

/* Filter Group - Enhanced */
.employee-page .filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-page .filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Filter Buttons - Enhanced */
.employee-page .filter-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.employee-page .btn-filter {
  padding: 9px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.employee-page .btn-filter::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 102, 204, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.employee-page .btn-filter:hover::before {
  left: 100%;
}

.employee-page .btn-filter:hover {
  border-color: #0066cc;
  color: #0066cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 204, 0.15);
}

.employee-page .btn-filter.active {
  border-color: #0066cc;
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  transform: translateY(-1px);
}

/* Role Filter Dropdown - Enhanced */
.employee-page .role-filter-select {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.employee-page .role-filter-select:hover {
  border-color: #0066cc;
  background-color: #fafafa;
}

.employee-page .role-filter-select:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

/* Divider between filter groups */
.employee-page .filter-divider {
  width: 1px;
  height: 24px;
  background: #e0e0e0;
  margin: 0 4px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .employee-page .search-container {
    min-width: 240px;
    max-width: 380px;
  }
}

@media (max-width: 992px) {
  .employee-page .controls-bottom-row {
    gap: 10px;
  }

  .employee-page .filter-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .employee-page .controls-wrapper {
    gap: 12px;
  }

  .employee-page .controls-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .employee-page .btn-add-employee {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .employee-page .controls-bottom-row {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .employee-page .search-container {
    max-width: 100%;
    min-width: 100%;
  }

  .employee-page .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .employee-page .filter-buttons {
    justify-content: stretch;
  }

  .employee-page .btn-filter {
    flex: 1;
    text-align: center;
  }

  .employee-page .role-filter-select {
    width: 100%;
  }

  .employee-page .filter-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .employee-page .btn-add-employee {
    padding: 12px 20px;
    font-size: 14px;
  }

  .employee-page .search-input {
    padding: 11px 14px 11px 40px;
    font-size: 13px;
  }

  .employee-page .btn-filter {
    padding: 8px 12px;
    font-size: 12px;
  }

  .employee-page .filter-label {
    font-size: 12px;
  }
}

/* Print Styles */
@media print {
  .employee-page .controls-wrapper {
    display: none !important;
  }
}

/* Loading State */
.employee-page .controls-wrapper.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Accessibility */
.employee-page .btn-add-employee:focus-visible,
.employee-page .btn-filter:focus-visible,
.employee-page .role-filter-select:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}
