/* About Page CSS - Styles specific to profile/about.php and about/ pages */

/* ============================================
   Modern Form Controls
   ============================================ */
.form-control-modern,
input.form-control-modern,
select.form-control-modern,
textarea.form-control-modern {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid transparent;
  background-image: linear-gradient(rgba(20, 20, 20, 0.6), rgba(20, 20, 20, 0.6)),
    linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(157, 78, 221, 0.3));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  box-sizing: border-box;
  min-height: calc(0.95rem * 1.5 + 0.75rem * 2);
  line-height: 1.5;
}

/* Ensure all dropdown containers have the same size */
select.form-control-modern,
.language-select-toggle {
  min-height: calc(0.95rem * 1.5 + 0.75rem * 2);
  height: calc(0.95rem * 1.5 + 0.75rem * 2);
  padding: 0.75rem;
  padding-right: calc(0.75rem * 2 + 12px);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.form-control-modern:focus,
input.form-control-modern:focus,
select.form-control-modern:focus,
textarea.form-control-modern:focus {
  outline: none;
  background-image: linear-gradient(rgba(30, 30, 30, 0.8), rgba(30, 30, 30, 0.8)),
    linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(157, 78, 221, 0.5));
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2),
    0 4px 12px rgba(6, 182, 212, 0.2);
}

.form-control-modern::placeholder,
input.form-control-modern::placeholder,
textarea.form-control-modern::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* ============================================
   Modern About Page Styling (matching search.css)
   ============================================ */
/* Main content cards with modern gradient styling */
.main-content > .card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(30, 30, 30, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(6, 182, 212, 0.1) inset;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content > .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(6, 182, 212, 0.03) 0%, 
    transparent 30%,
    transparent 70%,
    rgba(157, 78, 221, 0.03) 100%);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.main-content > .card > * {
  position: relative;
  z-index: 1;
}

/* Modern sidebar cards - matching search.css */
.sidebar-left > .card,
.sidebar-right > .card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(30, 30, 30, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(157, 78, 221, 0.1) inset;
}

.sidebar-left > .card::before,
.sidebar-right > .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(157, 78, 221, 0.02) 0%, 
    transparent 50%,
    rgba(6, 182, 212, 0.02) 100%);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.sidebar-left > .card > *,
.sidebar-right > .card > * {
  position: relative;
  z-index: 1;
}

.sidebar-left .card-header,
.sidebar-right .card-header {
  position: relative;
  padding-bottom: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.sidebar-left .card-header::after,
.sidebar-right .card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(157, 78, 221, 0.3) 50%,
    transparent 100%);
}

.sidebar-left .card-header h3,
.sidebar-right .card-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern list items in sidebar - matching search.css */
.sidebar-left .list-item,
.sidebar-right .list-item {
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: var(--spacing-xs);
}

.sidebar-left .list-item:hover,
.sidebar-right .list-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.sidebar-left .list-item-title,
.sidebar-right .list-item-title {
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.sidebar-left .list-item:hover .list-item-title,
.sidebar-right .list-item:hover .list-item-title {
  color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern headings in main content */
.legal-page h1,
.about-card h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-md);
}

.legal-page h2,
.about-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.legal-page h2::after,
.about-card h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(6, 182, 212, 0.3) 25%,
    rgba(157, 78, 221, 0.3) 75%,
    transparent 100%);
}

.legal-page h3,
.about-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

/* Modern subcards (about-subcard) */
.about-subcard {
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

.about-subcard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(6, 182, 212, 0.4) 50%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.about-subcard:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.2);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(6, 182, 212, 0.1);
}

.about-subcard:hover::before {
  opacity: 1;
}

.about-subcard-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.01em;
}

.about-subcard-text {
  color: var(--color-text-light);
  line-height: 1.7;
}

/* Modern hero subsection styling */
.hero-subsection {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

.hero-subsection-text {
  line-height: 1.7;
  color: var(--color-text-light);
}

/* Modern about title */
.about-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-md);
}

.about-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

/* Text muted styling */
.text-muted {
  color: var(--color-text-muted);
}

/* Modern paragraph styling */
.legal-page p,
.about-card p {
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
}

.legal-page ul,
.about-card ul {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.legal-page li,
.about-card li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
  color: var(--color-text-light);
}

.legal-page li:last-child,
.about-card li:last-child {
  margin-bottom: 0;
}

/* ============================================
   About Page Layout
   ============================================ */
.about-page-layout {
  display: flex !important;
  flex-direction: row !important;
  gap: var(--spacing-md); /* Reduced gap between cards */
  align-items: flex-start;
  margin: 0 auto; /* Center the layout */
  max-width: calc(52rem + 280px + var(--spacing-md)); /* Main card + sidebar + gap */
  width: 100%;
}

