/* Gallery Page CSS - Styles specific to gallery create and edit pages */

/* ============================================
   Gallery Create Page
   ============================================ */
.gallery-create-page {
  max-width: 50%;
}

.gallery-create-page .card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(30, 30, 30, 0.5) 100%);
  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.1), rgba(157, 78, 221, 0.1));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  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;
}

.gallery-create-page .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%);
  pointer-events: none;
  z-index: 0;
}

.gallery-create-page .card > * {
  position: relative;
  z-index: 1;
}

.gallery-create-page .card h1 {
  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;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .gallery-create-page {
    max-width: 100%;
    width: 100%;
  }
}

/* ============================================
   Gallery Edit Page - Card Styling
   ============================================ */
.gallery-edit-page .card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(30, 30, 30, 0.5) 100%);
  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.1), rgba(157, 78, 221, 0.1));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  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;
}

.gallery-edit-page .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%);
  pointer-events: none;
  z-index: 0;
}

.gallery-edit-page .card > * {
  position: relative;
  z-index: 1;
}

.gallery-edit-page .card h2 {
  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;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============================================
   Gallery Edit Page - Header
   ============================================ */
.gallery-edit-page .header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.gallery-edit-page .header-left {
  display: flex;
  align-items: center;
}

.gallery-edit-page .header-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery-edit-page .header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.gallery-edit-page .header-center .h2 {
  margin: 0;
  font-size: 1.25rem;
}

.gallery-edit-page .header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ============================================
   Gallery Edit Page - Layout
   ============================================ */
.gallery-edit-page .p-12 {
  display: grid;
  grid-template-columns: 7fr 13fr;
  gap: 1.5rem;
  align-items: start;
}

.gallery-edit-page .gallery-thumbnails-section {
  grid-column: 1 / -1;
}

/* ============================================
   Gallery Edit Page - Album Settings & Upload Section
   ============================================ */
.gallery-edit-page .album-settings,
.gallery-edit-page .upload-section {
  border: 1px solid transparent;
  background: rgba(20, 20, 20, 0.6);
  background-image: linear-gradient(rgba(20, 20, 20, 0.6), rgba(20, 20, 20, 0.6)),
    linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(157, 78, 221, 0.1));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 8px;
  padding: 0.9rem;
  margin-bottom: 0;
  min-width: 0;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-edit-page .album-settings::before,
.gallery-edit-page .upload-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(6, 182, 212, 0.02) 0%, 
    transparent 50%,
    rgba(157, 78, 221, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
  border-radius: 8px;
}

.gallery-edit-page .album-settings:hover::before,
.gallery-edit-page .upload-section:hover::before {
  opacity: 1;
}

.gallery-edit-page .album-settings > *,
.gallery-edit-page .upload-section > * {
  position: relative;
  z-index: 1;
}

.gallery-edit-page .upload-section {
  margin-top: 0;
}

.gallery-edit-page .upload-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.gallery-edit-page .upload-section-header h3 {
  margin: 0;
}

.gallery-edit-page .album-settings h3,
.gallery-edit-page .upload-section-header h3 {
  margin-top: 0;
  margin-bottom: 0;
  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;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============================================
   Gallery Edit Page - Media Count Badge
   ============================================ */
.gallery-edit-page .media-count-badge {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  white-space: nowrap;
}

.gallery-edit-page .media-count-badge.media-count-full {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   Gallery Edit Page - Upload Form
   ============================================ */
.gallery-edit-page .upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  width: 100%;
}

.gallery-edit-page .upload-form > .file-metadata-container {
  display: flex;
  flex-direction: column;
}

.gallery-edit-page .upload-form > .file-metadata-container > .file-metadata-content {
  display: flex;
  flex-direction: column;
}

.gallery-edit-page .upload-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================
   Gallery Edit Page - File Metadata
   ============================================ */
.gallery-edit-page .file-metadata-container {
  display: none;
  width: 100%;
}

.gallery-edit-page .file-metadata-container .file-metadata-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.gallery-edit-page .file-metadata-grid-wrapper {
  display: grid !important;
  grid-template-columns: 173px 1fr !important;
  gap: 1rem;
  align-items: start;
  min-width: 0;
  width: 100%;
}

.gallery-edit-page .file-metadata-content textarea,
.gallery-edit-page .file-metadata-content #file_description,
.gallery-edit-page .file-metadata-right #file_description {
  min-height: 70px !important;
  resize: vertical;
}

.gallery-edit-page .file-metadata-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  width: 173px;
  min-width: 173px;
  max-width: 173px;
}

