/* Tent Index Styles */
.tent-index-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,255,0.1);
    margin-bottom: 2rem;
  }
  
  /* Back Navigation Button */
  .back-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.25s ease;
    min-height: 48px; /* Minimum height for comfortable touch target */
  }
  
  .back-nav-button i {
    font-size: 1.25rem;
    transition: transform 0.25s ease;
  }
  
  .back-nav-button:hover {
    background-color: rgba(139, 195, 74, 0.2);
    color: var(--accent-color);
    transform: translateX(-5px);
  }
  
  .back-nav-button:hover i {
    transform: translateX(-3px);
  }
  
  .tent-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .tent-card:hover {
    transform: translateY(-5px);
  }
  
  .tent-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
    color: var(--accent-color);
    background: rgba(139, 195, 74, 0.1);
    border-radius: 50%;
    margin-bottom: 1.5rem;
  }
  
  .tent-search-wrapper {
    position: relative;
  }
  
  .search-spinner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-color);
  }
  
  .tent-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tent-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .tent-list-item:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(5px);
  }
  
  .tent-list-name {
    display: flex;
    align-items: center;
  }
  
  .tent-list-arrow {
    color: var(--accent-color);
    transition: transform 0.2s ease;
  }
  
  .tent-list-item:hover .tent-list-arrow {
    transform: translateX(3px);
  }
  
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    opacity: 0.7;
  }
  
  .empty-state i {
    font-size: 2.5rem;
  }
  
  /* Form select dropdown styling - maintained */
  .form-select option {
      background-color: #2d2d2d;
      color: #e0e0e0;
  }
  
  .form-select:focus option:checked {
      background-color: var(--accent-color);
      color: #1a1a1a;
  }
  
  .form-select option:hover {
      background-color: rgba(139, 195, 74, 0.2);
  }
  
  /* Form input focus animation */
  .form-control:focus, .form-select:focus {
      border-color: var(--accent-color);
      box-shadow: 0 0 0 0.25rem rgba(139, 195, 74, 0.25);
  }
  
  /* Mobile optimizations */
  @media (max-width: 992px) {
    .tent-index-header h1 {
      font-size: 1.75rem;
    }
    
    .tactical-title {
      font-size: 1.5rem;
    }
  }
  
  /* Enhanced My Tents styles with improved responsiveness */
  .my-tents-container {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-color);
    position: relative;
  }
  
  @media (max-width: 768px) {
    .my-tents-container {
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-top: 4px solid var(--accent-color);
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      padding-top: 1.5rem;
      margin-top: 0.5rem; /* Added to ensure the border is visible */
    }
    
    /* Added to ensure the border isn't hidden by other styling */
    .tactical-container.my-tents-container {
      border-top: 4px solid var(--accent-color) !important;
    }
  }
  
  @media (max-width: 768px) {
    /* Highly specific selector to override any conflicts */
    .tactical-container.tent-card.my-tents-container,
    .tactical-container.tent-card.my-tents-container.animate {
      border-left: none !important;
      border-top: 5px solid var(--accent-color) !important; /* Increased width for visibility */
      padding-top: 1.5rem !important;
      margin-top: 0.5rem !important;
    }
    
    /* Remove any potential animations on the border */
    .my-tents-container::before {
      display: none !important;
    }
    
    /* Ensure the top border is always visible by adjusting overflow */
    .tactical-container.tent-card.my-tents-container {
      overflow: visible !important;
    }
  }
  
  .tent-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1.5rem;
  }
  
  .tent-card-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 70px;
    font-size: 2rem;
    color: var(--accent-color);
    background: rgba(139, 195, 74, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
  }
  
  .tent-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .tent-card-item {
    position: relative;
    min-height: 100px; /* Changed from fixed height to min-height */
    height: auto; /* Allow height to grow */
    max-height: 130px; /* Set a reasonable maximum height */
    border-radius: 0.75rem;
    overflow: hidden;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
  }
  
  .tent-card-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("/static/images/campfire-pattern.88a2b8d579c6.svg"), rgba(0, 0, 0, 0.3);
    background-size: 50px 50px;
    opacity: 0.2;
    transition: opacity 0.3s ease;
    z-index: 1;
  }
  
  .tent-item-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 1rem;
    width: 100%;
  }
  
  .tent-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 107, 107, 0.2);
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  
  .tent-item-icon i {
    color: #ff6b6b;
    font-size: 1.25rem;
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.7));
  }
  
  .tent-item-details {
    flex: 1;
    min-width: 0; /* Important for text overflow to work properly */
  }
  
  .tent-item-details h5 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .tent-item-meta {
    font-size: 0.9rem; /* Increased from 0.75rem */
    opacity: 0.8; /* Improved visibility from 0.7 */
    margin-top: 0.35rem;
  }
  
  .tent-item-meta i {
    font-size: 0.7rem;
  }
  
  .tent-item-meta span {
    font-weight: 500; /* Added for better readability */
  }
  
  .tent-item-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(139, 195, 74, 0.1);
    border-radius: 50%;
    color: var(--accent-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
  }
  
  .tent-card-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
  }
  
  .tent-card-item:hover .tent-card-item-bg {
    opacity: 0.3;
  }
  
  .tent-card-item:hover .tent-item-action {
    background: var(--accent-color);
    color: #1a1a1a;
  }
  
  .empty-state {
    text-align: center;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .tent-cards-grid {
      grid-template-columns: 1fr; /* Single column on small screens */
    }
    
    .tent-card-header {
      flex-direction: column;
      text-align: center;
      gap: 0.75rem;
      padding-bottom: 1rem;
      margin-bottom: 1rem;
    }
  
    .tent-card-icon-large {
      margin-bottom: 0.5rem;
    }
    
    .tent-item-details h5 {
      max-width: none; /* Remove fixed width constraint on mobile */
    }
  
    .tactical-container {
      padding: 1.25rem; /* Reduce padding on mobile */
    }
  }
  
  /* Extra small device adjustments */
  @media (max-width: 380px) {
    .tent-item-icon {
      width: 35px;
      height: 35px;
      margin-right: 0.75rem;
    }
  
    .tent-item-icon i {
      font-size: 1rem;
    }
  
    .tent-item-meta {
      font-size: 0.85rem;
    }
  
    .tent-item-action {
      width: 25px;
      height: 25px;
    }
  }

