@import url("../leather-seam-asset-path.css");

/* Users Search Page Styles */

.filter-container {
  width: 100%;
  margin-bottom: 20px;
}

.filter-toggle-section {
  margin-bottom: 15px;
}

.filter-toggle-btn {
  padding: 12px 20px;
  font-size: 1rem;
  font-family: var(--default-font-family, 'Shrikhand');
  border-radius: 12px;
  border: 2px solid #6b5740;
  background-color: #d4b584;
  background-image: linear-gradient(145deg, rgba(212, 181, 132, 0.5) 0%, rgba(226, 206, 178, 0.45) 50%, rgba(212, 181, 132, 0.5) 100%), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  cursor: pointer;
  color: #3d3230;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
  background-color: #e4c5a4;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35);
}

.filter-toggle-btn.active {
  background-color: #b59068;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.filters-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #744832;
  background-image: linear-gradient(145deg, rgba(118, 74, 56, 0.62) 0%, rgba(154, 108, 82, 0.52) 50%, rgba(118, 74, 56, 0.62) 100%), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  border-radius: 18px;
  border: 3px solid #523020;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(0, 0, 0, 0.15), inset 0 2px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  position: relative;
}

.filters-panel.open {
  max-height: 600px;
  padding: 15px;
  margin-bottom: 15px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.filters-panel::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(255, 200, 150, 0.18);
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
  display: none;
}

.search-container {
  flex: 1;
  margin-bottom: 15px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

#users-search {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: var(--default-font-family, 'Shrikhand');
  border-radius: 14px;
  border: 2px solid #523020;
  background-color: #dfc5aa;
  background-image: linear-gradient(135deg, rgba(226, 206, 178, 0.5) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(226, 206, 178, 0.5) 100%), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  display: block;
  margin: 0 auto;
  flex: 1;
  color: #2d2520;
}

#users-search:focus {
  outline: none;
  border-color: #3d3230;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35), 0 0 0 3px rgba(139,115,85,0.3);
}

.clear-filters-btn {
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #2d2520;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.clear-filters-btn:hover {
  color: #744832;
  transform: scale(1.1);
}

.primary-filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.filter-select {
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--default-font-family, 'Shrikhand');
  border-radius: 10px;
  border: 2px solid #6b5740;
  background-color: #d4b584;
  background-image: linear-gradient(135deg, rgba(212, 181, 132, 0.5) 0%, rgba(226, 206, 178, 0.45) 50%, rgba(212, 181, 132, 0.5) 100%), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
  color: #3d3230;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:hover {
  background-color: #e4c5a4;
  border-color: #7b6850;
}

.filter-select:focus {
  outline: none;
  border-color: #523020;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 3px rgba(82, 48, 32, 0.2);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 20px;
}

.users-section {
  margin-top: 20px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  padding: 0;
}

.users-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.users-grid.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.users-grid.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

.user-card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.user-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-color: #4CAF50;
}

.user-avatar-container {
  position: relative;
  margin-bottom: 8px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #4CAF50;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(76, 175, 80, 0.1);
  transition: all 0.3s ease;
}

.user-card:hover .user-avatar {
  transform: scale(1.1);
  border-color: #2e7d32;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(76, 175, 80, 0.2);
}

.user-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-username {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
  position: relative;
  flex-shrink: 0;
  animation: verifiedPulse 2s ease-in-out infinite;
}

.verified-badge::before {
  content: '✓';
  font-size: 12px;
  line-height: 1;
}

@keyframes verifiedPulse {

  0%,
  100% {
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
  }
}

.verified-badge:hover {
  animation: none;
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.6);
}

.user-quote {
  margin: 0;
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.user-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 0.85rem;
  color: #777;
  margin-top: 5px;
}

.user-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.presence-dot {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #eee3ca;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.presence-online {
  background: #2ecc71;
}

.presence-offline {
  background: #bdc3c7;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background-color: #d0b589; background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless); background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size); background-repeat: no-repeat, repeat; background-blend-mode: multiply, normal;
  border-radius: 20px;
  border: 2px solid #958062;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
  margin-top: 30px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h3 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 1.5rem;
}

.empty-state p {
  margin: 0;
  color: #6c757d;
  font-size: 1rem;
}

/* .error-state: global glossy panel — root style.css */

.retry-button {
  padding: 10px 20px;
  background: linear-gradient(145deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--default-font-family, 'Shrikhand');
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 4px 8px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 12px rgba(220, 38, 38, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.retry-button:active {
  transform: translateY(0);
}

/* Loading placeholder styles */
.loading-placeholder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  width: 100%;
}

.placeholder-card {
  background-color: #d0b589; background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless); background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size); background-repeat: no-repeat, repeat; background-blend-mode: multiply, normal;
  border: 2px solid #958062;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.placeholder-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.placeholder-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.placeholder-line {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.placeholder-title {
  width: 60%;
  margin: 0 auto;
}

.placeholder-quote {
  width: 80%;
  margin: 0 auto;
  height: 14px;
}

.placeholder-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 5px;
}

.placeholder-stat {
  width: 80px;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.error-state {
  text-align: center;
  padding: 60px 20px;
  background-color: #d0b589;
  background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  border-radius: 20px;
  border: 2px solid #958062;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
  margin-top: 30px;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.error-state h3 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 1.5rem;
}

.error-state p {
  margin: 0 0 20px 0;
  color: #6c757d;
  font-size: 1rem;
}

.user-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.user-skeleton-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.user-skeleton-grid.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.user-skeleton-grid.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

.user-skeleton-card {
  background-color: #d0b589;
  background-image: linear-gradient(135deg, rgba(212, 190, 156, 0.52) 0%, rgba(242, 232, 212, 0.45) 50%, rgba(212, 190, 156, 0.52) 100%), var(--leather-seamless);
  background-size: 100% 100%, var(--leather-tile-size) var(--leather-tile-size);
  background-repeat: no-repeat, repeat;
  background-blend-mode: multiply, normal;
  border: 2px solid #958062;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-title {
  width: 60%;
  height: 20px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  width: 80%;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Responsive design */
@media (max-width: 1200px) {
  .users-grid,
  .user-skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .users-grid.columns-5,
  .user-skeleton-grid.columns-5 {
    grid-template-columns: repeat(3, 1fr);
  }

  .users-grid.columns-6,
  .user-skeleton-grid.columns-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .users-grid,
  .user-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .users-grid.columns-5,
  .users-grid.columns-6,
  .user-skeleton-grid.columns-5,
  .user-skeleton-grid.columns-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-container {
    max-width: 100%;
    padding: 0 10px;
  }

  .filter-select {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .filter-toggle-btn {
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .users-grid,
  .user-skeleton-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .primary-filters-row {
    grid-template-columns: 1fr;
  }

  .user-card {
    padding: 16px;
  }

  .user-avatar {
    width: 70px;
    height: 70px;
    border-width: 3px;
  }
}