/* User Custom Styles */

/* Auth Pages Layout Improvements */
.auth-page main {
    min-height: calc(100vh - 120px); /* Subtract approximate header/footer height */
    display: flex;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .auth-page main {
        min-height: calc(100vh - 100px);
        align-items: flex-start;
        padding-top: 5rem; /* Increased padding to account for fixed navbar */
        padding-bottom: 1rem;
    }
}

/* Feed Title Styles */
.feed-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #222;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5em;
    transition: color 0.2s ease;
}

.feed-title:hover {
    color: #007bff;
}

/* Avatar Selection Styles */
.avatar-selection-container {
  margin-bottom: 1.5rem;
}

.avatar-selection-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #374151;
  font-size: 0.95rem;
}

.avatar-scroll-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
  -webkit-overflow-scrolling: touch;
}

.avatar-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.avatar-scroll-container::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.avatar-scroll-container::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.avatar-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.avatar-list {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  min-width: max-content;
  align-items: center;
}

.avatar-option {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 50%;
  border: 3px solid transparent;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 66px; /* Fixed width for circular border */
  height: 66px; /* Fixed height for circular border */
}

.avatar-option:hover {
  transform: scale(1.05);
  border-color: #e5e7eb;
}

.avatar-option.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.avatar-option img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.avatar-option svg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
}

.avatar-option .avatar-label {
  display: none; /* Hidden as per user request */
}

.avatar-checkmark {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.avatar-option.selected .avatar-checkmark {
  opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .avatar-option {
    width: 56px; /* Adjusted for mobile */
    height: 56px; /* Adjusted for mobile */
  }

  .avatar-option img,
  .avatar-option svg {
      width: 50px;
      height: 50px;
  }

  .avatar-list {
      gap: 0.75rem;
  }

  .avatar-checkmark {
      width: 20px;
      height: 20px;
      font-size: 10px;
  }
}

/* Admin Comments Section Styles - Only for Admin Panel */
.admin-panel .comments-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.admin-panel .comments-container {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 0.5rem;
}

.admin-panel .comments-loading {
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

.admin-panel .comments-list {
  max-height: 400px;
  overflow-y: auto;
}

.admin-panel .comment-item {
  background-color: white;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.admin-panel .comment-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-panel .comment-item:last-child {
  margin-bottom: 0;
}

.admin-panel .comment-item .btn {
  transition: all 0.2s ease;
}

.admin-panel .comment-item .btn:hover {
  transform: scale(1.05);
}

/* Status badge adjustments for admin comments */
.admin-panel .comment-item .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Responsive adjustments for admin comments */
@media (max-width: 768px) {
  .admin-panel .comments-container {
    padding: 0.75rem;
  }
  
  .admin-panel .comment-item {
    padding: 0.5rem;
  }
  
  .admin-panel .comment-item .d-flex {
    flex-direction: column;
  }
  
  .admin-panel .comment-item .ms-2 {
    margin-left: 0 !important;
    margin-top: 0.5rem;
  }
}

/* Sticky Sidebar Styles */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: 80px; /* Increased to account for header height */
        height: fit-content; /* Only as tall as content */
        max-height: calc(100vh - 100px); /* Only limit when content is very long */
        overflow-y: auto;
        z-index: 100;
    }
    
    .sticky-sidebar::-webkit-scrollbar {
        width: 4px;
    }
    
    .sticky-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .sticky-sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 2px;
    }
    
    .sticky-sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Main content area spacing is handled by Bootstrap default styles */

/* Submit Form Responsive Improvements */
.submit-form-container {
    max-width: 100%;
}

.submit-form-container .form-control {
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.submit-form-container .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.submit-form-container textarea {
    min-height: 120px;
    resize: vertical;
}

/* Submit form dropdown styling */
.submit-form-container .form-select {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.submit-form-container .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: white;
}

.submit-form-container .form-select:not([size]):not([multiple]) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Mobile-specific improvements */
@media (max-width: 767.98px) {
    .submit-form-container .card {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .submit-form-container .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-form-container textarea {
        min-height: 150px;
    }
    
    /* Ensure form fields use full width on mobile */
    .submit-form-container .w-100 {
        width: 100% !important;
    }
    
    /* Improve spacing on mobile */
    .submit-form-container .mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    .submit-form-container .mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* Auto-save notification styling */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Admin Dashboard Clickable Cards */
.clickable-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.clickable-card:hover {
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.clickable-card .card-body {
    position: relative;
}

.clickable-card .card-body::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #007bff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-card:hover .card-body::after {
    opacity: 1;
}

.clickable-card small {
    transition: color 0.3s ease;
}

.clickable-card:hover small {
    color: #007bff !important;
}

/* Admin stats cards specific styling */
.admin-panel .clickable-card .display-6 {
    transition: color 0.3s ease;
}

.clickable-card:hover .display-6 {
    color: #007bff;
}

.alert-info .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Ensure proper spacing for sticky sidebar */
@media (min-width: 992px) {
    .container .row {
        align-items: flex-start;
    }
}

/* Mobile Category Filter Styles */
.mobile-category-filter {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.category-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
}

.category-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.category-list {
    display: flex;
    gap: 8px;
    min-width: max-content;
    align-items: center;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: white;
    border-radius: 0.4rem;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 2px 0; /* Add margin to prevent border clipping */
}

.category-pill:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.category-pill.active {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navigation buttons removed - users will scroll with fingers */

/* Responsive adjustments */
@media (max-width: 576px) {
    .mobile-category-filter {
        padding: 10px;
    }
    
    .category-pill {
        padding: 6px 12px;
        font-size: 13px;
    }
}
