/**
 * profile-dialog.css
 * Last modified: v017.042
 * Styles for ProfileDialog modal — smart import, unsaved changes, completion stats
 */

/* ============================================
   Overlay
   ============================================ */
.profile-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 1rem;
}

.profile-dialog-overlay.visible {
  opacity: 1;
}

/* ============================================
   Dialog Card
   ============================================ */
.profile-dialog {
  background: var(--theme-card-bg, #1e1e2e);
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.1));
  border-radius: 1rem;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.profile-dialog-overlay.visible .profile-dialog {
  transform: scale(1) translateY(0);
}

/* ============================================
   Header
   ============================================ */
.profile-dialog-header {
  padding: 1.5rem 1.5rem 0;
  text-align: center;
}

.profile-dialog-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.profile-dialog-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--theme-text, #e0e0e0);
  margin: 0 0 0.25rem;
}

.profile-dialog-subtitle {
  font-size: 0.85rem;
  color: var(--theme-text-secondary, #999);
  margin: 0;
}

/* ============================================
   Profile Info / Stats
   ============================================ */
.profile-dialog-stats {
  padding: 1rem 1.5rem;
}

.profile-dialog-progress {
  margin-bottom: 0.75rem;
}

.profile-dialog-progress-bar {
  height: 8px;
  background: var(--theme-border, rgba(255, 255, 255, 0.1));
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.profile-dialog-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.profile-dialog-progress-fill--high {
  background: var(--match-green, #16a34a);
}

.profile-dialog-progress-fill--medium {
  background: var(--match-yellow, #f59e0b);
}

.profile-dialog-progress-fill--low {
  background: #3d8c73;
}

.profile-dialog-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--theme-text-secondary, #999);
}

.profile-dialog-progress-pct {
  font-weight: 600;
  color: var(--theme-text, #e0e0e0);
}

.profile-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.profile-dialog-meta-item {
  font-size: 0.75rem;
  color: var(--theme-text-secondary, #999);
  background: var(--theme-bg, rgba(255, 255, 255, 0.05));
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
}

.profile-dialog-friendly-msg {
  font-size: 0.85rem;
  color: var(--theme-text, #e0e0e0);
  text-align: center;
  margin-top: 0.5rem;
  padding: 0.5rem;
  line-height: 1.4;
}

/* ============================================
   Actions
   ============================================ */
.profile-dialog-actions {
  padding: 0.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-dialog-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.1));
  border-radius: 0.75rem;
  background: var(--theme-bg, rgba(255, 255, 255, 0.03));
  color: var(--theme-text, #e0e0e0);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: left;
}

.profile-dialog-btn:hover {
  background: var(--theme-card-hover, rgba(255, 255, 255, 0.08));
  border-color: var(--theme-accent, #3d8c73);
}

.profile-dialog-btn:active {
  transform: scale(0.98);
}

.profile-dialog-btn--primary {
  background: var(--theme-accent, #3d8c73);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.profile-dialog-btn--primary:hover {
  opacity: 0.9;
  border-color: transparent;
}

.profile-dialog-btn--danger {
  color: var(--theme-accent-error, #b35555);
  border-color: color-mix(in srgb, var(--theme-accent-error, #b35555) 30%, transparent);
}

.profile-dialog-btn--danger:hover {
  background: color-mix(in srgb, var(--theme-accent-error, #b35555) 10%, transparent);
  border-color: var(--theme-accent-error, #b35555);
}

.profile-dialog-btn-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.profile-dialog-btn-content {
  flex: 1;
}

.profile-dialog-btn-label {
  font-weight: 600;
  display: block;
}

.profile-dialog-btn-desc {
  font-size: 0.75rem;
  color: var(--theme-text-secondary, #999);
  display: block;
  margin-top: 0.15rem;
}

.profile-dialog-btn--primary .profile-dialog-btn-desc {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Cancel / Close
   ============================================ */
.profile-dialog-cancel {
  display: block;
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.25rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--theme-text-secondary, #999);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s;
}

.profile-dialog-cancel:hover {
  color: var(--theme-text, #e0e0e0);
}

/* ============================================
   Warning variant
   ============================================ */
.profile-dialog--warning .profile-dialog-icon {
  color: var(--theme-accent-warning, #d4a053);
}

.profile-dialog--warning .profile-dialog-title {
  color: var(--theme-accent-warning, #d4a053);
}

.profile-dialog-warning-text {
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--theme-text-secondary, #999);
  text-align: center;
  line-height: 1.5;
}

/* ============================================
   Divider
   ============================================ */
.profile-dialog-divider {
  height: 1px;
  background: var(--theme-border, rgba(255, 255, 255, 0.1));
  margin: 0 1.5rem;
}
