/**
 * ACCG QR Directory Styles
 * Design inspired by ACCG Brussels-Flemish Brabant branding
 */

/* ========== CSS Variables ========== */
:root {
  --primary-color: #1a2b4a;
  --secondary-color: #32373c;
  --accent-red: #c41e3a;
  --accent-gold: #f7c608;
  --accent-green: #006233;
  --text-dark: #1a2b4a;
  --text-light: #5a6c7d;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --border-color: #e1e4e8;
  --success-color: #006233;
  --error-color: #c41e3a;
  --shadow: 0 2px 12px rgba(26, 43, 74, 0.08);
  --shadow-hover: 0 4px 20px rgba(26, 43, 74, 0.12);
  --border-radius: 4px;
  --transition: all 0.3s ease;
}

/* ========== Reset & Base Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Language Switcher ========== */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 1000;
  background: var(--bg-white);
  padding: 4px;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.lang-btn {
  padding: 6px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
}

.lang-btn:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.lang-btn.active {
  background: var(--primary-color);
  color: white;
}

/* ========== Header ========== */
header {
  background: var(--bg-white);
  color: var(--text-dark);
  padding: 24px 0;
  box-shadow: 0 2px 4px rgba(26, 43, 74, 0.06);
  border-bottom: 3px solid var(--accent-red);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  width: 120px;
  height: auto;
  padding: 0;
  border-radius: 0;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* ========== Main Content ========== */
main {
  padding: 40px 0;
  min-height: calc(100vh - 300px);
}

/* ========== Search Section ========== */
.search-section {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.search-section h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--text-dark);
  font-weight: 700;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

#search-input {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

#search-btn {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

#search-btn:hover {
  background: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

/* ========== Search Results ========== */
.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.employee-result-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-red);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.employee-result-card:hover {
  border-left-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.employee-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.employee-summary {
  flex: 1;
}

.employee-summary h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.employee-summary .job-title {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.employee-summary .company {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.employee-summary .member-id {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
}

.searching,
.no-results,
.error {
  text-align: center;
  padding: 40px 20px;
  font-size: 1.1rem;
  color: var(--text-light);
}

.error {
  color: var(--error-color);
}

/* ========== Employee Detail ========== */
.employee-detail {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.back-btn {
  padding: 10px 20px;
  margin-bottom: 24px;
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.employee-card {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  align-items: start;
}

.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--border-radius);
}

.qr-code {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.employee-info h2 {
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.employee-info .job-title {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.employee-info .company {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: var(--border-radius);
}

.contact-item .icon {
  font-size: 1.5rem;
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  gap: 16px;
}

.btn-primary {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

/* ========== Instructions Section ========== */
.instructions {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-top: 40px;
}

.instructions h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-dark);
  font-weight: 700;
}

.instructions ol {
  padding-left: 24px;
}

.instructions li {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ========== Footer ========== */
footer {
  background: var(--primary-color);
  color: white;
  padding: 32px 0;
  margin-top: 60px;
  text-align: center;
}

footer p {
  margin-bottom: 8px;
}

footer a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
}

footer a:hover {
  color: white;
  text-decoration: underline;
}

/* ========== Loading Spinner ========== */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .language-switcher {
    top: 10px;
    right: 10px;
  }

  .search-box {
    flex-direction: column;
  }

  #search-btn {
    width: 100%;
  }

  .search-results {
    grid-template-columns: 1fr;
  }

  .employee-card {
    grid-template-columns: 1fr;
  }

  .qr-container {
    order: -1;
  }

  .search-section,
  .employee-detail,
  .instructions {
    padding: 24px;
  }
}
