/* ==================================================
   UNSC WAYPOINT - EXTENDED STYLES
   Messaging, File Upload, and Clan Reporter Features
   ================================================== */

/* === CONTACT ACTIONS - ENHANCED === */
.contact-action-btn.message {
  color: var(--color-accent-primary);
}

.contact-action-btn.message:hover {
  border-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* === SMALL BUTTONS (friend actions, roster tables, etc.) === */
.btn-xs {
  padding: 4px 8px;
  font-size: 0.7rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-xs:hover {
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
}

.btn-xs.btn-primary {
  color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}

.btn-xs.btn-danger {
  color: var(--color-accent-danger);
  border-color: var(--color-accent-danger);
}

.btn-xs.btn-danger:hover {
  background: var(--color-accent-danger);
  color: var(--color-text-primary);
}

/* === EMPTY STATES === */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
  line-height: 1;
}

.empty-state-title {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-secondary);
  font-weight: bold;
}

.empty-state-message {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* Sidebar Specific Empty State Tweaks */
.sidebar-left .empty-state,
.sidebar-right .empty-state {
  padding: 2rem 0;
  min-height: 200px;
}

.sidebar-left .empty-state-icon,
.sidebar-right .empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* === LIST SPACING === */
.contact-list,
.message-list,
.file-list,
.report-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-item,
.message-item {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: all 0.2s ease;
}

.contact-item:last-child,
.message-item:last-child,
.file-item:last-child {
  border-bottom: none;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

/* === CONTACT SPECIFIC === */
.contact-name {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.contact-rank {
  font-size: 0.75rem;
  line-height: 1.3;
}

.contact-icon {
  margin-right: 0.75rem;
}

/* === MESSAGING === */
.message-item {
  position: relative;
  padding-left: 1rem;
}

.message-item.unread {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--color-accent-primary);
  padding-left: calc(1rem - 3px);
}

.message-item.unread .message-subject {
  color: var(--color-text-primary);
  font-weight: bold;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.message-sender {
  font-size: 0.75rem;
  color: var(--color-accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.message-time {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.message-subject {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.message-preview {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.message-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-primary);
}

.btn-small.btn-primary {
  border-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
}

.btn-small.btn-primary:hover {
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
}

.btn-small.btn-danger {
  border-color: var(--color-accent-danger);
  color: var(--color-accent-danger);
}

.btn-small.btn-danger:hover {
  background: var(--color-accent-danger);
  color: var(--color-text-primary);
}

.message-detail {
  line-height: 1.8;
}

.message-detail-field {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.message-detail-body {
  margin-top: 1.5rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-danger {
  background: var(--color-accent-danger);
  color: var(--color-text-primary);
  box-shadow: var(--glow-danger);
}

.nav-badge {
  display: inline-block;
  background: var(--color-accent-danger);
  color: var(--color-text-primary);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.65rem;
  margin-left: 0.5rem;
  font-weight: bold;
  box-shadow: var(--glow-danger);
}

/* === NOTIFICATION TOASTS === */
#waypoint-toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.waypoint-toast {
  pointer-events: auto;
  cursor: pointer;
  min-width: 260px;
  max-width: 340px;
  padding: 0.85rem 1rem;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-subtle);
  border-left: 3px solid var(--color-accent-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.waypoint-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.waypoint-toast-title {
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.waypoint-toast-body {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.waypoint-toast-message {
  border-left-color: var(--color-accent-danger);
}

.waypoint-toast-message .waypoint-toast-title {
  color: var(--color-accent-danger);
}

/* === FILE UPLOAD === */
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background 0.2s ease;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-name {
  font-size: 0.9rem;
  color: var(--color-text-primary);
}

.file-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-upload-file {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

/* === REPORT LIST === */
.report-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.report-item {
  padding: 1.5rem;
  border: 1px solid var(--color-border-subtle);
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.report-item.pending {
  border-left: 3px solid var(--color-accent-warning);
}

.report-item.published {
  border-left: 3px solid var(--color-accent-primary);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.report-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.report-preview {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.report-content {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.report-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* === TEXTAREA STYLING === */
textarea.form-input {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-primary);
  line-height: 1.6;
}

/* === SERVICE NUMBER PICKER === */
.sn-picker {
  border: 1px solid var(--color-border-subtle);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
}

.sn-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.sn-picker-chips:empty {
  display: none;
}

.sn-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.sn-chip.sn-chip-unknown {
  background: rgba(160, 160, 160, 0.1);
  border-color: var(--color-accent-warning);
}

.sn-chip-remove {
  cursor: pointer;
  color: var(--color-text-muted);
  font-weight: bold;
}

.sn-chip-remove:hover {
  color: var(--color-accent-danger);
}

.sn-picker #sn-picker-search {
  margin: 0;
}

.sn-picker-results {
  max-height: 160px;
  overflow-y: auto;
  margin-top: 0.4rem;
}

.sn-picker-results:empty {
  display: none;
}

.sn-result-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-subtle);
}

.sn-result-item:last-child {
  border-bottom: none;
}

.sn-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
}

.sn-result-sn {
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

/* === SELECT STYLING === */
select.form-input {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 20px;
  padding-right: 3rem;
  cursor: pointer;
}

/* === PANEL IMPROVEMENTS === */
.panel {
  margin-bottom: 1.5rem;
}

.panel-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Panel content spacing */
.panel>div:not(.panel-header) {
  padding: 1.5rem;
}

/* Sidebar panels */
.sidebar-left .panel,
.sidebar-right .panel {
  margin-bottom: 1.5rem;
}

/* Additional Main Content Spacing */
.security-badge {
  margin-top: 3rem !important;
}

/* === RESPONSIVE SPACING === */
@media (max-width: 768px) {
  .empty-state {
    padding: 2rem 1rem;
    min-height: 200px;
  }

  .empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .empty-state-title {
    font-size: 1rem;
  }

  .empty-state-message {
    font-size: 0.85rem;
  }

  .contact-item,
  .message-item,
  .file-item {
    padding: 1rem;
  }

  .panel-header {
    padding: 0.75rem 1rem;
  }
}
/* === ONI AUXILIARY TERMINAL LOGIN === */
.oni-term {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 760px;
  padding: 1rem;
  animation: slideIn 0.3s ease;
}

.oni-term-frame {
  position: relative;
  width: 100%;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-active);
  box-shadow: var(--shadow-panel), 0 0 40px var(--color-accent-glow);
}

.oni-term-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.oni-term-org {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-shadow: var(--glow-primary);
}

.oni-term-alert {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-danger);
  text-shadow: var(--glow-danger);
  animation: pulse 2s infinite;
}

.oni-term-body {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  overflow: hidden;
}

.oni-term-seal {
  width: clamp(160px, 26vw, 260px);
  opacity: 0.35;
  filter: drop-shadow(0 0 20px var(--color-accent-glow));
  pointer-events: none;
  user-select: none;
}

.oni-term-credentials {
  position: absolute;
  top: 1.5rem;
  right: 1.25rem;
  width: 220px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--color-border);
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.oni-term-field {
  margin-bottom: 0.85rem;
}

.oni-term-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 0.35rem;
}

.oni-term-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.oni-term-input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.08);
}

.oni-term-body-tall {
  min-height: 440px;
}

.oni-term-credentials-wide {
  width: 260px;
}

.oni-term-note {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.oni-term-tos {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.oni-term-tos input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.oni-term-tos label {
  font-size: 0.68rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.oni-term-tos a {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

.oni-term-forgot {
  text-align: right;
  margin: -0.4rem 0 0.75rem;
}

.oni-term-forgot a {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.oni-term-submit {
  width: 100%;
  padding: 0.6rem;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.oni-term-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
}

.oni-term-code {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.oni-term-msg {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  animation: pulse 2.5s infinite;
}

@media (max-width: 640px) {
  .oni-term-body {
    flex-direction: column;
    min-height: unset;
    padding: 1.5rem 1rem;
  }

  .oni-term-credentials {
    position: static;
    width: 100%;
    margin-top: 1.5rem;
  }

  .oni-term-seal {
    width: 140px;
    opacity: 0.25;
  }
}

/* === PROFILE AVATAR HOVER === */
.profile-avatar-large:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
}

/* === PURCHASED EMBLEM BADGE (nav avatar + profile header) === */
.user-emblem-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--color-bg-primary);
    background-color: #000;
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

.profile-emblem-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--color-bg-primary);
    background-color: #000;
    background-size: cover;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
}