.gallery-edit-page .file-metadata-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.gallery-edit-page .file-metadata-fullwidth textarea {
  min-height: calc(1rem * 1.5 + var(--spacing-sm) * 2);
  height: calc(1rem * 1.5 + var(--spacing-sm) * 2);
}

/* ============================================
   Gallery Edit Page - File Metadata Preview
   ============================================ */
.gallery-edit-page .file-metadata-preview-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.gallery-edit-page .file-metadata-preview-img {
  max-width: 173px;
  max-height: 173px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
}

.gallery-edit-page .file-metadata-preview-placeholder {
  width: 173px;
  height: 173px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.5;
}

.gallery-edit-page .file-metadata-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: 2px solid white;
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-edit-page .file-metadata-remove-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gallery-edit-page .file-metadata-remove {
  width: 100%;
}

/* ============================================
   Gallery Edit Page - Community Rules
   ============================================ */
.gallery-edit-page .community-rules-reminder {
  position: relative;
  margin-bottom: 0.5rem;
}

.gallery-edit-page .community-rules-link {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: help;
  transition: color 0.2s ease;
}

.gallery-edit-page .community-rules-link:hover {
  color: var(--color-primary-light);
}

.gallery-edit-page .community-rules-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 0.5rem;
  z-index: 1000;
  min-width: 300px;
  max-width: 400px;
}

.gallery-edit-page .community-rules-tooltip .tooltip-content {
  background: rgba(26, 26, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.gallery-edit-page .community-rules-tooltip .tooltip-content h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: var(--color-primary);
}

.gallery-edit-page .community-rules-tooltip .tooltip-content ul {
  margin: 0;
  padding-left: 1.25rem;
  list-style-type: disc;
}

.gallery-edit-page .community-rules-tooltip .tooltip-content li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.4;
}

.gallery-edit-page .community-rules-tooltip .tooltip-content li:last-child {
  margin-bottom: 0;
}

/* ============================================
   Gallery Edit Page - Field Actions & Buttons
   ============================================ */
.gallery-edit-page .field-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.gallery-edit-page .btn-danger {
  background-color: #dc2626;
  color: white;
  border: 1px solid #dc2626;
}

.gallery-edit-page .btn-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

/* ============================================
   Gallery Edit Page - Help & Empty States
   ============================================ */
.gallery-edit-page .help {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.gallery-edit-page .empty {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
  font-style: italic;
}

.gallery-edit-page .nsfw-warning {
  color: #dc2626;
  font-weight: bold;
  font-size: 0.875rem;
}

/* ============================================
   Gallery Edit Page - Thumbnails Section
   ============================================ */
.gallery-edit-page .gallery-thumbnails-section {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border: 1px solid transparent;
  background: rgba(20, 20, 20, 0.6);
  background-image: linear-gradient(rgba(20, 20, 20, 0.6), rgba(20, 20, 20, 0.6)),
    linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(157, 78, 221, 0.1));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 8px;
  padding: 0.8rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.gallery-edit-page .gallery-thumbnails-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(6, 182, 212, 0.02) 0%, 
    transparent 50%,
    rgba(157, 78, 221, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
  border-radius: 8px;
}

.gallery-edit-page .gallery-thumbnails-section:hover::before {
  opacity: 1;
}

.gallery-edit-page .gallery-thumbnails-section > * {
  position: relative;
  z-index: 1;
}

.gallery-edit-page .gallery-thumbnails-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-edit-page .gallery-thumbnails-header h3 {
  margin-top: 0;
  margin-bottom: 0;
  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;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.gallery-edit-page .gallery-thumbnails-help {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  justify-self: center;
}

.gallery-edit-page .gallery-thumbnails-help-full {
  display: inline;
}

.gallery-edit-page .gallery-thumbnails-help-mobile {
  display: none;
}

.gallery-edit-page .gallery-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  width: 100%;
}

/* ============================================
   Gallery Edit Page - Thumbnail Items
   ============================================ */
.gallery-edit-page .gallery-thumbnail-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.1);
}

.gallery-edit-page .gallery-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-edit-page .gallery-thumbnail-wrapper:hover {
  transform: scale(1.05);
}

.gallery-edit-page .gallery-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-edit-page .gallery-thumbnail-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-edit-page .gallery-thumbnail-wrapper:hover .gallery-thumbnail-overlay {
  opacity: 1;
}

