/* Row Inn Booking App Styles */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
}

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

/* Header Styles */
.app-header {
  background: #247BA0;
  background-image: 
    linear-gradient(135deg, transparent 0%, transparent calc(50% - 3.75rem), #87B6A7 calc(50% - 3.75rem), #87B6A7 calc(50% - 1.25rem), transparent calc(50% - 1.25rem)),
    linear-gradient(135deg, transparent 0%, transparent calc(50% - 1.25rem), #E3F09B calc(50% - 1.25rem), #E3F09B calc(50% + 1.25rem), transparent calc(50% + 1.25rem)),
    linear-gradient(135deg, transparent 0%, transparent calc(50% + 1.25rem), #F7D08A calc(50% + 1.25rem), #F7D08A calc(50% + 3.75rem), transparent calc(50% + 3.75rem)),
    linear-gradient(90deg, #247BA0 0%, #247BA0 50%, #F79F79 50%, #F79F79 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

.app-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.app-header h1 a {
  color: white;
  text-decoration: none;
}

.app-header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.app-header nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.app-header nav a:hover {
  background-color: rgba(255,255,255,0.1);
}

/* Menu button - visible on all screen sizes */
.mobile-menu-button {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}

.hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 1000;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background: #6c757d;
  color: white;
}

.mobile-menu-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.mobile-menu-link {
  padding: 1rem 1.5rem;
  color: #2c3e50;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.mobile-menu-link:hover {
  background-color: #f8f9fa;
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

/* Desktop nav - now hidden on all screen sizes (using hamburger menu instead) */
.desktop-nav {
  display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-menu-button {
    display: flex;
  }
  
  .app-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .app-header {
    background-image: 
      linear-gradient(135deg, transparent 0%, transparent calc(50% - 1.875rem), #87B6A7 calc(50% - 1.875rem), #87B6A7 calc(50% - 0.625rem), transparent calc(50% - 0.625rem)),
      linear-gradient(135deg, transparent 0%, transparent calc(50% - 0.625rem), #E3F09B calc(50% - 0.625rem), #E3F09B calc(50% + 0.625rem), transparent calc(50% + 0.625rem)),
      linear-gradient(135deg, transparent 0%, transparent calc(50% + 0.625rem), #F7D08A calc(50% + 0.625rem), #F7D08A calc(50% + 1.875rem), transparent calc(50% + 1.875rem)),
      linear-gradient(90deg, #247BA0 0%, #247BA0 50%, #F79F79 50%, #F79F79 100%);
  }
}

/* Flash Messages */
.flash {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  border-left: 4px solid;
}

.flash.notice {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.flash.alert {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

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

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Buttons */
.button, input[type="submit"] {
  background-color: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.button:hover, input[type="submit"]:hover {
  background-color: #0056b3;
}

.button-secondary {
  background-color: #6c757d;
}

.button-secondary:hover {
  background-color: #545b62;
}

.button-danger {
  background-color: #dc3545;
}

.button-danger:hover {
  background-color: #c82333;
}

/* Calendar Styles */
.calendar-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
}

.calendar-navigation h2 {
  margin: 0;
  color: #2c3e50;
  flex: 1;
  text-align: center;
}

/* Mobile: Reduce calendar navigation spacing */
@media (max-width: 768px) {
  .calendar-navigation {
    margin: 0.5rem 0;
  }
}

.nav-link {
  color: #007bff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #007bff;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: #007bff;
  color: white;
}

.nav-caret {
  padding: 0.5rem 0.75rem;
  font-size: 1.2rem;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  color: #007bff;
}

.nav-caret:hover {
  background: #007bff;
  color: white;
}

/* Mobile: Larger touch targets for navigation */
@media (max-width: 768px) {
  .nav-caret {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
  }
}

.calendar-grid {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #34495e;
  color: white;
}

.calendar-day-header {
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  border-right: 1px solid #2c3e50;
}

.calendar-day-header:last-child {
  border-right: none;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
  min-height: 100px;
  border: 1px solid #e9ecef;
  padding: 0.5rem;
  position: relative;
}

.calendar-day.other-month {
  background-color: #f8f9fa;
  color: #6c757d;
}

.date-number {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bookings-list {
  font-size: 0.8rem;
}

.booking-item {
  background-color: #e3f2fd;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 3px;
  cursor: default;
  transition: background-color 0.2s ease;
}

.booking-item.booking-editable {
  cursor: pointer;
}

.booking-item.booking-start {
  border-left: 4px solid #2196f3;
}

.booking-item.booking-end {
  border-right: 4px solid #2196f3;
}

.booking-item.booking-editable:hover {
  background-color: rgba(0, 123, 255, 0.15);
}

.booking-item.booking-user-participating {
  border: 3px solid #81c784;
}

.booking-item.booking-user-participating.booking-maybe {
  border-color: #ffb74d;
}

.occupancy-status {
  font-weight: 600;
  margin-top: 0.25rem;
  color: #495057;
}

/* Error Messages */
.error-messages {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.error-messages h3 {
  margin-top: 0;
  color: #721c24;
}

.error-messages ul {
  margin-bottom: 0;
}

/* Actions */
.actions {
  text-align: center;
  margin: 2rem 0;
}

.form-hint {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Flash Messages */
.flash-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  color: white;
  font-weight: 600;
  z-index: 3000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 1rem;
  max-width: 300px;
}

.flash-success {
  background: #28a745;
}

.flash-error {
  background: #dc3545;
}

/* Popover Styles */
.popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 0;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.popover-content {
  padding: 1.5rem;
  position: relative;
}

.popover-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.popover-close:hover {
  color: #333;
  background: #f0f0f0;
}

/* Booking dates display */
.booking-dates-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.booking-dates-inline {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.booking-dates-inline .date-day-name {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
}

.booking-dates-inline .date-day-num {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.booking-dates-inline .date-separator {
  color: #adb5bd;
  margin: 0 0.25rem;
}

.customize-dates-link {
  font-size: 0.85rem;
  color: #247BA0;
  text-decoration: none;
}

.customize-dates-link:hover {
  text-decoration: underline;
}

.date-pickers-container {
  margin-bottom: 1rem;
}

.popover h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.2rem;
}

.popover .booking-form {
  margin: 0;
}

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

.popover .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
}

.popover .form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}

.popover .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  align-items: center;
  margin-top: 1.5rem;
}

.popover .button,
.popover .button-danger,
.popover a {
  padding: 0.75rem 1.5rem;
  color: white;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  display: inline-block;
  line-height: 1.5;
  text-align: center;
}

.popover .button {
  background: #007bff;
}

.popover .button:hover {
  background: #0056b3;
}

.popover .button-danger {
  background: #dc3545;
}

.popover .button-danger:hover {
  background: #c82333;
}

.popover a {
  background: #6c757d;
}

.popover a:hover {
  background: #5a6268;
  color: white;
}

.popover-overlay {
  background: #545b62;
}

/* Overlay for popover */
.popover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* Status Toggle */
.status-toggle {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.status-toggle input[type="radio"] {
  display: none;
}

.status-option {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.status-option:hover {
  border-color: #007bff;
  transform: translateY(-2px);
}

.status-toggle input[type="radio"]:checked + .status-option {
  border-color: #007bff;
  background: #f8f9ff;
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.status-toggle input[type="radio"]:checked + .status-maybe {
  border-color: #6c757d;
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(108,117,125,0.2);
}

.status-icon {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.status-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
}

.status-toggle input[type="radio"]:checked + .status-confirmed .status-text {
  color: #007bff;
}

.status-toggle input[type="radio"]:checked + .status-maybe .status-text {
  color: #6c757d;
}

/* Mobile: Larger touch targets for booking items */
@media (max-width: 768px) {
  .booking-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}

.booking-maybe {
  background: #f8f9fa !important;
  color: #6c757d !important;
}

.booking-maybe:hover {
  background: #e9ecef !important;
}

.booking-maybe.booking-start {
  border-left: 4px solid #6c757d !important;
}

.booking-maybe.booking-end {
  border-right: 4px solid #6c757d !important;
}

.booking-current-user {
  background-color: #e3f2fd !important;
  color: #1976d2 !important;
}

.booking-current-user:hover {
  background-color: #bbdefb !important;
}

.booking-current-user.booking-start {
  border-left: 4px solid #2196f3 !important;
}

.booking-current-user.booking-end {
  border-right: 4px solid #2196f3 !important;
}

.booking-other-user {
  background-color: #f5f5f5 !important;
  color: #616161 !important;
}

.booking-other-user:hover {
  background-color: #eeeeee !important;
}

.booking-other-user.booking-start {
  border-left: 4px solid #9e9e9e !important;
}

.booking-other-user.booking-end {
  border-right: 4px solid #9e9e9e !important;
}

.booking-current-user.booking-maybe {
  background: #e3f2fd !important;
  color: #1976d2 !important;
  opacity: 0.8;
}

.booking-current-user.booking-maybe.booking-start {
  border-left: 4px solid #64b5f6 !important;
}

.booking-current-user.booking-maybe.booking-end {
  border-right: 4px solid #64b5f6 !important;
}

.booking-other-user.booking-maybe {
  background: #f5f5f5 !important;
  color: #616161 !important;
  opacity: 0.7;
}

.booking-other-user.booking-maybe.booking-start {
  border-left: 4px solid #bdbdbd !important;
}

.booking-other-user.booking-maybe.booking-end {
  border-right: 4px solid #bdbdbd !important;
}

.button-danger {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.button-danger:hover {
  background: #c82333;
  color: white;
}

/* Add Booking Button */
.add-booking {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #007bff;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  text-decoration: none;
  z-index: 10;
}

.add-booking:hover {
  opacity: 1;
  background: #0056b3;
  transform: translateY(-2px);
}

.calendar-day:hover .add-booking {
  opacity: 1;
  background: #0056b3;
  transform: translateY(-2px);
}

/* Mobile: Add booking button styling */
@media (max-width: 768px) {
  .add-booking {
    opacity: 0;
    position: static;
    display: none;
    margin-top: 0.25rem;
    padding: 0.5rem;
    font-size: 0.7rem;
    text-align: center;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
  }
  
  .calendar-day.active .add-booking {
    opacity: 1;
    display: flex;
  }
  
  /* Bottom sheet style modal for mobile */
  .popover {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .popover-content {
    padding: 1.25rem;
    padding-bottom: 2rem;
  }
  
  .popover .form-actions {
    flex-wrap: wrap;
    padding-bottom: 1rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .calendar-navigation {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .form-actions {
    flex-direction: column;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-sections {
    grid-template-columns: 1fr;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* Mobile optimizations - keep grid layout */
@media (max-width: 480px) {
  .calendar-day-header {
    padding: 0.4rem 0.1rem;
    font-size: 0.7rem;
  }

  .date-number {
    font-size: 0.8rem;
  }

  .bookings-list {
    font-size: 0.6rem;
  }

  .booking-item {
    padding: 0.2rem 0.3rem;
    margin-bottom: 0.1rem;
  }

  .occupancy-status {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .nav-caret {
    padding: 0.5rem;
    font-size: 1rem;
    min-width: 40px;
  }

  .app-header h1 {
    font-size: 1.5rem;
  }

  .app-header nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .form-group input {
    padding: 0.75rem;
  }

  .button, input[type="submit"] {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .container {
    padding: 0 5px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .calendar-navigation h2 {
    font-size: 1.1rem;
  }
}

/* Group and Participant Checkbox Styles */
.group-section {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.group-name {
  display: block;
  margin-bottom: 0.5rem;
  color: #495057;
  font-size: 0.95rem;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  cursor: pointer;
  margin: 0;
  accent-color: #007bff !important;
  border: 2px solid #dee2e6 !important;
  border-radius: 3px !important;
  flex-shrink: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: white;
  position: relative;
}

.checkbox-item input[type="checkbox"]:checked {
  background-color: #007bff;
  border-color: #007bff !important;
}

.checkbox-item input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 11px;
  font-weight: bold;
}

.checkbox-item label {
  cursor: pointer;
  margin: 0;
  font-weight: normal;
  color: #495057;
}

.checkbox-item input[type="checkbox"]:checked + label {
  color: #007bff;
  font-weight: 500;
}

/* View Toggle Bar */
.view-toggle-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0;
}

.view-toggle-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.current-date {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
}

.month-nav-arrows {
  display: flex;
  gap: 0.25rem;
}

.month-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  color: #495057;
  text-decoration: none;
  font-size: 0.9rem;
  background: white;
  transition: all 0.2s;
}

.month-nav-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.view-toggle-buttons {
  display: flex;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
}

.view-toggle-btn {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #495057;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  transition: all 0.2s;
}

.view-toggle-btn:hover {
  background: #e9ecef;
}

.view-toggle-btn.active {
  background: #dee2e6;
  color: #495057;
}

/* Weekends Agenda View */
.weekends-agenda {
  background: white;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .weekends-agenda {
    border-radius: 0;
    box-shadow: none;
    margin: 0 -5px;
  }
}

/* Month Group - contains sidebar + weekends */
.month-group {
  display: flex;
}

.month-group + .month-group {
  border-top: 1px solid #e9ecef;
}

.month-sidebar {
  width: 70px;
  min-width: 70px;
  position: relative;
}

.month-label-sticky {
  position: sticky;
  top: 0;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.month-label-sticky .month-name {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.month-label-sticky .month-year {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-top: 2px;
}

.month-weekends {
  flex: 1;
}

.weekend-row {
  display: flex;
}

.weekend-row-link {
  display: flex;
  flex: 1;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.weekend-row-link:hover {
  background-color: #f8f9fa;
}

.weekend-row-caret {
  display: none;
}

@media (max-width: 768px) {
  .weekend-row-caret {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #999;
    padding-right: 0.75rem;
    flex-shrink: 0;
  }
}

.weekend-row + .weekend-row {
  border-top: 1px solid #e9ecef;
}

.weekend-dates {
  width: 70px;
  min-width: 70px;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2c3e50;
}

.date-day-name {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #6c757d;
}

.date-day-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.date-separator {
  font-size: 0.9rem;
  color: #adb5bd;
  margin: 0.25rem 0;
}

.weekend-bookings {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  min-height: 80px;
}

.weekend-booking-item {
  background: #f5f5f5 !important;
  padding: 1rem;
  border-radius: 6px;
  cursor: default;
  transition: all 0.2s;
}

.weekend-booking-item.booking-editable {
  cursor: pointer;
}

.weekend-booking-item.booking-editable:hover {
  background: #e0e0e0 !important;
}

.weekend-booking-item.booking-maybe {
  background: #f5f5f5 !important;
}

.weekend-booking-item.booking-maybe.booking-editable:hover {
  background: #e0e0e0 !important;
}

.weekend-booking-item.booking-current-user {
  background: #f5f5f5 !important;
}

.weekend-booking-item.booking-user-participating {
  border: 3px solid #81c784;
}

.weekend-booking-item.booking-user-participating.booking-maybe {
  border-color: #ffb74d;
}

.booking-guests {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1rem;
}

.weekend-booking-item.booking-maybe .booking-guests {
  color: #6c757d;
}

.booking-date-range {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.weekend-booking-item.booking-maybe .booking-date-range {
  color: #9e9e9e;
}

.weekend-empty {
  padding: 0.5rem 0;
}

.weekend-empty .empty-text {
  color: #9e9e9e;
  font-size: 0.9rem;
  font-weight: 400;
}


/* Mobile optimizations for weekends view */
@media (max-width: 768px) {
  .view-toggle-bar {
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .current-date {
    font-size: 0.9rem;
  }
  
  .view-toggle-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .month-sidebar {
    width: 60px;
    min-width: 60px;
  }
  
  .month-label-sticky {
    padding: 0.75rem 0.25rem;
  }
  
  .month-label-sticky .month-name {
    font-size: 0.8rem;
  }
  
  .month-label-sticky .month-year {
    font-size: 0.65rem;
  }
  
  .weekend-dates {
    width: 60px;
    min-width: 60px;
  }
  
  .date-day-num {
    font-size: 1.25rem;
  }
  
  .weekend-bookings {
    padding: 0.75rem;
  }
  
  .weekend-dates {
    font-size: 0.9rem;
  }
  
  .weekend-booking-item {
    padding: 0.6rem;
  }
  
  .booking-guests {
    font-size: 0.85rem;
  }
  
  .booking-date-range {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .view-toggle-bar {
    padding: 0.5rem;
  }
  
  .view-toggle-left {
    flex: 1;
  }
  
  .current-date {
    font-size: 0.85rem;
  }
  
  .month-nav-btn {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  
  .view-toggle-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .month-sidebar {
    width: 50px;
    min-width: 50px;
  }
  
  .month-label-sticky .month-name {
    font-size: 0.7rem;
  }
  
  .month-label-sticky .month-year {
    font-size: 0.6rem;
  }
  
  .weekend-dates {
    width: 50px;
    min-width: 50px;
  }
  
  .date-day-num {
    font-size: 1.1rem;
  }
  
  .date-day-name {
    font-size: 0.65rem;
  }
}

/* Availability Toggle Styles */
.weekend-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.weekend-add-booking {
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #5a7a99;
  background: #f8f9fa;
  margin-top: 0;
  line-height: 1;
}

.weekend-add-booking:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #90caf9;
}

.availability-toggle {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #dee2e6;
}

.availability-btn {
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  min-width: 44px;
}

.availability-btn:not(:last-child) {
  border-right: 1px solid #dee2e6;
}

.availability-icon {
  display: none;
}

.availability-text {
  display: inline;
}

/* Desaturated (unselected) states */
.availability-available {
  color: #6b8f71;
  background: #f8faf8;
}

.availability-maybe {
  color: #9a8a6b;
  background: #faf9f8;
}

.availability-unavailable {
  color: #8f6b6b;
  background: #faf8f8;
}

/* Hover states */
.availability-available:hover {
  background: #e8f5e9;
  color: #4caf50;
}

.availability-maybe:hover {
  background: #fff3e0;
  color: #ff9800;
}

.availability-unavailable:hover {
  background: #ffebee;
  color: #f44336;
}

/* Selected states (less saturated) */
.availability-available.selected {
  background: #81c784;
  color: white;
}

.availability-maybe.selected {
  background: #ffb74d;
  color: white;
}

.availability-unavailable.selected {
  background: #e57373;
  color: white;
}

/* Mobile optimizations for availability toggle */
@media (max-width: 768px) {
  .weekend-actions {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .availability-toggle {
    width: auto;
  }
  
  .availability-btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
  }
  
  .availability-icon {
    display: inline;
  }
  
  .availability-text {
    display: none;
  }
  
  .weekend-add-booking {
    padding: 0.4rem 0.5rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .availability-btn {
    padding: 0.4rem 0.3rem;
    font-size: 0.65rem;
  }
}

/* Find a Weekend - Floating Action Button */
.find-weekend-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #247BA0;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 100;
}

.find-weekend-fab:hover {
  background: #1a5a7a;
  transform: scale(1.05);
}

.find-weekend-fab svg {
  width: 28px;
  height: 28px;
}

.find-weekend-fab-clear {
  background: #6c757d;
  text-decoration: none;
}

.find-weekend-fab-clear:hover {
  background: #5a6268;
}

.find-weekend-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e57373;
  color: white;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Find a Weekend Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

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

.modal-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.modal-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
}

.modal-content .form-group {
  margin-bottom: 0.75rem;
}

.group-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.9rem;
}

.group-search-input:focus {
  outline: none;
  border-color: #247BA0;
  box-shadow: 0 0 0 2px rgba(36, 123, 160, 0.2);
}

.modal-content .checkbox-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem;
}

.modal-content .checkbox-item {
  padding: 0.5rem;
  border-radius: 4px;
}

.modal-content .checkbox-item:hover {
  background: #f8f9fa;
}

/* Donut Chart */
.availability-donut {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.availability-donut:hover {
  transform: scale(1.1);
}

.donut-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-segment {
  transition: stroke-dasharray 0.3s ease;
}

/* Donut Popover */
.donut-popover {
  min-width: 180px;
  max-width: 250px;
  width: auto;
  height: auto;
  max-height: none;
  overflow-y: visible;
  z-index: 1001;
}

.donut-popover .popover-content {
  padding: 0.75rem;
}

.donut-popover-section {
  margin-bottom: 0.75rem;
}

.donut-popover-section:last-child {
  margin-bottom: 0;
}

.donut-popover-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.donut-popover-green .donut-popover-label {
  color: #4caf50;
}

.donut-popover-orange .donut-popover-label {
  color: #ff9800;
}

.donut-popover-red .donut-popover-label {
  color: #f44336;
}

.donut-popover-gray .donut-popover-label {
  color: #9e9e9e;
}

.donut-popover-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.donut-popover-list li {
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: #333;
}

/* Mobile adjustments for FAB */
@media (max-width: 768px) {
  .find-weekend-fab {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  
  .find-weekend-fab svg {
    width: 24px;
    height: 24px;
  }
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #247BA0;
  color: white;
  padding: 12px 16px;
  padding-top: 32px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  width: 100%;
}

.pwa-install-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-text strong {
  font-size: 14px;
}

.pwa-install-text span {
  font-size: 12px;
  opacity: 0.9;
}

.pwa-install-btn {
  background: white;
  color: #247BA0;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.pwa-install-btn:hover {
  background: #f0f0f0;
}

.pwa-install-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
}

.pwa-install-close:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .pwa-install-content {
    flex-wrap: wrap;
  }
  
  .pwa-install-text {
    flex-basis: calc(100% - 80px);
  }
  
  .pwa-install-btn {
    flex-basis: 100%;
    margin-top: 8px;
  }
}

/* PWA Steps Modal */
.pwa-steps-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
}

.pwa-steps-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.pwa-steps-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}

.pwa-steps-content h2 {
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  color: #333;
  text-align: center;
}

.pwa-steps-intro {
  color: #666;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 20px;
}

.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pwa-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pwa-step-number {
  width: 28px;
  height: 28px;
  background: #247BA0;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.pwa-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-step-text strong {
  color: #333;
  font-size: 0.95rem;
}

.pwa-step-text span {
  color: #888;
  font-size: 0.85rem;
}

.pwa-icon-highlight {
  display: inline-block;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.pwa-steps-done-btn {
  width: 100%;
  background: #247BA0;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

.pwa-steps-done-btn:hover {
  background: #1d6a8a;
}

.pwa-steps-btn {
  background: white;
  color: #247BA0;
}
