/**
 * WeFind - Main stylesheet
 * Contains responsive styles and global design elements
 */

/* ---------- Global & General Styles ---------- */
:root {
  --primary-color: #4a6baf;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  --primary-light: #eef4ff;
  --primary-dark: #344c7c;
  
  --border-radius: 0.375rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition-speed: 0.3s;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Typography responsive adjustments */
@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  .display-4 {
    font-size: 2rem;
  }
  .lead {
    font-size: 1rem;
  }
}

/* ---------- Form Elements ---------- */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
}

@media (max-width: 768px) {
  .form-container {
    padding: 15px;
  }
}

.form-progress {
  margin-bottom: 30px;
}

.form-progress .step {
  width: 20%;
  text-align: center;
  position: relative;
  float: right;
}

.form-progress .step .step-circle {
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #6c757d;
  margin: 0 auto 10px;
  position: relative;
  z-index: 2;
}

.form-progress .step.active .step-circle {
  background-color: var(--primary-color);
  color: white;
}

.form-progress .step.completed .step-circle {
  background-color: var(--success-color);
  color: white;
}

.form-progress .step-line {
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 2px;
  background-color: #e9ecef;
  z-index: 1;
}

.form-progress .step:first-child .step-line {
  display: none;
}

.form-progress .step.completed .step-line,
.form-progress .step.active .step-line {
  background-color: var(--success-color);
}

@media (max-width: 768px) {
  .form-progress .step-title {
    font-size: 0.7rem;
  }
}

@media (max-width: 576px) {
  .form-progress {
    margin-bottom: 20px;
  }
  
  .form-progress .step-title {
    display: none;
  }
  
  .form-progress .step-circle {
    width: 25px;
    height: 25px;
    line-height: 25px;
    font-size: 0.8rem;
  }
  
  .form-progress .step-line {
    top: 12px;
  }
}

/* Add this new rule for .lazy-image */
.lazy-image {
  /* Existing properties for lazy-image might be here or in JS, we add background for placeholder */
  background-image: url('/images/FAB.png');
  background-size: 60%; /* Adjust as needed, or use 'contain' or 'cover' */
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #f0f0f0; /* Fallback background color */
}

/* File upload controls */
.file-upload-container {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.file-upload-container:hover {
  border-color: var(--primary-color);
}

.file-upload-container.dragover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
}

.file-preview {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 8px;
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background-color: rgba(255,255,255,0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 576px) {
  .file-upload-container {
    padding: 15px;
  }
  
  .file-preview-item {
    width: 80px;
    height: 80px;
  }
}

/* ---------- Card Styles ---------- */
.card-hover {
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

/* ---------- Responsive Navigation ---------- */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .nav-link {
    padding: 0.5rem 0;
  }
}

/* ---------- Admin Dashboard Responsiveness ---------- */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    height: 100%;
    width: 250px;
    z-index: 1030;
    background-color: white;
    overflow-y: auto;
    transition: right var(--transition-speed);
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  }
  
  .sidebar.show {
    right: 0;
  }
  
  .content-wrapper {
    margin-right: 0 !important;
  }
  
  .sidebar-toggle {
    display: block !important;
  }
}

/* ---------- Therapist Card Styles ---------- */
.therapist-card {
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  border-radius: 12px;
  overflow: hidden;
}

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

.specialty-badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  color: var(--primary-color);
  background-color: var(--primary-light);
  border-radius: 50px;
  margin-right: 5px;
  margin-bottom: 5px;
  white-space: nowrap;
}

/* ---------- Responsive Tables ---------- */
@media (max-width: 768px) {
  .responsive-table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  
  .data-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: var(--border-radius);
    padding: 1rem;
  }
  
  .data-card-label {
    font-weight: bold;
    margin-bottom: 0.25rem;
  }
  
  .data-card-value {
    margin-bottom: 0.75rem;
  }
  
  /* Hide tables on mobile and show cards instead */
  .table-to-cards {
    display: none;
  }
  
  .cards-container {
    display: block;
  }
}

@media (min-width: 769px) {
  .table-to-cards {
    display: table;
  }
  
  .cards-container {
    display: none;
  }
}

/* ---------- Loading States ---------- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Utilities ---------- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cursor-pointer {
  cursor: pointer;
}

/* Margin and padding responsive utilities */
@media (max-width: 576px) {
  .mb-sm-2 {
    margin-bottom: 0.5rem !important;
  }
  
  .mb-sm-3 {
    margin-bottom: 1rem !important;
  }
  
  .p-sm-2 {
    padding: 0.5rem !important;
  }
  
  .p-sm-3 {
    padding: 1rem !important;
  }
}

/* Add this new rule for the autocomplete suggestion containers */
.suggestions-list {
    position: relative; /* Make this the positioning context for the absolute list */
    z-index: 1050; /* Ensure it appears above other elements, adjust if needed */
}

/* Optional: Style the suggestion list items */
.suggestions-list .list-group-item {
    cursor: pointer;
    padding: 0.5rem 1rem; /* Adjust padding */
}

.suggestions-list .list-group-item:hover {
    background-color: #f8f9fa; /* Light hover effect */
}

/* Added for client gender preference overlay */
.card-img-container {
    position: relative; /* Ensure this is present if not already */
}

.client-preference-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 9px;
    border-radius: 50%;
    font-size: 1rem; /* Adjust as needed for Bootstrap Icons */
    display: none; /* Hidden by default, shown by JS */
    line-height: 1;
    z-index: 10; /* Ensure it's above the image */
}

/* Optional: Specific styles if you want different background for each */
/* .client-preference-overlay.women-only {
    background-color: rgba(231, 84, 128, 0.7); 
}

.client-preference-overlay.men-only {
    background-color: rgba(0, 123, 255, 0.7); 
}
*/ 