.gallery-edit-page .gallery-thumbnail-title {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-edit-page .gallery-thumbnail-nsfw-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 1;
}

.gallery-edit-page .gallery-thumbnail-delete-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background-color: rgba(239, 68, 68, 0.95);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  padding: 0;
}

.gallery-edit-page .gallery-thumbnail-item:hover .gallery-thumbnail-delete-btn {
  display: flex;
}

.gallery-edit-page .gallery-thumbnail-delete-btn:hover {
  background-color: rgba(220, 38, 38, 1);
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.gallery-edit-page .gallery-thumbnail-delete-btn:active {
  transform: scale(0.95);
}

/* Adjust NSFW badge position when delete button is visible */
.gallery-edit-page .gallery-thumbnail-item:hover .gallery-thumbnail-nsfw-badge {
  right: 2.5rem; /* Move left to make room for delete button */
}

/* ============================================
   Gallery Edit Page - Mobile Styles
   ============================================ */
@media (max-width: 768px) {
  .gallery-edit-page .header-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-edit-page .header-center {
    order: -1;
  }
  
  .gallery-edit-page .header-left,
  .gallery-edit-page .header-right {
    justify-content: center;
  }
  
  .gallery-edit-page .header-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .gallery-edit-page .header-buttons .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .gallery-edit-page .p-12 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .gallery-edit-page .album-settings,
  .gallery-edit-page .upload-section {
    margin-bottom: 1.5rem;
  }
  
  .gallery-edit-page .upload-section {
    margin-top: 0;
  }
  
  /* Hide full help text, show mobile version */
  .gallery-edit-page .gallery-thumbnails-help-full {
    display: none;
  }
  
  .gallery-edit-page .gallery-thumbnails-help-mobile {
    display: inline;
    font-size: 0.75rem;
  }
  
  .gallery-edit-page .upload-fields {
    grid-template-columns: 1fr;
  }

  .gallery-edit-page .file-metadata-grid-wrapper {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .gallery-edit-page .file-metadata-left {
    align-items: center;
  }

  .gallery-edit-page .file-metadata-preview-wrapper {
    justify-content: center;
  }

  .gallery-edit-page .community-rules-tooltip {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 280px;
    max-width: 90vw;
  }

  .gallery-edit-page .gallery-thumbnails-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
  }
}

/* ============================================
   Gallery Edit Page - Access Management
   ============================================ */
.gallery-edit-page .access-management-section {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-edit-page .access-management-section h4 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.gallery-edit-page .access-management-section h5 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.gallery-edit-page .approved-users-section,
.gallery-edit-page .pending-requests-section {
  margin-top: 0.9rem;
}

.gallery-edit-page .approved-users-list,
.gallery-edit-page .pending-requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gallery-edit-page .approved-user-item,
.gallery-edit-page .pending-request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 0.35rem;
  transition: background 0.2s;
}

.gallery-edit-page .approved-user-item:hover,
.gallery-edit-page .pending-request-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.gallery-edit-page .access-action-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  transition: color 0.2s;
}

.gallery-edit-page .access-action-btn:hover {
  color: #ef4444;
}

.gallery-edit-page .access-action-btn.approve:hover {
  color: #22c55e;
}

.gallery-edit-page .pending-actions {
  display: flex;
  gap: 0.5rem;
}