/* Collapsible Header Styles */
.tent-card-header.collapsible-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
  padding-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.tent-card-header.collapsible-header:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.tent-header-content {
  flex: 1;
}

.collapse-indicator {
  width: 30px;
  height: 30px;
  background: rgba(139, 195, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tent-card-header:hover .collapse-indicator {
  background: var(--accent-color);
  color: #1a1a1a;
}

.tent-card-header[aria-expanded="true"] .collapse-indicator i {
  transform: rotate(180deg);
}

/* Adjust existing tent-card-icon styling for the new layout */
.tent-card-header .tent-card-icon {
  margin-bottom: 0;
}

/* Mobile optimizations for collapsible header */
@media (max-width: 576px) {
  .tent-card-header.collapsible-header {
    flex-direction: row;
    text-align: left;
    padding: 0.75rem 0;
  }
  
  .tent-header-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem !important;
  }
  
  .tent-header-content p {
    font-size: 0.85rem;
  }
}

/* Enhanced Collapsible Header Styles */
.tent-card-header.collapsible-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
  padding: 1rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.tent-card-header.collapsible-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.tent-card-header.collapsible-header:hover {
  background-color: rgba(139, 195, 74, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tent-header-content {
  flex: 1;
}

/* Expand/collapse text indicator */
.tent-header-content p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expand-text {
  font-size: 0.8rem;
  background-color: rgba(139, 195, 74, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Enhanced collapse indicator */
.collapse-indicator {
  width: 36px;
  height: 36px;
  background: rgba(139, 195, 74, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.collapse-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(139, 195, 74, 0.2) 0%, rgba(0,0,0,0) 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tent-card-header:hover .collapse-indicator {
  background: var(--accent-color);
  color: #1a1a1a;
  transform: scale(1.1);
}

.tent-card-header:hover .collapse-indicator::after {
  opacity: 1;
}

.collapse-indicator i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.tent-card-header[aria-expanded="true"] .collapse-indicator i {
  transform: rotate(180deg);
}

/* Initial attention-grabbing effect for collapse indicators */
@keyframes pulseAttention {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 195, 74, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(139, 195, 74, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 195, 74, 0); }
}

.initial-pulse {
  animation: pulseAttention 2s infinite;
}

/* Enhanced Collapsible Header Styles - with improved mobile responsiveness */
.tent-card-header.collapsible-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
  padding: 0.75rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 0; /* Override the default margin-bottom */
}

/* Expand/collapse text indicator - with responsive behavior */
.expand-text {
  font-size: 0.8rem;
  background-color: rgba(139, 195, 74, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Responsive adjustments for collapsible sections */
@media (max-width: 576px) {
  .tent-card-header.collapsible-header {
    padding: 0.6rem;
    gap: 0.5rem;
  }
  
  .tent-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .tent-header-content h2 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem !important;
  }
  
  .tent-header-content p {
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .expand-text {
    font-size: 0.7rem;
    margin-left: 0;
    padding: 0.15rem 0.4rem;
    letter-spacing: 0.3px;
  }
  
  /* Better touchable collapse indicator */
  .collapse-indicator {
    width: 30px;
    height: 30px;
    min-width: 30px; /* Ensure it doesn't shrink */
  }
  
  .collapse-indicator i {
    font-size: 1rem;
  }
  
  /* Content padding adjustments for mobile */
  .tent-card-content {
    padding: 0.75rem 0.5rem;
  }
}

/* Extra small device optimizations */
@media (max-width: 380px) {
  .tent-card-header.collapsible-header {
    padding: 0.5rem;
  }
  
  .tent-card-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .tent-header-content h2 {
    font-size: 1rem;
  }
  
  /* Hide expanded text on very small screens, icon is enough */
  .expand-text {
    display: none;
  }
  
  /* Make collapse indicator more prominent when text is hidden */
  .collapse-indicator.initial-pulse {
    animation: pulseAttention 1.5s infinite;
  }
  
  /* Adjust content spacing */
  .tent-card-content {
    padding: 0.5rem 0.25rem;
  }
}

/* Fix for the collapsible content on mobile */
.collapse {
  width: 100%;
}

.tent-card-content {
  padding: 1rem 0.75rem;
}

/* Fix form controls on mobile */
@media (max-width: 576px) {
  .form-floating input.form-control {
    font-size: 0.95rem;
  }
  
  .form-floating label {
    font-size: 0.9rem;
  }
  
  .nav-button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* How it works section styles */
.how-it-works-container {
  background: rgba(45, 45, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-color);
  position: relative;
}

.how-to-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  height: 100%;
  transition: all 0.3s ease;
}

.how-to-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.how-to-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.how-to-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 1.75rem;
  color: var(--accent-color);
  background: rgba(139, 195, 74, 0.1);
  border-radius: 50%;
}

.how-to-title {
  margin: 0;
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.how-to-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.how-to-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--accent-color);
  color: #1a1a1a;
  border-radius: 50%;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.how-to-step p {
  margin: 0;
  color: var(--text-color);
  font-size: 1.1rem;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
  .how-to-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .how-to-title {
    font-size: 1.3rem;
  }
  
  .how-to-step {
    align-items: center;
  }
  
  .how-to-step p {
    font-size: 1rem;
  }
}

/* Enhanced How it works section with integrated buttons */
.how-to-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  height: 100%;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.how-to-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Add this for flexible spacing in the how-to cards */
.how-to-steps {
  flex: 1;
}

/* Style for the new action area */
.action-area {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

/* Add pulse animation to the action buttons to draw attention */
.action-area .nav-button {
  position: relative;
  overflow: hidden;
}

.action-area .nav-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.action-area .nav-button:hover::after {
  opacity: 1;
}

/* Make the form content match the card style */
.tent-card-content {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

/* Add a consistent box-shadow to both container types */
.my-tents-container, .how-it-works-container {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Fix border inconsistency for tactical containers */
.tactical-container {
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden; /* Prevent border doubling issues */
}

.tactical-container.my-tents-container, 
.tactical-container.how-it-works-container {
  border-left: 4px solid var(--accent-color);
}

@media (max-width: 768px) {
  .my-tents-container {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
  }
  
  .how-it-works-container {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Fix border inconsistency for tactical containers on mobile */
  .tactical-container.my-tents-container, 
  .tactical-container.how-it-works-container {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
  }
}

/* Adjustments for split How it works containers */
.how-it-works-container {
  height: 100%; /* Make sure containers take full height of their columns */
  display: flex;
  flex-direction: column;
}

/* Ensure the cards fill the containers */
.how-it-works-container .how-to-card {
  height: 100%;
  margin: 0;
}

/* Different accent colors for the two sections */
.how-it-works-container:nth-of-type(1) {
  border-left: 4px solid var(--accent-color);
}

.how-it-works-container:nth-of-type(2) {
  border-left: 4px solid #2196F3; /* Blue accent for join tent */
}

@media (max-width: 768px) {
  .how-it-works-container:nth-of-type(1) {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
  }
  
  .how-it-works-container:nth-of-type(2) {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #2196F3; /* Blue accent for join tent */
  }
}

/* Ensure consistent heights at larger screen sizes, but allow expanding on mobile */
@media (min-width: 992px) {
  .how-it-works-container {
    min-height: 550px; /* Set a minimum height for desktop */
  }
}

/* Custom modal styling for tent forms */
.tent-modal {
  background-color: rgba(45, 45, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
}

.tent-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 1.5rem;
}

.tent-modal .modal-title {
  color: var(--accent-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tent-modal .modal-body {
  padding: 1.5rem;
  /* Replace non-existent image with existing campfire pattern SVG */
  background: url("/static/images/campfire-pattern.88a2b8d579c6.svg") repeat;
  background-size: 100px; /* Smaller size than the card background for subtlety */
  background-blend-mode: overlay;
  background-color: rgba(40, 40, 40, 0.95); /* Darker background to make pattern less prominent */
  position: relative;
}

/* Add overlay to further mute the pattern */
.tent-modal .modal-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 30, 30, 0.6); /* Dark overlay to make pattern very subtle */
  pointer-events: none; /* Allow clicks to pass through to content */
}

.tent-modal .modal-body > * {
  position: relative; /* Ensure content appears above the overlay */
  z-index: 1;
}

.tent-modal .btn-close-white {
  filter: brightness(0) invert(1) opacity(0.75);
  transition: opacity 0.2s ease;
}

.tent-modal .btn-close-white:hover {
  filter: brightness(0) invert(1) opacity(1);
  transform: scale(1.1);
}

/* Create tent modal - green accent */
#createTentModal .modal-content {
  box-shadow: 0 0 25px rgba(139, 195, 74, 0.2);
}

#createTentModal .modal-header {
  border-left: 5px solid var(--accent-color);
}

/* Join tent modal - blue accent */
#joinTentModal .modal-content {
  box-shadow: 0 0 25px rgba(33, 150, 243, 0.2);
}

#joinTentModal .modal-header {
  border-left: 5px solid #2196F3;
}

#joinTentModal .modal-title {
  color: #2196F3;
}

/* Responsive modal adjustments */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.75rem;
  }
  
  .tent-modal .modal-header {
    padding: 1rem;
  }
  
  .tent-modal .modal-body {
    padding: 1.25rem;
  }
}

/* Animation for modals */
.modal.fade .modal-dialog {
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1);
  opacity: 1;
}

/* Enhanced form in modal */
.tent-modal .form-control,
.tent-modal .form-select {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.tent-modal .form-control:focus,
.tent-modal .form-select:focus {
  background-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

/* Add a nice focus state when the modal opens */
.action-area .nav-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.action-area .nav-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-area .nav-button:active {
  transform: translateY(0);
}

/* Apply different accent for join button */
.how-it-works-container:nth-of-type(2) .action-area .nav-button {
  background-color: #2196F3;
  border-color: #1976D2;
}

.how-it-works-container:nth-of-type(2) .action-area .nav-button:hover {
  background-color: #1976D2;
}

/* Enhanced form in modal - Fixed input field styling */
.tent-modal .form-control,
.tent-modal .form-select,
.tent-modal .form-floating>.form-control,
.tent-modal .form-floating>.form-control-plaintext,
.tent-modal .form-floating>.form-select {
  background-color: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

/* Ensure filled inputs maintain dark background */
.tent-modal .form-control:not(:focus),
.tent-modal .form-select:not(:focus) {
  background-color: rgba(30, 30, 30, 0.8);
  color: rgba(255, 255, 255, 0.9);
}

/* Fix label colors for better contrast */
.tent-modal .form-floating>label {
  color: rgba(255, 255, 255, 0.6);
}

/* Fix focused state styling */
.tent-modal .form-control:focus,
.tent-modal .form-select:focus {
  background-color: rgba(40, 40, 40, 0.9);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(139, 195, 74, 0.25);
  color: white;
}

/* Fix for floating label position when focused */
.tent-modal .form-floating>.form-control:focus~label,
.tent-modal .form-floating>.form-control:not(:placeholder-shown)~label,
.tent-modal .form-floating>.form-select~label {
  color: var(--accent-color);
  opacity: 1;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Enhanced styling for crispy form elements */
.tent-modal .form-group {
  margin-bottom: 1rem;
}

.tent-modal .asteriskField {
  color: var(--accent-color);
  margin-left: 0.25rem;
}

/* Style for select dropdown items */
.tent-modal .form-select option {
  background-color: #222;
  color: white;
}

/* Make placeholder text more visible */
.tent-modal .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Enhanced form in modal - Fixed input field styling with better specificity */
.tent-modal .form-control,
.tent-modal .form-select,
.tent-modal .textinput.textInput.form-control,
.tent-modal .select.form-select,
.tent-modal input[type="text"],
.tent-modal select,
.tent-modal .form-floating>.form-control,
.tent-modal .form-floating>.form-control-plaintext,
.tent-modal .form-floating>.form-select {
  background-color: rgba(30, 30, 30, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure filled inputs maintain dark background with higher specificity */
.tent-modal .form-control:not(:focus),
.tent-modal .form-select:not(:focus),
.tent-modal .textinput.textInput.form-control:not(:focus),
.tent-modal .select.form-select:not(:focus) {
  background-color: rgba(30, 30, 30, 0.8) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Override Bootstrap's autofill styling which might be causing the white background */
.tent-modal input:-webkit-autofill,
.tent-modal input:-webkit-autofill:hover,
.tent-modal input:-webkit-autofill:focus,
.tent-modal textarea:-webkit-autofill,
.tent-modal textarea:-webkit-autofill:hover,
.tent-modal textarea:-webkit-autofill:focus,
.tent-modal select:-webkit-autofill,
.tent-modal select:-webkit-autofill:hover,
.tent-modal select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px rgba(30, 30, 30, 0.8) inset !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Specific overrides for Django's crispy forms widgets */
.tent-modal #div_id_secret_question .select.form-select,
.tent-modal #div_id_secret_answer .textinput.textInput.form-control {
  background-color: rgba(30, 30, 30, 0.8) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Styling for occupant count badge */
.occupant-count {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  z-index: 3;
  background-color: var(--accent-color) !important;
  color: #1a1a1a;
}

.tent-card-item {
  position: relative; /* Ensure absolute positioning works within the card */
}

/* Ensure the background doesn't obscure our count badge */
.tent-card-item-bg {
  z-index: 1;
}

.tent-item-content {
  z-index: 2;
}

/* Corner arrow styling */
.corner-arrow {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(139, 195, 74, 0.1);
  border-radius: 50%;
  color: var(--accent-color);
  transition: all 0.3s ease;
  z-index: 3;
}

.tent-card-item:hover .corner-arrow {
  background: var(--accent-color);
  color: #1a1a1a;
  transform: translateX(3px);
}

/* Title row with occupant count styling */
.tent-item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Changed from center to flex-start to handle multi-line text */
  width: 100%;
}

.tent-item-title-row h5 {
  margin-bottom: 0;
  margin-right: 10px;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  flex: 1;
  font-size: 1rem; /* Base font size */
  line-height: 1.2;
}

/* Responsive font sizing for tent names */
@media (max-width: 1200px) {
  .tent-item-title-row h5 {
    font-size: 0.95rem;
  }
}

@media (max-width: 992px) {
  .tent-item-title-row h5 {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .tent-item-title-row h5 {
    font-size: 0.95rem; /* Slightly larger on mobile full width */
  }
}

@media (max-width: 480px) {
  .tent-item-title-row h5 {
    font-size: 0.85rem;
  }
}

.occupant-count-inline {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  background: rgba(139, 195, 74, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px; /* Add a small top margin to align better with multi-line text */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .occupant-count-inline {
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
  }
}