/* Main Styles for KVW Herten Volunteer Portal */

:root {
  --primary-color: #ffd538;
  --text-color: #333;
  --light-text: #fff;
  --dark-text: #000;
  --border-color: #ddd;
  --error-color: #dc3545;
  --success-color: #28a745;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f8f9fa;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
header {
  background-color: #333;
  color: var(--light-text);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 60px;
}

.nav-tabs {
  display: flex;
  list-style: none;
}

.nav-tabs li {
  margin-left: 1rem;
}

.nav-tabs a {
  color: var(--light-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-tabs a:hover,
.nav-tabs a.active {
  background-color: var(--primary-color);
  color: var(--dark-text);
}

/* Main Content */
main {
  padding: 2rem 0;
}

h1, h2, h3 {
  margin-bottom: 1rem;
}

/* Position Matrix */
.positions-matrix {
  margin-top: 2rem;
}

.day-group {
  margin-bottom: 2rem;
}

.day-header {
  background-color: #333;
  color: var(--light-text);
  padding: 0.5rem 1rem;
  border-radius: 4px 4px 0 0;
}

.position-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-top: none;
  background-color: #fff;
}

.position-card:last-child {
  border-radius: 0 0 4px 4px;
}

.position-info {
  flex: 1;
}

.position-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.position-detail {
  display: flex;
  align-items: center;
}

.position-detail i {
  margin-right: 0.5rem;
}

.spots-counter {
  background-color: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-right: 1rem;
  font-weight: bold;
}

.spots-counter.full {
  background-color: var(--error-color);
  color: var(--light-text);
}

.register-btn {
  background-color: var(--primary-color);
  color: var(--dark-text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.3s;
}

.register-btn:hover {
  opacity: 0.9;
}

.register-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.form-control.error {
  border-color: var(--error-color);
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.3s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--dark-text);
  border: none;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: #6c757d;
  color: var(--light-text);
  border: none;
  margin-right: 0.5rem;
}

.btn-secondary:hover {
  opacity: 0.9;
}

/* Admin Styles */
.admin-login {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-dashboard {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.admin-tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-right: 1rem;
}

.admin-tab.active {
  border-bottom-color: var(--primary-color);
  font-weight: bold;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.export-btn {
  background-color: var(--primary-color);
  color: var(--dark-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: bold;
}

.export-btn:hover {
  opacity: 0.9;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 13px;
}

th, td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

th {
  background-color: #f8f9fa;
  font-weight: bold;
  position: relative;
  cursor: pointer;
}

th.sort-asc, th.sort-desc {
  background-color: #e9ecef;
}

th .sort-indicator {
  display: inline-block;
  margin-left: 5px;
  color: #333;
}

.action-buttons {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  white-space: nowrap;
  min-width: 70px;
}

.edit-btn, .delete-btn, .edit-volunteer-btn, .delete-volunteer-btn, .archive-volunteer-btn, .unarchive-volunteer-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.edit-btn:hover, .edit-volunteer-btn:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.delete-btn:hover, .delete-volunteer-btn:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

.archive-volunteer-btn:hover {
  background-color: rgba(108, 117, 125, 0.1);
}

.unarchive-volunteer-btn:hover {
  background-color: rgba(40, 167, 69, 0.1);
}

.edit-btn, .edit-volunteer-btn {
  color: #007bff;
}

.delete-btn, .delete-volunteer-btn {
  color: var(--error-color);
}

.archive-volunteer-btn {
  color: #6c757d;
}

.unarchive-volunteer-btn {
  color: #28a745;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  text-transform: uppercase;
}

.status-badge.active {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.archived {
  background-color: #f8d7da;
  color: #721c24;
}

/* Archived row styling */
.archived-row {
  opacity: 0.6;
  background-color: #f8f9fa;
}

.archived-row td {
  color: #6c757d;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 10;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--light-text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Responsive table styles */
@media (max-width: 1200px) {
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 0.4rem;
  }
  
  .action-buttons {
    min-width: 60px;
  }
}

@media (max-width: 992px) {
  /* Hide less important columns on medium screens */
  table th:nth-child(1), /* ID */
  table td:nth-child(1),
  table th:nth-child(5), /* Mobiel */
  table td:nth-child(5) {
    display: none;
  }
  
  table {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-tabs {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: #333;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    transition: right 0.3s ease;
    z-index: 5;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .nav-tabs.active {
    right: 0;
  }
  
  .nav-tabs li {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
  }
  
  .nav-tabs a {
    display: block;
    padding: 1rem;
    width: 100%;
  }
  
  .position-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .position-actions {
    margin-top: 1rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  
  .position-details {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .admin-tab {
    margin-bottom: 0.5rem;
  }
  
  /* Mobile table - card layout */
  table, thead, tbody, th, td, tr {
    display: block;
  }
  
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  tr {
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: #fff;
  }
  
  tr.archived-row {
    background-color: #f8f9fa;
  }
  
  td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding: 0.5rem 0.5rem 0.5rem 35%;
    text-align: left;
  }
  
  td:before {
    content: attr(data-label);
    position: absolute;
    left: 6px;
    width: 30%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
  }
  
  td:last-child {
    border-bottom: 0;
  }
  
  .action-buttons {
    justify-content: flex-start;
    padding-left: 35%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .admin-dashboard {
    padding: 1rem;
  }
  
  td {
    padding: 0.4rem 0.4rem 0.4rem 40%;
  }
  
  td:before {
    width: 35%;
  }
  
  .action-buttons {
    padding-left: 40%;
  }
}