.about-page-layout > .card {
  flex: 1;
  min-width: 0;
}

.about-page-layout > .sticky-sidebar {
  flex: 0 0 280px !important;
  width: 280px !important;
  flex-shrink: 0 !important;
}

/* Card in about page layout should fit grid column - make it smaller than default */
/* More specific selector to override .max-w-4xl and .mx-auto */
.about-page-layout > .card.max-w-4xl.mx-auto {
  max-width: 52rem; /* Increased by ~4% from 50rem */
  margin-left: 0; /* Override .mx-auto */
  margin-right: 0; /* Override .mx-auto */
  min-width: 0;
  width: 100%; /* Take full width of grid column */
  box-sizing: border-box;
}

/* Limit content width inside the main card - prevent overflow */
.about-page-layout > .card.max-w-4xl.mx-auto {
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.about-page-layout > .card.max-w-4xl.mx-auto .profile-tabs-content,
.about-page-layout > .card.max-w-4xl.mx-auto .tab-content-inner,
.about-page-layout > .card.max-w-4xl.mx-auto .vstack,
.about-page-layout > .card.max-w-4xl.mx-auto .grid-2,
.about-page-layout > .card.max-w-4xl.mx-auto .grid-3 {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Allow shrinking */
}

/* ============================================
   About Page Title
   ============================================ */
.about-page-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
}

.about-page-title-text {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
}

.about-page-title-divider {
  height: 2px;
  background: rgba(6, 182, 212, 0.3);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   Avatar Upload Section
   ============================================ */
.avatar-upload-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.avatar-preview {
  flex-shrink: 0;
  position: relative;
  width: 280px;
  height: 280px;
  overflow: hidden;
}

.avatar-preview-img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.avatar-preview-drag {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: none;
  border: 3px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
  z-index: 1;
  cursor: grab;
}

.avatar-preview-drag.dragging {
  cursor: grabbing;
}

.avatar-form {
  flex: 1;
}

.avatar-rules-mobile {
  display: none;
}

.avatar-nsfw-mobile {
  display: none;
}

/* ============================================
   Profile Header Actions
   ============================================ */
.profile-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: var(--spacing-md);
  position: relative;
}

.profile-header-actions::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(6, 182, 212, 0.3) 25%,
    rgba(157, 78, 221, 0.3) 75%,
    transparent 100%);
}

.profile-help-text {
  flex: 1;
  text-align: center;
}

.profile-help-text small {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* Profile back button - ghost button style */
.profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0 var(--spacing-lg);
  height: 38px;
  box-sizing: border-box;
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-sm);
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.profile-back-link .back-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
  color: inherit;
}

.profile-back-link:hover {
  background: var(--color-primary);
  color: var(--color-white) !important;
  border-color: var(--color-primary);
  text-decoration: none !important;
}

.profile-back-link:hover .back-icon {
  transform: translateX(-2px);
  color: var(--color-white) !important;
}

/* ============================================
   Profile Completion Notice
   ============================================ */
.profile-completion-notice {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  background: linear-gradient(135deg, 
    rgba(6, 182, 212, 0.08) 0%, 
    rgba(157, 78, 221, 0.05) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
}

.profile-completion-notice::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(6, 182, 212, 0.5) 0%,
    rgba(157, 78, 221, 0.5) 100%);
}

.profile-completion-notice-content {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.completion-notice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.completion-notice-text {
  flex: 1;
  min-width: 0;
}

.completion-notice-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.completion-notice-description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
}

.completion-notice-status {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-xs);
}

.completion-status-item {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.completion-status-item.completed {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--color-success);
}

.completion-status-item.pending {
  color: var(--color-text-muted);
}

.completion-status-item .status-icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: 600;
}

.completion-status-item.completed .status-icon {
  color: var(--color-success);
}

.completion-status-item.pending .status-icon {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.completion-status-item .status-label {
  font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .profile-completion-notice {
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }
  
  .completion-notice-icon {
    font-size: 1.25rem;
  }
  
  .completion-notice-title {
    font-size: 0.9rem;
  }
  
  .completion-notice-description {
    font-size: 0.8rem;
  }
  
  .completion-notice-status {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  .completion-status-item {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ============================================
   Profile About Card Modern
   ============================================ */
.profile-about-card-modern {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(30, 30, 30, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(6, 182, 212, 0.1) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  padding: var(--spacing-lg);
}

.profile-about-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(6, 182, 212, 0.03) 0%, 
    transparent 30%,
    transparent 70%,
    rgba(157, 78, 221, 0.03) 100%);
  pointer-events: none;
  z-index: 0;
}

.profile-about-card-modern > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   Profile Tabs
   ============================================ */
.profile-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--spacing-xs);
  padding-top: var(--spacing-xs);
  margin-bottom: calc(var(--spacing-md) * 0.96); /* ~4% less space */
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
  position: relative;
}

.profile-tabs::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(6, 182, 212, 0.3) 25%,
    rgba(157, 78, 221, 0.3) 75%,
    transparent 100%);
}

