/* Profile page */

.profile-redirect {
  max-width: 500px;
  margin: 4rem auto;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  padding: 2rem;
}
.profile-redirect a { color: var(--accent); }

.profile-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* Header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #fff;
  font-weight: 400;
  flex-shrink: 0;
}

.profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2px;
}

.profile-email { font-size: 13px; color: var(--text-muted); }

/* Tabs */
.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.profile-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.profile-tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.profile-tab:hover { color: var(--text); }

.profile-panel { display: none; }
.profile-panel.active { display: block; }
.profile-loading { font-size: 14px; color: var(--text-muted); padding: 2rem 0; }

/* Liked wines grid */
.profile-wines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.profile-wine-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--surface);
  text-decoration: none;
}
.profile-wine-card:hover { border-color: var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.profile-wine-image {
  width: 44px;
  height: 56px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-wine-image .bottle-icon { opacity: 0.18; }
.profile-wine-name {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}
.profile-wine-producer { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.profile-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 14px;
}
.profile-empty svg { opacity: 0.2; margin-bottom: 12px; display: block; margin-left: auto; margin-right: auto; }
.profile-empty a { color: var(--accent); }

/* Lists */
.lists-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.btn-create-list {
  height: 36px;
  padding: 0 1.25rem;
  background: var(--hero-bg);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-create-list:hover { background: #2a1210; }

.lists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.list-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.list-card:hover { border-color: var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.list-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.list-card-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.list-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}
.list-card-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.list-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.list-card-count { font-size: 12px; color: var(--text-muted); }
.list-card-public {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(22,163,74,0.08);
  color: #16a34a;
  border: 1px solid rgba(22,163,74,0.2);
}
.list-card-private {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

/* Form labels */
.profile-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.profile-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.profile-toggle-hint { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* View list modal */
.view-list-modal { max-width: 640px; }
.view-list-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.25rem;
}
.view-list-icon { font-size: 32px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.view-list-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.view-list-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.view-list-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.view-list-action-btn.danger:hover { border-color: #dc2626; color: #dc2626; }

.view-list-wines-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-list-wine {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg);
}
.view-list-wine-info { flex: 1; min-width: 0; }
.view-list-wine-name { font-size: 14px; color: var(--text); font-weight: 400; font-family: 'Playfair Display', serif; }
.view-list-wine-producer { font-size: 12px; color: var(--text-muted); }
.view-list-wine-remove {
  background: none;
  border: none;
  color: var(--text-hint);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.view-list-wine-remove:hover { color: #dc2626; }

/* List edit modal */
.list-edit-modal { max-width: 460px; }

/* Share toast */
.share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hero-bg);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.share-toast.visible { opacity: 1; }