.gallery-edit-page #user-search-results {
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.gallery-edit-page .user-search-result {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-edit-page .user-search-result:last-child {
  border-bottom: none;
}

.gallery-edit-page .user-search-result:hover {
  background: rgba(255, 255, 255, 0.08);
}

.gallery-edit-page .album-settings .btn[type="submit"] {
  margin-top: 0.5rem;
}

/* ============================================
   Gallery hub (Discover / home-feed aligned)
   ============================================ */
/* Tomt hub-kort (inte huvudredigeringskortet) */
.gallery-edit-page.gallery-edit-page--hub .card:not(.gallery-edit-unified-album-card),
.gallery-edit-page.gallery-edit-page--hub .card:not(.gallery-edit-unified-album-card)::before {
  background-image: none;
}

.gallery-edit-page.gallery-edit-page--hub .card:not(.gallery-edit-unified-album-card)::before {
  display: none;
}

.gallery-edit-page.gallery-edit-page--hub .card:not(.gallery-edit-unified-album-card) {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-edit-page.gallery-edit-page--hub .card:not(.gallery-edit-unified-album-card) h2,
.gallery-edit-page.gallery-edit-page--hub .card:not(.gallery-edit-unified-album-card) h3 {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: var(--color-text, #f4f4f5);
  font-weight: 600;
}

.gallery-edit-page.gallery-edit-page--hub .gallery-edit-page-title-compact {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text, #f4f4f5);
}

.gallery-edit-page.gallery-edit-page--hub .gallery-edit-page-head {
  width: 100%;
}

.gallery-edit-page.gallery-edit-page--hub .gallery-edit-page-head-row {
  width: 100%;
}

.gallery-edit-page.gallery-edit-page--hub .gallery-edit-create-panel {
  width: 100%;
}

.gallery-edit-page.gallery-edit-page--hub .gallery-edit-hub-empty-card {
  padding: 2rem 1.25rem;
  margin-bottom: 0;
}

.gallery-edit-hub-stream {
  padding-bottom: var(--spacing-md);
}

.gallery-edit-page.gallery-edit-page--hub .discover-search-panel .form-control,
.gallery-edit-page.gallery-edit-page--hub .discover-search-panel select.form-control {
  border-radius: 8px;
}

.gallery-edit-unified-album-card .gallery-edit-unified-header {
  grid-template-columns: 1fr auto;
}

.gallery-edit-unified-album-card .gallery-edit-unified-header .header-center {
  justify-content: flex-start;
  text-align: left;
}

/* ============================================
   Gallerihantering = profilvy / discover (helhet)
   ============================================ */
.gallery-edit-page.profile-view-page .discover-layout {
  align-items: center;
}

.gallery-edit-page.profile-view-page .gallery-edit-hub-column {
  width: 100%;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.profile-view-page .gallery-edit-tab-shell.profile-tab-card-modern {
  margin-top: 0.5rem;
}

.gallery-edit-page.profile-view-page .gallery-edit-chrome-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.gallery-edit-page.profile-view-page .gallery-edit-chrome-icon:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.gallery-edit-page.profile-view-page .gallery-edit-delete-album-btn {
  color: rgba(248, 113, 113, 0.85);
}

.gallery-edit-page.profile-view-page .gallery-edit-delete-album-btn:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
}

.gallery-edit-tab-body {
  min-width: 0;
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
}

/* —— Luftig gallerivy: inget discover-panel, fokus bilder —— */
.gallery-edit-page--airy.profile-view-page .gallery-edit-hub-column {
  max-width: min(100%, 52rem);
}

.gallery-edit-page--airy .gallery-edit-tab-body--airy {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.gallery-edit-page--airy .gallery-edit-canvas {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gallery-edit-page--airy .gallery-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gallery-edit-page--airy .gallery-edit-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted, #a1a1aa);
}

.gallery-edit-page--airy .gallery-edit-soft-sheet {
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.gallery-edit-page--airy .gallery-edit-soft-form {
  gap: 1rem !important;
}

.gallery-edit-page--airy .gallery-edit-input-airy {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.gallery-edit-page--airy .gallery-edit-input-airy:focus {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
  outline: none;
}

.gallery-edit-page--airy .gallery-edit-soft-submit {
  align-self: flex-start;
  border-radius: 999px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.gallery-edit-page--airy .gallery-edit-album-row {
  padding-bottom: 0.25rem;
}

.gallery-edit-page--airy .gallery-edit-album-pick {
  width: 100%;
}

.gallery-edit-page--airy .gallery-edit-album-select {
  width: 100%;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  padding: 0.5rem 0 0.65rem;
  color: var(--color-text, #f4f4f5);
}

.gallery-edit-page--airy .gallery-edit-album-select:focus {
  border-bottom-color: rgba(6, 182, 212, 0.5);
  box-shadow: none;
  outline: none;
}

.gallery-edit-page--airy .gallery-edit-whisper {
  font-size: 0.875rem;
  color: var(--color-text-muted, #a1a1aa);
  margin-top: 0.65rem;
  line-height: 1.45;
}

.gallery-edit-page--airy .gallery-edit-album-stack--airy {
  gap: 1.5rem;
}

.gallery-edit-page--airy .gallery-edit-album-actions {
  padding-bottom: 1.15rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.gallery-edit-page--airy .gallery-edit-album-hero {
  align-items: baseline;
}

.gallery-edit-page--airy .gallery-edit-album-hero-title {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--color-text, #fafafa);
  min-width: 0;
}

.gallery-edit-page--airy .gallery-edit-mosaic {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0.35rem;
}

.gallery-edit-page--airy .gallery-edit-mosaic-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #a1a1aa);
  margin: 0 0 0.55rem;
}

.gallery-edit-page--airy .gallery-edit-mosaic-empty {
  font-size: 0.9375rem;
  color: var(--color-text-muted, #a1a1aa);
  text-align: left;
  padding: 1rem 0 0;
  max-width: 28rem;
  line-height: 1.45;
  border: none;
  background: transparent;
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: min(100%, 20.5rem);
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid .gallery-thumbnail-item {
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid .gallery-thumbnail-wrapper:hover {
  transform: scale(1.02);
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid .gallery-thumbnail-delete-btn {
  width: 24px;
  height: 24px;
  font-size: 1rem;
  line-height: 1;
  top: 0.3rem;
  right: 0.3rem;
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid .gallery-thumbnail-nsfw-badge {
  font-size: 0.625rem;
  padding: 0.15rem 0.35rem;
  top: 0.3rem;
  right: auto;
  left: 0.3rem;
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid .gallery-thumbnail-overlay {
  padding: 0.4rem 0.45rem;
}

.gallery-edit-page--airy .gallery-edit-mosaic-grid .gallery-thumbnail-title {
  font-size: 0.6875rem;
}

.gallery-edit-page--airy .gallery-edit-add {
  padding: 0.85rem 0 0;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-edit-page--airy .gallery-edit-add-head {
  align-items: center;
  margin-bottom: 0.85rem;
}

.gallery-edit-page--airy .gallery-edit-add-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted, #a1a1aa);
}

.gallery-edit-page--airy .gallery-edit-quota {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted, #a1a1aa);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.gallery-edit-page--airy .gallery-edit-quota--full {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.gallery-edit-page--airy .gallery-edit-upload-inner {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.gallery-edit-page--airy .gallery-edit-upload-inner::before {
  display: none !important;
}

.gallery-edit-page--airy .gallery-edit-file-field {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.gallery-edit-page--airy .gallery-edit-file-field:focus-within {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.04);
}

.gallery-edit-page--airy .gallery-edit-file-input {
  width: 100%;
  font-size: 0.875rem;
  color: var(--color-text-muted, #a1a1aa);
}

.gallery-edit-page--airy .gallery-edit-upload-btn {
  margin-top: 0.75rem;
  border-radius: 999px;
}

.gallery-edit-page--airy .gallery-edit-meta {
  padding-top: 0;
}

.gallery-edit-page--airy .gallery-edit-meta-details {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.gallery-edit-page--airy .gallery-edit-meta-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted, #a1a1aa);
  transition: color 0.2s ease, background 0.2s ease;
}

.gallery-edit-page--airy .gallery-edit-meta-summary::-webkit-details-marker {
  display: none;
}

.gallery-edit-page--airy .gallery-edit-meta-summary::after {
  content: '›';
  float: right;
  opacity: 0.5;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.gallery-edit-page--airy .gallery-edit-meta-details[open] .gallery-edit-meta-summary::after {
  transform: rotate(90deg);
}

.gallery-edit-page--airy .gallery-edit-meta-summary:hover {
  color: var(--color-text, #f4f4f5);
  background: rgba(255, 255, 255, 0.04);
}

.gallery-edit-page--airy .gallery-edit-meta-body {
  padding: 0 1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-edit-page--airy .gallery-edit-meta-fields {
  padding-top: 1rem;
}

.gallery-edit-page--airy .gallery-edit-save-link {
  align-self: flex-start;
  border-radius: 999px;
  color: var(--color-primary, #22d3ee);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.gallery-edit-page--airy .gallery-edit-save-link:hover {
  background: rgba(6, 182, 212, 0.1);
  color: #e0f2fe;
}

.gallery-edit-page--airy .gallery-edit-access {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-edit-page--airy .gallery-edit-access-title {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted, #a1a1aa);
}

.gallery-edit-page--airy .gallery-edit-access-sub {
  margin: 0.75rem 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #a1a1aa);
}

.gallery-edit-page--airy .gallery-edit-access-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.gallery-edit-page--airy .gallery-edit-access-row .gallery-edit-input-airy {
  flex: 1 1 12rem;
  min-width: 0;
}

.gallery-edit-page--airy .gallery-edit-user-results {
  margin-top: 0.5rem;
}