.profile-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}

.profile-tabs-nav::-webkit-scrollbar {
  display: none;
}

.profile-tab-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
  border-radius: 0;
}

.profile-tab-btn::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(6, 182, 212, 0.4) 0%,
    rgba(157, 78, 221, 0.4) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-tab-btn:hover {
  color: var(--color-text);
}

.profile-tab-btn:hover::before {
  transform: scaleX(1);
}

.profile-tab-btn.active {
  color: var(--color-primary);
  font-weight: 500;
  background: transparent;
}

.profile-tab-btn.active::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, 
    var(--color-primary) 0%,
    var(--color-accent) 100%);
}

.profile-tabs-content {
  margin-top: var(--spacing-md);
}

.profile-tab-pane {
  display: none;
  overflow: visible; /* Allow dropdowns to overflow */
}

.profile-tab-pane.active {
  display: block;
}

.profile-about-cover-section .cover-image-preview-container {
  margin-top: 1rem;
}

.profile-about-cover-section .cover-image-preview-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
}

.profile-about-cover-section .cover-image-preview-wrapper:active {
  cursor: grabbing;
}

.profile-about-cover-section .cover-image-preview {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background-color: #e5e7eb;
  background-size: cover;
  background-position-x: center;
  background-position-y: 50%;
  background-repeat: no-repeat;
}

.profile-about-cover-section .cover-image-position-indicator {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.tab-content-inner {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Questions Grid
   ============================================ */
.questions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* ============================================
   Person Sections
   ============================================ */
.person-section-header {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--spacing-md) 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
}

.person-section {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--border-radius-md);
}

.person-section + .person-section {
  margin-top: var(--spacing-sm);
}

.person-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

/* ============================================
   About Description Form (Couple)
   ============================================ */
#about_description_form_couple {
  gap: var(--spacing-md);
}

#about_description_form_couple .form-actions {
  margin-top: var(--spacing-sm);
}

/* ============================================
   Sticky Sidebar
   ============================================ */
.sticky-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  position: sticky;
  top: 100px;
  width: 280px;
  align-self: start;
  height: fit-content;
  min-width: 0;
  max-width: 280px;
}

/* ============================================
   Profile Completion Sticky
   ============================================ */
.profile-completion-sticky {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(30, 30, 30, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(157, 78, 221, 0.1) inset;
  border-radius: 12px;
  padding: var(--spacing-lg);
  overflow: hidden;
}

.profile-completion-sticky::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(157, 78, 221, 0.02) 0%, 
    transparent 50%,
    rgba(6, 182, 212, 0.02) 100%);
  pointer-events: none;
  z-index: 0;
}

.profile-completion-sticky > * {
  position: relative;
  z-index: 1;
}

.completion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.completion-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(6, 182, 212, 0.3) 25%,
    rgba(157, 78, 221, 0.3) 75%,
    transparent 100%);
}

.completion-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.completion-header small {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.completion-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.completion-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.completion-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.completion-checklist li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.completion-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-xs);
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.completion-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: bold;
  flex-shrink: 0;
}

.completion-check.completed {
  color: var(--color-primary);
}

.completion-check.incomplete {
  color: var(--color-text-muted);
}

/* ============================================
   Profile Completion Mobile
   ============================================ */
.profile-completion-mobile {
  display: none;
}

/* ============================================
   Mobile Responsive Adjustments
   ============================================ */
@media (max-width: 1024px) {
  .about-page-layout {
    flex-direction: column;
  }
  
  /* Hide entire sticky sidebar on mobile */
  .sticky-sidebar {
    display: none;
  }
  
  /* Compact mobile progress bar - fixed at top */
  .profile-completion-mobile {
    display: flex;
    position: relative;
    z-index: 10; /* Lower than dropdowns (10000+) */
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
    margin: 0;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Remove margin-top from profile-header-actions on mobile when progress bar is present */
  .profile-completion-mobile + .profile-header-actions {
    margin-top: 0;
  }
  
  .profile-completion-mobile-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .profile-completion-mobile-bar {
    flex: 1;
    min-width: 60px;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
  }
  
  .profile-completion-mobile-progress {
    height: 100%;
    min-width: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 6px;
    transition: width 0.3s ease;
    display: block;
  }
  
  .profile-completion-mobile-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 45px;
    text-align: right;
  }
  
  .questions-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-2-5 {
    grid-template-columns: 1fr;
  }
}

