/* Main styles for Vancouver Golf Tee Times */

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

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

/* Login card styles */
.login-card {
  background-color: white;
  max-width: 400px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #555;
}

h1, h2, h3 {
  margin: 0 0 20px;
  color: #333;
  font-weight: 500;
}

.input-group {
  margin-bottom: 15px;
  text-align: left;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="time"],
input[type="tel"],
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border 0.3s;
  margin-bottom: 15px;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="time"]:focus,
input[type="tel"]:focus,
select:focus {
  border-color: #4285F4;
  outline: none;
}

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.remember-me {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}

.remember-me input[type="checkbox"] {
  margin-right: 8px;
}

.forgot-password {
  text-align: right;
  margin-bottom: 20px;
  font-size: 14px;
}

.forgot-password a {
  color: #4285F4;
  text-decoration: none;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.login-button, 
button[type="submit"],
button[type="button"] {
  background-color: #4285F4;
  color: white;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color 0.3s;
}

.login-button:hover,
button[type="submit"]:hover,
button[type="button"]:hover {
  background-color: #357ae8;
}

.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: #777;
  font-size: 14px;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ddd;
}

.separator::before {
  margin-right: 10px;
}

.separator::after {
  margin-left: 10px;
}

.google-button {
  background-color: white;
  color: #757575;
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background-color 0.3s;
}

.google-button:hover {
  background-color: #f5f5f5;
}

.google-icon {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

.signup-prompt {
  margin-top: 20px;
  font-size: 14px;
  color: #777;
}

.signup-link {
  color: #4285F4;
  text-decoration: none;
  font-weight: 500;
}

.signup-link:hover {
  text-decoration: underline;
}

/* Main content area (hidden until logged in) */
#user-features {
  background-color: white;
  border-radius: 8px;
  padding: 30px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Search form styles */
form {
  margin-bottom: 30px;
}

form h2 {
  margin-bottom: 20px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Two-column form layout styles */
.form-row {
  display: flex;
  margin-bottom: 15px;
  width: 100%;
}

.form-column {
  flex: 1;
  padding: 0 10px;
}

.form-column:first-child {
  padding-left: 0;
}

.form-column:last-child {
  padding-right: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-row.center {
  justify-content: center;
  margin-top: 20px;
}

.search-button {
  max-width: 200px;
}

.save-search-button {
  max-width: 400px;
}

form select {
  background-color: white;
  height: 45px;
}

/* Results section */
#results {
  margin-top: 20px;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.result-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.result-item p {
  margin: 5px 0;
}

.result-item strong {
  color: #4285F4;
}

/* Results count display */
.results-count {
  margin-top: -10px;
  margin-bottom: 20px;
  color: #666;
  font-style: italic;
}

/* User info area */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.user-header h2 {
  margin: 0;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.header-button {
  background-color: #4285F4;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.header-button:hover {
  background-color: #357ae8;
}

.logout-button {
  background-color: #d9e6f2;
  color: #555;
  border: 1px solid #ddd;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.logout-button:hover {
  background-color: #ffccd4;
}

/* Profile and Phone Form Styles */
.profile-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.profile-section-inner {
  margin-top: 25px;
}

.profile-button {
  background-color: #4285F4;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-button:hover {
  background-color: #357ae8;
}

.phone-validation-info {
  margin-top: 5px;
  color: #666;
}

#phone-submission-result {
  margin-top: 15px;
  padding: 10px;
}

/* Current phone display */
.no-phone {
  color: #888;
  font-style: italic;
}

.phone-number {
  font-weight: 500;
  color: #4285F4;
}

.button-row {
  margin-top: 15px;
}

/* HTMX Indicator */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
  margin-right: 8px;
}
.htmx-request .htmx-indicator {
  opacity: 1;
}
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Modal Dialog Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow: auto;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 0;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal-header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.close-modal {
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;
  margin: 0;
}

.close-modal:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

/* Time selector styles */
.time-selector {
  display: flex;
  align-items: center;
  gap: 5px;
}

.time-select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 16px;
}

select.time-select[name$="hour"],
select.time-select[name$="minute"] {
  width: 65px;
}

select.time-select[name$="ampm"] {
  width: 70px;
  margin-left: 5px;
} 

/* Admin Login UI specific styles */
body.admin-login-page {
  background-color: #FF4500; /* Light Red (Orangey-Red) */
  color: white; /* Default text color for elements on admin page */
}

body.admin-login-page .login-card {
  background-color: rgba(0, 0, 0, 0.25); /* Darken the card for white text contrast */
  box-shadow: 0 2px 10px rgba(0,0,0,0.4); /* Slightly stronger shadow for depth */
}

/* Logo on admin page */
body.admin-login-page .login-card .logo {
  background-color: rgba(255, 255, 255, 0.1); /* Light, slightly transparent background for the logo circle */
  color: white; /* Text/icon color inside the logo */
  border: 1px solid rgba(255, 255, 255, 0.5); /* Optional: subtle border for logo */
}

/* General text elements within the admin login card */
body.admin-login-page .login-card h2,
body.admin-login-page .login-card label,
body.admin-login-page .login-card .remember-me,
body.admin-login-page .login-card .forgot-password, /* For the "Forgot password?" text */
body.admin-login-page .login-card .signup-prompt { /* For "Don't have an account?" text */
  color: white;
}

/* Input fields on admin login page */
body.admin-login-page .login-card input[type="email"],
body.admin-login-page .login-card input[type="password"],
body.admin-login-page .login-card input[type="text"] {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly more opaque background for inputs */
  border: 1px solid white;
  color: white; /* Text color inside input */
}

body.admin-login-page .login-card input[type="email"]::placeholder,
body.admin-login-page .login-card input[type="password"]::placeholder,
body.admin-login-page .login-card input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.6); /* Lighter white for placeholder text */
}

