/* ==============================================================================
   NOVA THEME AVATAR & BRAND SYSTEM
   Square 2px corners, 1px hairline border, dark glass background, monospace initials
   Sizes: xs (20px), sm (28px), md (40px), lg (64px), xl (120px)
   Zero emoji, pure scientific observatory aesthetics
   ============================================================================== */

:root {
  --avatar-radius: 2px;
  --avatar-bg: #080e1a;
  --avatar-font: 'JetBrains Mono', 'Space Mono', 'SF Mono', Consolas, monospace;
}

.nova-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
  text-decoration: none;
}

.nova-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--avatar-radius);
  border: 1px solid var(--avatar-accent, rgba(92, 200, 255, 0.25));
  background: var(--avatar-bg);
  box-sizing: border-box;
  object-fit: cover;
  flex-shrink: 0;
  user-select: none;
  font-family: var(--avatar-font);
  font-weight: 700;
  color: var(--avatar-accent, #5cc8ff);
  text-transform: uppercase;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Sizing definitions: xs (20px), sm (28px), md (40px), lg (64px), xl (120px) */
.nova-avatar--xs {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

.nova-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.nova-avatar--md {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.nova-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.nova-avatar--xl {
  width: 120px;
  height: 120px;
  font-size: 44px;
}

/* Default / Initials Tile */
.nova-avatar--default {
  background: linear-gradient(135deg, #0b1528 0%, #060a14 100%);
  border-width: 1px;
  border-style: solid;
  border-color: var(--avatar-accent, #5cc8ff);
  color: var(--avatar-accent, #5cc8ff);
  text-shadow: 0 0 6px var(--avatar-glow, rgba(92, 200, 255, 0.4));
  letter-spacing: 0;
  line-height: 1;
}

/* Agency Logo & Initials Badge */
.nova-avatar--agency-badge {
  background: linear-gradient(135deg, rgba(14, 27, 49, 0.95) 0%, rgba(6, 12, 22, 0.98) 100%);
  border: 1px solid rgba(92, 200, 255, 0.35);
  color: #5cc8ff;
  letter-spacing: 0.5px;
  padding: 0 2px;
  text-align: center;
  font-weight: 700;
}

.nova-avatar--agency-badge.nova-avatar--xs { font-size: 8px; }
.nova-avatar--agency-badge.nova-avatar--sm { font-size: 9px; }
.nova-avatar--agency-badge.nova-avatar--md { font-size: 11px; }
.nova-avatar--agency-badge.nova-avatar--lg { font-size: 15px; }
.nova-avatar--agency-badge.nova-avatar--xl { font-size: 26px; }

.nova-avatar--agency {
  background: #060c16;
  border-color: rgba(92, 200, 255, 0.3);
}

/* Status Dot (Online Indicator) */
.nova-avatar-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #10b981;
  border: 1px solid #040711;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.6);
  z-index: 2;
  pointer-events: none;
}

.nova-avatar--xl ~ .nova-avatar-status-dot,
.nova-avatar-wrap:has(.nova-avatar--xl) .nova-avatar-status-dot {
  width: 14px;
  height: 14px;
  bottom: 2px;
  right: 2px;
}

/* Curator Badge */
.nova-avatar-curator-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: #040711;
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-family: var(--avatar-font);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 1px 4px;
  border-radius: 2px;
  white-space: nowrap;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
  z-index: 3;
  pointer-events: none;
}

/* ==============================================================================
   PROFILE BANNER & HERO SYSTEM
   ============================================================================== */
.profile-banner-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 2px 2px 0 0;
  border: 1px solid rgba(92, 200, 255, 0.2);
  border-bottom: none;
  background: linear-gradient(135deg, #060b18 0%, #030611 50%, #0b1730 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 4, 10, 0.1) 0%, rgba(2, 4, 10, 0.75) 100%);
  pointer-events: none;
}

.profile-banner-change-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(92, 200, 255, 0.4);
  color: var(--avatar-accent, #5cc8ff);
  font-family: var(--avatar-font);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
  z-index: 5;
}

.profile-banner-container:hover .profile-banner-change-btn,
.profile-banner-change-btn:focus-visible {
  opacity: 1;
  background: #020617;
  border-color: #5cc8ff;
}

.profile-header-main-card {
  position: relative;
  background: rgba(6, 12, 24, 0.85);
  border: 1px solid rgba(92, 200, 255, 0.2);
  border-radius: 0 0 2px 2px;
  padding: 0 28px 24px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(14px);
}

.profile-avatar-overlap-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -60px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.profile-avatar-owner-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.profile-avatar-change-btn {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(2, 6, 18, 0.92);
  border: 1px solid #5cc8ff;
  color: #5cc8ff;
  font-family: var(--avatar-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  pointer-events: auto;
  cursor: pointer;
  z-index: 4;
}

.profile-avatar-owner-wrap:hover .profile-avatar-change-btn,
.profile-avatar-owner-wrap:focus-visible .profile-avatar-change-btn,
.profile-avatar-change-btn:hover {
  opacity: 1;
  background: #020617;
  box-shadow: 0 0 10px rgba(92, 200, 255, 0.4);
}

/* Always visible on touch / small mobile */
@media (max-width: 768px) {
  .profile-banner-container {
    height: 160px;
  }
  .profile-banner-change-btn {
    opacity: 1;
    font-size: 9px;
    padding: 4px 8px;
  }
  .profile-avatar-change-btn {
    opacity: 0.95;
    bottom: -22px;
    pointer-events: auto;
  }
  .profile-avatar-overlap-row {
    margin-top: -50px;
  }
}

/* ==============================================================================
   IMAGE CROP & EDITOR MODAL (NOVA THEMED)
   ============================================================================== */
.nova-crop-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: nova-modal-fade 0.2s ease forwards;
}

.nova-crop-window {
  width: 100%;
  max-width: 540px;
  background: #060b18;
  border: 1px solid rgba(92, 200, 255, 0.35);
  border-radius: 2px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 15px rgba(92, 200, 255, 0.15);
  padding: 24px;
  position: relative;
  box-sizing: border-box;
}

.nova-crop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(92, 200, 255, 0.15);
  padding-bottom: 12px;
}

.nova-crop-title {
  font-family: var(--avatar-font);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  margin: 4px 0 0 0;
}

.nova-crop-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-family: var(--avatar-font);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}

.nova-crop-close-btn:hover {
  color: #fff;
  border-color: #ef4444;
}

/* Dropzone */
.nova-crop-dropzone {
  border: 1px dashed rgba(92, 200, 255, 0.4);
  border-radius: 2px;
  background: rgba(3, 7, 18, 0.6);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.nova-crop-dropzone:hover,
.nova-crop-dropzone.dragover {
  border-color: #5cc8ff;
  background: rgba(92, 200, 255, 0.05);
  box-shadow: 0 0 16px rgba(92, 200, 255, 0.15);
}

.nova-crop-dropzone-icon {
  font-family: var(--avatar-font);
  font-size: 24px;
  color: #5cc8ff;
  margin-bottom: 8px;
}

.nova-crop-dropzone-text {
  font-family: var(--avatar-font);
  font-size: 12px;
  color: #e2e8f0;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.nova-crop-dropzone-hint {
  font-family: var(--avatar-font);
  font-size: 10px;
  color: #64748b;
}

/* Viewport / Crop area */
.nova-crop-viewport {
  position: relative;
  margin: 0 auto 16px auto;
  background: #02040a;
  border: 1px solid rgba(92, 200, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  user-select: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nova-crop-viewport:active {
  cursor: grabbing;
}

.nova-crop-viewport.square {
  width: 280px;
  height: 280px;
}

.nova-crop-viewport.banner {
  width: 100%;
  max-width: 480px;
  height: 160px; /* 3:1 ratio */
}

.nova-crop-frame-guide {
  position: absolute;
  inset: 0;
  border: 1px solid #5cc8ff;
  box-shadow: 0 0 0 2000px rgba(2, 4, 10, 0.55);
  pointer-events: none;
  z-index: 10;
}

/* Corner ticks on guide frame */
.nova-crop-frame-guide::before,
.nova-crop-frame-guide::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: #5cc8ff;
  pointer-events: none;
}
.nova-crop-frame-guide::before {
  top: -1px; left: -1px;
  border-top: 2px solid #5cc8ff;
  border-left: 2px solid #5cc8ff;
}
.nova-crop-frame-guide::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid #5cc8ff;
  border-right: 2px solid #5cc8ff;
}

.nova-crop-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Zoom Slider */
.nova-crop-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--avatar-font);
  font-size: 11px;
  color: #94a3b8;
}

.nova-crop-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(92, 200, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.nova-crop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #5cc8ff;
  border: 1px solid #040711;
  box-shadow: 0 0 6px rgba(92, 200, 255, 0.6);
  cursor: pointer;
}

.nova-crop-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #5cc8ff;
  border: 1px solid #040711;
  cursor: pointer;
}

/* Notice */
.nova-crop-notice {
  font-family: var(--avatar-font);
  font-size: 10px;
  color: #94a3b8;
  border-left: 2px solid #5cc8ff;
  padding: 6px 10px;
  background: rgba(92, 200, 255, 0.05);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Progress bar */
.nova-crop-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
  display: none;
}

.nova-crop-progress-fill {
  height: 100%;
  width: 0%;
  background: #5cc8ff;
  box-shadow: 0 0 8px #5cc8ff;
  transition: width 0.15s ease;
}

/* Actions */
.nova-crop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.nova-crop-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nova-crop-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
