/* Vault Portal modal styles — used by vault-portal.js across all pages */

.vault-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.vault-modal.active {
  display: flex;
}

.vault-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.vault-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 92%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  color: #111827;
  display: flex;
  flex-direction: column;
}

.vault-capture-content {
  max-width: 700px !important;
}

.vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.vault-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.vault-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
}

.vault-capture-body {
  padding: 1rem 1.5rem;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

.vault-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.file-list {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.file-item:last-child {
  margin-bottom: 0;
}

.file-icon {
  font-size: 1.5rem;
}

.file-info {
  flex: 1;
}

.file-name {
  font-weight: 500;
  color: #111827;
}

.file-size {
  font-size: 0.8rem;
  color: #6b7280;
}

.capture-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: #374151;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.type-description {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.5rem;
  font-style: italic;
}

.auto-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .auto-fields {
    grid-template-columns: 1fr;
  }

  .vault-actions {
    justify-content: stretch;
  }

  .vault-actions .btn {
    flex: 1 1 100%;
  }
}

.metadata-preview {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.metadata-preview h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #1e40af;
}

.metadata-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.metadata-list li {
  padding: 0.25rem 0;
  color: #374151;
}

.metadata-note {
  margin: 0.75rem 0 0 0;
  font-size: 0.8rem;
  color: #1d4ed8;
  line-height: 1.4;
}

.checkbox-group {
  margin-top: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  color: #dc2626;
}

.checkbox-label input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #dc2626;
}

.vault-storage-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem;
  margin: 0 1.5rem 1.5rem;
}

.storage-provider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #065f46;
  margin-bottom: 0.5rem;
}

.privacy-note {
  font-size: 0.8rem;
  color: #059669;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d1d5db;
}
