/* ---------- Share Dialog ---------- */

.share-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.share-dialog {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: share-in 0.2s ease;
}

@keyframes share-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.share-dialog h2 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-h);
  padding-right: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.5;
}

.share-close:hover {
  opacity: 1;
}

.share-permission {
  margin-bottom: 20px;
}

.share-permission label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.share-permission-options {
  display: flex;
  gap: 8px;
}

.share-perm-btn {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-h);
  cursor: pointer;
  transition: all 0.15s;
}

.share-perm-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.share-perm-btn:hover:not(.active) {
  background: var(--accent-bg);
}

.share-link-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-link-row {
  display: flex;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text-h);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}

.share-link-input:focus {
  border-color: var(--accent);
}

.share-copy-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.share-copy-btn:hover {
  opacity: 0.9;
}

.share-create-btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.share-create-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.share-create-btn:disabled {
  opacity: 0.6;
}

.share-revoke-btn {
  background: none;
  border: none;
  color: var(--error);
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.share-revoke-btn:hover {
  text-decoration: underline;
}
