/**
 * Rekaptr Medal Clip Studio - Share Private Clip to Squad Modal Dialog
 * Allows selecting a recording from personal vault, syncing multi-POVs, and posting to squad feed
 */

.share-vault-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 150ms ease, visibility 150ms ease;
}

.share-vault-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.share-vault-modal-window {
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  background-color: #14151e;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: modalScaleIn 160ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Header */
.share-vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

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

.share-vault-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--accent-iris);
  color: #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.share-vault-heading {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.share-vault-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-close-share-vault-modal {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.btn-close-share-vault-modal:hover {
  background: var(--bg-surface-raised);
  color: #ffffff;
}

/* Filter & Search Bar */
.share-vault-controls-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(15, 16, 22, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.share-vault-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  flex: 1;
  min-width: 180px;
}

.share-vault-search-box svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

.share-vault-search-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: #ffffff;
  width: 100%;
  font-family: inherit;
}

.share-vault-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modal Body & Vault Clips Picker Grid */
.share-vault-body {
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.share-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.share-vault-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-vault-card:hover {
  background: var(--bg-surface-raised);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.share-vault-card.selected {
  border-color: var(--accent-iris);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 0 0 1px var(--accent-iris);
}

.share-vault-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #000;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.share-vault-card-selected-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-iris);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--transition-fast);
}

.share-vault-card.selected .share-vault-card-selected-badge {
  opacity: 1;
  transform: scale(1);
}

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

.share-vault-card-game {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(11, 12, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px;
}

.share-vault-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-vault-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-vault-card-sub {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Caption & Sync Options */
.share-vault-customization-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-vault-field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-vault-field-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.share-vault-input-caption {
  height: 32px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0 10px;
  font-size: 12px;
  color: #ffffff;
  outline: none;
  font-family: inherit;
}

.share-vault-input-caption:focus {
  border-color: var(--accent-iris);
}

.share-vault-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.share-vault-checkbox-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-vault-cb-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.share-vault-cb-desc {
  font-size: 10px;
  color: var(--text-muted);
}

/* Footer */
.share-vault-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.share-vault-status-info {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.share-vault-footer-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-share-vault-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  height: 34px;
  background: var(--accent-iris);
  border: none;
  border-radius: var(--radius-xs);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-share-vault-confirm:hover {
  background: var(--accent-iris-hover);
}

.btn-share-vault-confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