body.admin-login-page .login-card input[type="email"]:focus,
body.admin-login-page .login-card input[type="password"]:focus,
body.admin-login-page .login-card input[type="text"]:focus {
  border-color: #f0f8ff; /* AliceBlue or a brighter white for focus */
  background-color: rgba(255, 255, 255, 0.25); /* Slightly more opaque on focus */
}

/* Separator line and text on admin login page */
body.admin-login-page .login-card .separator {
  color: white; /* Text in the middle of separator (e.g., "OR") */
}

body.admin-login-page .login-card .separator::before,
body.admin-login-page .login-card .separator::after {
  border-bottom: 1px solid white; /* The lines of the separator */
}

/* Links on admin login page */
body.admin-login-page .login-card .forgot-password a,
body.admin-login-page .login-card .signup-link {
  color: #e0e0e0; /* Light greyish-white for links, stands out slightly */
}

body.admin-login-page .login-card .forgot-password a:hover,
body.admin-login-page .login-card .signup-link:hover {
  color: white; /* Full white on hover */
  text-decoration: underline;
}

/* Google Button on admin page */
body.admin-login-page .login-card .google-button {
  background-color: transparent; /* Transparent background */
  color: white; /* White text for the button */
  border: 1px solid white; /* White border */
}

body.admin-login-page .login-card .google-button:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Slight white highlight on hover */
}
/* Note: The .login-button already has 'color: white;' and a blue background.
   If this blue clashes too much with the red, its background might also need
   a specific override for the admin page, e.g.:
   body.admin-login-page .login-card .login-button { background-color: rgba(0,0,0,0.3); }
   For now, only text and line colors are addressed per the request.
*/

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .login-card {
    margin: 20px auto;
    padding: 20px;
    max-width: 95%;
  }

  #user-features {
    padding: 15px;
  }

  .form-row {
    flex-direction: column;
    margin-bottom: 0; /* Columns will handle their own bottom margin */
  }

  .form-column {
    padding: 0 0 15px 0; /* Remove side padding, add bottom margin */
    width: 100%; /* Ensure column takes full width */
  }

  .form-column:last-child {
    padding-bottom: 0; /* No margin for the last column in a row */
  }
  
  /* Ensure labels and inputs in columns behave well */
  .form-column label {
    /* Label styling can remain as is or be adjusted if needed */
  }
  .form-column input,
  .form-column select {
    width: 100%; /* Make them full width of the column */
  }

  .search-button,
  .save-search-button {
    width: 100%;
    max-width: none; /* Override desktop max-width */
  }

  .user-header {
    flex-direction: column;
    align-items: flex-start; /* Align items to the start */
    gap: 15px; /* Add some space between title and button group */
  }

  .user-header h2 {
    margin-bottom: 0; /* Remove bottom margin as gap handles spacing */
  }

  .header-buttons {
    flex-direction: column; /* Stack buttons vertically */
    width: 100%; /* Make button group take full width */
    gap: 10px; /* Space between stacked buttons */
  }

  .header-buttons .header-button,
  .header-buttons .logout-button {
    width: 100%; /* Make individual buttons full width */
  }

  .modal-content {
    width: 95%; /* More responsive width */
    margin: 5% auto; /* Adjust margin for smaller screens */
    /* padding: 0; is already set, modal sections handle their padding */
  }
  
  .modal-header, .modal-body, .modal-footer {
    padding: 15px; /* Consistent padding for modal sections */
  }

  .time-selector {
    flex-wrap: wrap; /* Allow time selects to wrap */
    gap: 10px; /* Add gap for wrapped items */
  }

  .time-select {
    /* Adjust basis for better wrapping, e.g., allow 2 or 3 per line before full stacking */
    flex-basis: calc(50% - 5px); /* Example: 2 per line with 10px gap */
    min-width: 80px; /* Ensure they don't get too small, adjust as needed */
    flex-grow: 1;
  }
  
  select.time-select[name$="hour"],
  select.time-select[name$="minute"],
  select.time-select[name$="ampm"] {
    width: auto; /* Override fixed widths to allow flex sizing */
    margin-left: 0; /* Reset specific margin for ampm if any */
  }
}
