/**
 * Rekaptr Desktop Mockup - Dedicated Share to Team Modal Styles
 * Modern, crisp dark theme styling for team & squad clip sharing
 */

/* -------------------------------------------------------------
 * 1. Modal Overlay & Window Frame
 * ------------------------------------------------------------- */
.share-team-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop, 999);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
  padding: 24px;
}

.share-team-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.share-team-modal-window {
  background: var(--bg-panel, #14151e);
  border: 1px solid var(--border-active, #7c3aed);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg, 12px);
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary, #f8fafc);
  font-family: var(--font-sans, 'Inter', sans-serif);
}

.share-team-modal-overlay.open .share-team-modal-window {
  transform: scale(1) translateY(0);
}

/* -------------------------------------------------------------
 * 2. Header
 * ------------------------------------------------------------- */
.share-team-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default, #26293a);
  background: var(--bg-surface, #181a26);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.share-team-title-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-team-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(124, 58, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
  flex-shrink: 0;
}

.share-team-heading-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-team-heading {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.share-team-subtitle {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}

.btn-close-share-team-modal {
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast, 120ms ease);
}

.btn-close-share-team-modal:hover {
  background: var(--bg-surface-hover, #272a3d);
  color: #ffffff;
}

/* -------------------------------------------------------------
 * 2b. Destination Mode Selector (Personal Cloud vs Team Share)
 * ------------------------------------------------------------- */
.share-destination-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.share-destination-card {
  background: var(--bg-surface, #181a26);
  border: 1.5px solid var(--border-default, #26293a);
  border-radius: var(--radius-md, 10px);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-fast, 120ms ease);
  position: relative;
  text-align: left;
}

.share-destination-card:hover {
  background: var(--bg-surface-hover, #272a3d);
  border-color: var(--border-hover, #3e425e);
}

.share-destination-card.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--accent-iris, #7c3aed);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
}

.share-destination-card.active.dest-cloud {
  background: rgba(2, 132, 199, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.dest-card-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-surface-raised, #1f2130);
  border: 1px solid var(--border-subtle, #1e202e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.share-destination-card.active .dest-card-icon-box {
  background: var(--accent-iris, #7c3aed);
  border-color: var(--accent-iris, #7c3aed);
  color: #fff;
}

.share-destination-card.active.dest-cloud .dest-card-icon-box {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
}

.dest-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.dest-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dest-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.dest-card-badge {
  font-size: 9px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #64748b);
}

.share-destination-card.active .dest-card-badge {
  background: rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
}

.share-destination-card.active.dest-cloud .dest-card-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.dest-card-desc {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.35;
}

/* -------------------------------------------------------------
 * 2c. Panels for Personal Cloud & Team Sharing
 * ------------------------------------------------------------- */
.share-destination-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 150ms ease;
}

.share-destination-panel.active {
  display: flex;
}

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

/* Personal Cloud Storage Gauge */
.cloud-storage-gauge-box {
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-card, #2e3146);
  border-radius: var(--radius-sm, 6px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cloud-gauge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.cloud-gauge-header strong {
  color: #ffffff;
}

.cloud-gauge-header span {
  font-family: var(--font-mono, monospace);
  color: #38bdf8;
  font-weight: 600;
}

.cloud-gauge-bar-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.cloud-gauge-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #38bdf8 0%, #7c3aed 100%);
  width: 12.4%;
  transition: width var(--transition-normal, 200ms ease);
}

/* Privacy Selector Cards */
.cloud-privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cloud-privacy-card {
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-default, #26293a);
  border-radius: var(--radius-sm, 6px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast, 120ms ease);
  text-align: left;
}

.cloud-privacy-card:hover {
  background: var(--bg-surface-hover, #272a3d);
  border-color: var(--border-hover, #3e425e);
}

.cloud-privacy-card.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
}

.cloud-privacy-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cloud-privacy-card-desc {
  font-size: 10.5px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.3;
}

/* -------------------------------------------------------------
 * 3. Modal Scroll Body
 * ------------------------------------------------------------- */
.share-team-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-panel, #14151e);
}

.share-team-body::-webkit-scrollbar {
  width: 6px;
}

.share-team-body::-webkit-scrollbar-thumb {
  background: var(--border-card, #2e3146);
  border-radius: 3px;
}

/* Selected Clip Preview Card */
.share-clip-preview-card {
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-card, #2e3146);
  border-radius: var(--radius-md, 10px);
  padding: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.share-clip-thumb-box {
  width: 120px;
  height: 68px;
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  background: #000;
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--border-default, #26293a);
}

.share-clip-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-clip-thumb-badges {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 9px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  color: #fff;
}

.share-clip-info-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.share-clip-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.share-clip-title-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.share-clip-title-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-default, #26293a);
  border-radius: var(--radius-sm, 6px);
  padding: 5px 28px 5px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast, 120ms ease);
  box-sizing: border-box;
}

.share-clip-title-input:hover {
  border-color: var(--border-hover, #3e425e);
  background: rgba(0, 0, 0, 0.5);
}

.share-clip-title-input:focus {
  border-color: var(--accent-iris, #7c3aed);
  background: rgba(10, 11, 16, 0.9);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25);
}

.share-clip-title-edit-icon {
  position: absolute;
  right: 9px;
  color: var(--text-muted, #64748b);
  pointer-events: none;
  transition: color var(--transition-fast, 120ms ease);
}

.share-clip-title-input:focus + .share-clip-title-edit-icon,
.share-clip-title-input:hover + .share-clip-title-edit-icon {
  color: var(--accent-iris-hover, #a78bfa);
}

.share-clip-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-clip-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: var(--text-secondary, #94a3b8);
}

.share-clip-game-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
}

.share-clip-game-pill img {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* -------------------------------------------------------------
 * 4. Section Blocks: Team Selector, Channels, & Options
 * ------------------------------------------------------------- */
.share-team-section-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-team-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Team Grid Selection */
.share-team-grid-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.team-picker-card {
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-default, #26293a);
  border-radius: var(--radius-sm, 6px);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast, 120ms ease);
  user-select: none;
}

.team-picker-card:hover {
  background: var(--bg-surface-hover, #272a3d);
  border-color: var(--border-hover, #3e425e);
}

.team-picker-card.selected {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--accent-iris, #7c3aed);
  box-shadow: 0 0 0 1px var(--accent-iris, #7c3aed);
}

.team-picker-emblem {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.team-picker-emblem.emblem-oi {
  background: linear-gradient(135deg, #7c3aed 0%, #4338ca 100%);
}

.team-picker-emblem.emblem-viper {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.team-picker-emblem.emblem-ghost {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.team-picker-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.team-picker-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-picker-meta {
  font-size: 10px;
  color: var(--text-muted, #64748b);
  font-family: var(--font-mono, monospace);
}

/* Channel Selector Pills */
.share-team-channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-pill-btn {
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-default, #26293a);
  color: var(--text-secondary, #94a3b8);
  padding: 6px 12px;
  border-radius: var(--radius-pill, 9999px);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast, 120ms ease);
}

.channel-pill-btn:hover {
  background: var(--bg-surface-hover, #272a3d);
  color: #ffffff;
}

.channel-pill-btn.active {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent-iris, #7c3aed);
  color: #c4b5fd;
}

/* Inputs & Form Rows */
.share-team-input-caption {
  width: 100%;
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-default, #26293a);
  border-radius: var(--radius-sm, 6px);
  padding: 8px 12px;
  font-size: 12px;
  color: #ffffff;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--transition-fast, 120ms ease);
}

.share-team-input-caption:focus {
  border-color: var(--accent-iris, #7c3aed);
}

/* Tag Selection Row */
.share-team-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-select-chip {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-default, #26293a);
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all var(--transition-fast, 120ms ease);
}

.tag-select-chip:hover {
  border-color: var(--border-hover, #3e425e);
  color: #fff;
}

.tag-select-chip.active {
  border-color: currentColor;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.tag-select-chip.tag-clutch.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.tag-select-chip.tag-kill.active { background: #e11d48; color: #fff; border-color: #e11d48; }
.tag-select-chip.tag-headshot.active { background: #d97706; color: #fff; border-color: #d97706; }
.tag-select-chip.tag-funny.active { background: #0284c7; color: #fff; border-color: #0284c7; }
.tag-select-chip.tag-montage.active { background: #059669; color: #fff; border-color: #059669; }

/* Toggle Feature Boxes */
.share-team-options-group {
  background: var(--bg-surface, #181a26);
  border: 1px solid var(--border-default, #26293a);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
}

.share-team-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle, #1e202e);
  gap: 16px;
}

.share-team-toggle-row:last-child {
  border-bottom: none;
}

.share-team-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-team-toggle-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-team-toggle-desc {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
}

/* Link Copy Box */
.share-team-link-box {
  background: var(--bg-app, #0b0c10);
  border: 1px solid var(--border-card, #2e3146);
  border-radius: var(--radius-sm, 6px);
  padding: 4px 6px 4px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.share-team-link-text {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-team-link {
  background: var(--bg-surface-raised, #1f2130);
  border: 1px solid var(--border-default, #26293a);
  border-radius: var(--radius-xs, 4px);
  color: var(--text-primary, #f8fafc);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all var(--transition-fast, 120ms ease);
}

.btn-copy-team-link:hover {
  background: var(--bg-surface-hover, #272a3d);
  border-color: var(--accent-iris, #7c3aed);
}

.btn-copy-team-link.copied {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

/* -------------------------------------------------------------
 * 5. Footer & Action Buttons
 * ------------------------------------------------------------- */
.share-team-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-default, #26293a);
  background: var(--bg-surface, #181a26);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.share-team-status-text {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-team-status-text strong {
  color: #ffffff;
}

.share-team-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-default, #26293a);
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-xs, 4px);
  cursor: pointer;
  transition: all var(--transition-fast, 120ms ease);
}

.btn-modal-cancel:hover {
  background: var(--bg-surface-hover, #272a3d);
  color: #ffffff;
}

.btn-share-team-confirm {
  background: var(--accent-iris, #7c3aed);
  border: 1px solid var(--accent-iris, #7c3aed);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: var(--radius-xs, 4px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast, 120ms ease);
}

.btn-share-team-confirm:hover {
  background: var(--accent-iris-hover, #8b5cf6);
  transform: translateY(-1px);
}

.btn-share-team-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