/* Mobile optimizations for tabs */
@media (max-width: 768px) {
  .profile-tabs {
    border-bottom-width: 1px;
    padding-bottom: var(--spacing-sm);
  }

  /* Sidscroll-affordance: inset-skuggor (klasser sätts av profile_about.js) */
  .profile-tabs--overflow.profile-tabs--fade-right .profile-tabs-nav {
    box-shadow: inset -44px 0 36px -18px rgba(18, 18, 20, 0.92);
  }

  .profile-tabs--overflow.profile-tabs--fade-left .profile-tabs-nav {
    box-shadow: inset 44px 0 36px -18px rgba(18, 18, 20, 0.92);
  }

  .profile-tabs--overflow.profile-tabs--fade-left.profile-tabs--fade-right .profile-tabs-nav {
    box-shadow:
      inset 44px 0 36px -18px rgba(18, 18, 20, 0.92),
      inset -44px 0 36px -18px rgba(18, 18, 20, 0.92);
  }

  /* Pil ovanpå flikrad (nav har z-index:0), scrim + text-shadow så den inte försvinner i texten */
  .profile-tabs--overflow.profile-tabs--fade-right::before {
    content: '\203A';
    position: absolute;
    right: 0;
    top: calc(var(--spacing-xs) * 0.5 + 0.4rem);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 2.75rem;
    min-height: 2.35rem;
    padding-right: 5px;
    box-sizing: border-box;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    pointer-events: none;
    background: linear-gradient(
      to left,
      rgba(18, 18, 22, 0.98) 42%,
      rgba(18, 18, 22, 0.65) 72%,
      rgba(18, 18, 22, 0) 100%
    );
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.75);
  }

  .profile-tabs-nav {
    position: relative;
    z-index: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: var(--spacing-sm);
    gap: var(--spacing-xs);
    /* Lite luft mot höger så sista fliken och pil-indikatorn inte krockar */
    padding: calc(var(--spacing-xs) * 0.5) 2rem var(--spacing-xs) 0;
  }

  /* Flikrad som på desktop: understrykning, ingen chip-bakgrund */
  .profile-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.35rem;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.88rem;
    line-height: 1.25;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    box-shadow: none;
  }

  .profile-tab-btn:hover {
    color: var(--color-text);
    background: transparent;
  }

  .profile-tab-btn.active {
    color: var(--color-primary);
    font-weight: 500;
    background: transparent;
    box-shadow: none;
  }

  .profile-tab-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  @media (hover: none) and (pointer: coarse) {
    .profile-tab-btn:hover {
      color: var(--color-text-muted);
    }

    .profile-tab-btn.active:hover {
      color: var(--color-primary);
    }
  }

  .profile-tabs-content {
    margin-top: var(--spacing-md);
  }
  
  .avatar-upload-grid {
    grid-template-columns: 1fr;
    /* ~60% + ytterligare ~50% mer luft mellan avatar och uppladdning */
    gap: calc(var(--spacing-sm) * 2.4);
  }
  
  .avatar-preview {
    margin: 0 auto;
  }

  .avatar-rules-desktop {
    display: none;
  }

  .avatar-rules-mobile {
    display: block;
    /* ~50% mindre avstånd till foldout: ta bort extra margin (gap i vstack räcker) */
    margin-top: 0;
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0.03) 100%);
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }

  .avatar-rules-mobile > summary {
    list-style: none;
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-weight: 600;
    color: var(--color-text);
    user-select: none;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .avatar-rules-mobile > summary::after {
    content: "▾";
    color: var(--color-primary);
    transition: transform 0.2s ease;
    font-size: 0.85rem;
  }

  .avatar-rules-mobile > summary::-webkit-details-marker {
    display: none;
  }

  .avatar-rules-mobile[open] > summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .avatar-rules-mobile[open] > summary::after {
    transform: rotate(180deg);
  }

  .avatar-rules-mobile .rules-list {
    margin: 0;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .avatar-nsfw-mobile {
    display: flex;
    /* ~50% mer luft ovanför och under checkboxen */
    margin-top: calc(var(--spacing-xs) * 1.5);
    margin-bottom: calc(var(--spacing-xs) * 1.5);
    padding-left: 0;
  }

  .profile-tab-pane .form-actions {
    margin-top: 0;
  }
  
  .row-tight {
    flex-direction: column;
  }
}

