/* Mobile Responsiveness for All Pages */
/* This file contains responsive styles that should be applied across all pages */

/* General Mobile Responsiveness */
@media (max-width: 768px) {
  /* Header and Navigation */
  .dashboard-header {
    padding: 0.75rem 0;
  }
  
  .dashboard-header .navbar-nav {
    flex-wrap: wrap;
    margin-top: 10px;
  }
  
  .dashboard-header .navbar-nav .nav-link {
    margin: 5px 10px 5px 0;
    font-size: 0.9rem;
  }
  
  .dashboard-header .dropdown-toggle {
    font-size: 0.9rem;
  }
  
  /* Main Content */
  .dashboard-main {
    padding: 1rem 0;
  }
  
  .container-fluid {
    padding: 0 1rem;
  }
  
  /* Headers and Titles */
  .portfolio-header .d-flex,
  .section-header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .portfolio-header .btn,
  .section-header .btn {
    margin-top: 15px;
    width: 100%;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  /* Cards and Grids */
  .metrics-row,
  .portfolio-stats,
  .recommendations-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .metric-card,
  .stat-card,
  .recommendation-card,
  .property-card {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  /* Filters and Controls */
  .property-filters,
  .filters-section {
    flex-wrap: wrap;
    gap: 10px;
    padding: 1rem;
  }
  
  .property-filters .dropdown,
  .property-filters .btn,
  .filters-section .btn {
    margin-bottom: 10px;
    width: 100%;
  }
  
  /* Property Grid */
  .property-grid {
    grid-template-columns: 1fr;
  }
  
  .property-grid .col-md-4,
  .property-grid .col-sm-6 {
    margin-bottom: 20px;
  }
  
  /* Charts and Visualizations */
  .chart-card,
  .analytics-preview {
    margin-bottom: 1.5rem;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .chart-actions {
    margin-top: 10px;
    width: 100%;
  }
  
  .chart-actions .btn {
    width: 100%;
    margin-bottom: 5px;
  }
  
  /* Modals */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 1rem;
  }
  
  /* Tables */
  .table-responsive {
    margin-bottom: 1rem;
  }
  
  /* Side-by-Side View */
  .side-by-side-container {
    flex-direction: column;
  }
  
  .side-by-side-container > div {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  /* Settings Page */
  .settings-nav {
    flex-direction: column;
  }
  
  .settings-nav .nav-link {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .settings-content {
    padding: 1rem;
  }
  
  /* Analytics Page */
  .analytics-filters {
    flex-direction: column;
  }
  
  .analytics-filters > div {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  /* Auth Page */
  .auth-container {
    padding: 1rem;
  }
  
  .auth-form {
    padding: 1.5rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
  .dashboard-header .navbar-brand {
    font-size: 1.2rem;
  }
  
  .metric-value,
  .stat-card .value {
    font-size: 1.25rem;
  }
  
  .property-card .card-title {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
  .dashboard-main {
    min-height: -webkit-fill-available;
  }
}

/* Ensure proper spacing for all containers */
.dashboard-main > .container-fluid {
  padding-bottom: 2rem;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
  .btn,
  .nav-link,
  .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .form-control,
  .form-select {
    min-height: 44px;
  }
  
  /* Increase spacing between interactive elements */
  .property-card .btn,
  .recommendation-card .btn {
    margin: 5px 0;
  }
  
  /* Improve readability */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
  
  /* Ensure modals are properly centered */
  .modal {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  
  .modal-dialog {
    margin: 0.5rem;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Recommendation Containers Styling */
.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.recommendation-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommendation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.recommendation-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.recommendation-location {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.recommendation-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.recommendation-detail {
  display: flex;
  flex-direction: column;
}

.recommendation-detail .label {
  font-size: 0.8rem;
  color: #666;
}

.recommendation-detail .value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.recommendation-description {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.recommendation-actions {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.recommendation-actions .btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* Responsive adjustments for recommendation cards */
@media (min-width: 992px) {
  .recommendations-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .recommendations-grid {
    grid-template-columns: 1fr;
  }
  
  .recommendation-details {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .recommendation-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .recommendation-actions .btn {
    width: 100%;
  }
} 