/* Custom styles for the application */

/* Responsive layout */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Open Sans, sans-serif;
  background-color: #f1f1f1;
}

/* Table styles with neumorphism design */
.table-container {
  margin-top: 20px;
  overflow-x: auto;
  padding: 15px;
  border-radius: 20px;
  background-color: #f1f1f1;
  box-shadow: -8px -6px 15px #fff, 6px 8px 15px #00000026;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  background-color: transparent;
}

th, td {
  padding: 15px;
  text-align: left;
  color: #444;
  font-family: Open Sans, sans-serif;
}

th {
  font-weight: 600;
  color: #333;
  padding-bottom: 5px;
}

tr {
  transition: all 0.3s ease;
}

tbody tr {
  background-color: #f1f1f1;
  border-radius: 15px;
  box-shadow: -4px -4px 8px #ffffff80, 4px 4px 8px #00000026;
  margin-bottom: 10px;
}

tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: -6px -6px 10px #ffffff80, 6px 6px 10px #00000026;
}

tbody td:first-child {
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

tbody td:last-child {
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

/* Content section styles */
.content-section {
  margin-top: 20px;
  padding: 25px;
  background-color: #f1f1f1;
  border-radius: 20px;
  box-shadow: -8px -6px 15px #fff, 6px 8px 15px #00000026;
}

h3 {
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
  font-family: Open Sans, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
}

/* Navigation buttons */
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.button {
  min-width: 100px;
  height: auto;
  padding: 15px 20px;
  margin: 10px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.button-icon {
  width: 20px;
  height: 20px;
}

.button-label {
  margin-left: 10px;
  font-size: 16px;
}

/* Active button state */
.button.active {
  color: #000;
  box-shadow: inset -8px -7px 10px #fff, inset 7px 8px 10px #00000026;
}

/* Logout button styling */
.logout-button {
  margin-left: 15px;
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  box-shadow: -6px -6px 10px #fff, 6px 6px 10px #00000026, 0 0 0 1px rgba(255, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.logout-button:hover {
  transform: translateY(-2px);
  box-shadow: -8px -8px 12px #fff, 8px 8px 12px #00000026, 0 0 0 1px rgba(255, 0, 0, 0.2);
}

.logout-button .button-label {
  color: #e74c3c;
  font-weight: 600;
}

.logout-button .button-icon {
  filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(338deg) brightness(87%) contrast(92%);
}

/* Search field styling with neumorphism design */
.search-container {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 15px;
  background-color: #f1f1f1;
  color: #444;
  font-family: Open Sans, sans-serif;
  font-size: 16px;
  box-shadow: inset -4px -4px 8px rgba(255, 255, 255, 0.8), inset 4px 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  box-shadow: inset -2px -2px 5px rgba(255, 255, 255, 0.8), inset 2px 2px 5px rgba(0, 0, 0, 0.1);
  transform: scale(1.01);
}

.search-input::placeholder {
  color: #888;
}

/* Checkbox styling with neumorphism design */
.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.check-in-box {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 6px;
  background-color: #f1f1f1;
  box-shadow: inset -2px -2px 5px rgba(255, 255, 255, 0.7), inset 2px 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.check-in-box:checked {
  background-color: #f1f1f1;
  box-shadow: inset -2px -2px 5px rgba(255, 255, 255, 0.7), inset 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.check-in-box:checked::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 9px;
  width: 6px;
  height: 10px;
  border: solid #333;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-in-time {
  color: #444;
  font-family: Open Sans, sans-serif;
  font-weight: 500;
}

/* Form styles with neumorphism design */
.guest-form {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
  font-size: 16px;
}

.form-input {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 15px;
  background-color: #f1f1f1;
  color: #444;
  font-family: Open Sans, sans-serif;
  font-size: 16px;
  box-shadow: inset -4px -4px 8px rgba(255, 255, 255, 0.8), inset 4px 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  box-shadow: inset -2px -2px 5px rgba(255, 255, 255, 0.8), inset 2px 2px 5px rgba(0, 0, 0, 0.1);
  transform: scale(1.01);
}

.form-button {
  padding: 15px 30px;
  border: none;
  border-radius: 15px;
  background-color: #f1f1f1;
  color: #333;
  font-family: Open Sans, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: -6px -6px 10px #fff, 6px 6px 10px #00000026;
  transition: all 0.3s ease;
  outline: none;
  margin-top: 10px;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: -8px -8px 12px #fff, 8px 8px 12px #00000026;
}

.form-button:active {
  transform: translateY(0);
  box-shadow: inset -4px -4px 8px #fff, inset 4px 4px 8px #00000026;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.required-note {
  color: #666;
  font-size: 14px;
  font-style: italic;
}

/* Autocomplete styles */
.autocomplete-container {
  position: relative;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background-color: #f1f1f1;
  border-radius: 10px;
  box-shadow: -4px -4px 8px #fff, 4px 4px 8px #00000026;
  z-index: 10;
  display: none;
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  color: #444;
  transition: all 0.2s ease;
}

.suggestion-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Statistics styles */
.stats-cards {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  flex: 1;
  padding: 20px;
  border-radius: 15px;
  background-color: #f1f1f1;
  box-shadow: -6px -6px 10px #fff, 6px 6px 10px #00000026;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: -8px -8px 12px #fff, 8px 8px 12px #00000026;
}

.stat-title {
  color: #666;
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 600;
}

.stat-value {
  color: #333;
  font-size: 28px;
  font-weight: 700;
}

h4 {
  color: #333;
  margin: 30px 0 15px;
  font-family: Open Sans, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
}

/* Sortable table styles */
.sortable {
  cursor: pointer;
  position: relative;
}

.sort-icon {
  font-size: 12px;
  margin-left: 5px;
  opacity: 0.5;
}

th.sorted-asc .sort-icon:after {
  content: "↑";
}

th.sorted-desc .sort-icon:after {
  content: "↓";
}

th.sorted-asc .sort-icon, th.sorted-desc .sort-icon {
  opacity: 1;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .general-container {
    padding: 10px;
  }
  
  .content-section {
    padding: 15px;
    margin-top: 10px;
  }
  
  .button {
    padding: 12px 15px;
    margin: 5px;
  }
  
  .button-label {
    font-size: 14px;
  }
  
  /* Logout button responsive styles */
  .logout-button {
    margin-left: 10px;
  }
  
  th, td {
    padding: 10px;
    font-size: 14px;
  }
  
  .search-input {
    padding: 12px;
    font-size: 14px;
  }
  
  h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  h4 {
    font-size: 1.1rem;
    margin: 25px 0 12px;
  }
  
  /* Statistics responsive styles */
  .stats-cards {
    gap: 15px;
    margin-bottom: 25px;
  }
  
  .stat-card {
    padding: 15px;
  }
  
  .stat-title {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  /* Form responsive styles */
  .form-label {
    font-size: 14px;
  }
  
  .form-input {
    padding: 12px;
    font-size: 14px;
  }
  
  .form-button {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .table-container {
    padding: 10px;
  }
  
  th, td {
    padding: 8px;
    font-size: 13px;
  }
  
  /* Hide less important columns on very small screens */
  th:nth-child(2), td:nth-child(2) {
    display: none;
  }
  
  .button {
    padding: 10px;
    min-width: 80px;
  }
  
  .button-label {
    font-size: 13px;
    margin-left: 5px;
  }
  
  .button-icon {
    width: 16px;
    height: 16px;
  }
  
  /* Logout button responsive styles for very small screens */
  .logout-button {
    margin-top: 15px;
    border: 1px solid rgba(231, 76, 60, 0.3);
  }
  
  .check-in-box {
    width: 22px;
    height: 22px;
  }
  
  .check-in-box:checked::after {
    top: 5px;
    left: 8px;
  }
  
  /* Statistics responsive styles for very small screens */
  .stats-cards {
    flex-direction: column;
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-title {
    font-size: 13px;
    margin-bottom: 5px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  h4 {
    font-size: 1rem;
    margin: 20px 0 10px;
  }
  
  /* Form responsive styles for very small screens */
  .form-label {
    font-size: 13px;
  }
  
  .form-input {
    padding: 10px;
    font-size: 13px;
  }
  
  .form-button {
    padding: 10px 15px;
    font-size: 13px;
    width: 100%;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .required-note {
    font-size: 12px;
    margin-bottom: 5px;
  }
  
  .suggestion-item {
    padding: 8px 10px;
    font-size: 13px;
  }
}
