/* General Body Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
  padding-bottom: 60px; /* Footer height */
}

/* Header Styles */
header {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 1.5rem 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 300;
}

/* Navigation Styles - Tabbed Interface */
.tabs-nav {
  display: flex;
  justify-content: center;
  background-color: #34495e;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.tab-button {
  background-color: transparent;
  border: none;
  padding: 1rem 1.5rem;
  color: #ecf0f1;
  font-size: 1.1rem;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-grow: 1;
  text-align: center;
  max-width: 300px;
  text-decoration: none; /* Ensure no underline on buttons */
}

.tab-button:hover {
  background-color: #3e5872;
}

.tab-button.active {
  background-color: #2c3e50;
  color: #ffffff;
  border-bottom: 3px solid #3498db;
}

/* Main Content Styles */
main {
  padding: 1rem;
  margin: 1rem auto;
  max-width: 1100px;
}

.tab-content {
  background-color: #fff;
  margin-bottom: 1.5rem;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: none; /* Hidden by default */
}

.tab-content.active {
  display: block; /* Shown when active */
}

.tab-content > h2 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

/* Footer Styles */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #2c3e50;
  color: #ecf0f1;
  position: fixed;
  width: 100%;
  height: 60px;
  bottom: 0;
  left: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tabs-nav {
    flex-direction: column;
  }
  .tab-button {
    max-width: 100%;
    border-bottom: 1px solid #3e5872;
  }
  .tab-button.active {
    border-bottom: 3px solid #3498db;
  }
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 2000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto; /* 10% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
  animation-name: animatetop;
  animation-duration: 0.4s
}

/* Add Animation */
@keyframes animatetop {
  from {top: -300px; opacity: 0}
  to {top: 10%; opacity: 1}
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Button for adding new customer */
#add-customer-btn {
  background-color: #28a745; /* Green */
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: background-color 0.3s ease;
}

#add-customer-btn:hover {
  background-color: #218838;
}

/* Customer Controls Layout */
.customer-controls {
  display: flex;
  gap: 10px; /* Space between search and button */
  margin-bottom: 1rem;
  align-items: center;
}

.customer-controls .search-container {
  flex-grow: 1; /* Allow search input to take available space */
}

#customer-search-input {
  width: 100%; /* Make input fill its container */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

/* Adjust button margin for new layout */
#add-customer-btn {
  margin-bottom: 0;
  flex-shrink: 0; /* Prevent button from shrinking */
}

/* Responsive adjustments for customer controls */
@media (max-width: 600px) {
  .customer-controls {
    flex-direction: column;
    align-items: stretch;
  }
  #add-customer-btn {
    width: 100%;
  }
}