/* ===== Pubbers User Dashboard - New Design ===== */
/* Mobile-first, card-based layout for improved UX */

.user-dashboard {
  background: linear-gradient(135deg, rgba(79, 55, 25, 0.95) 0%, rgba(30, 24, 21, 0.98) 100%);
  border: 1px solid rgba(255, 167, 42, 0.2);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Dashboard Header ===== */
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 167, 42, 0.5);
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}

.dashboard-avatar:hover {
  transform: scale(1.05);
  border-color: rgba(255, 167, 42, 0.8);
}

.dashboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-greeting {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
  color: #fff;
}

.dashboard-chevron {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  transition: transform 0.2s;
}

/* ===== Profile Header Variant (image + username + actions in one row, bio below) ===== */
.dashboard-header--profile {
  align-items: stretch;
}

.dashboard-header--profile .dashboard-greeting-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.dashboard-header--profile .dashboard-actions {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dashboard-header--profile .dashboard-actions form {
  display: inline-flex;
  margin: 0;
}

.dashboard-header--profile .dashboard-greeting {
  margin: auto 0 0 0;
  align-self: flex-start;
}

.dashboard-bio {
  margin: 0 0 16px 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Small, right-justified action buttons */
.dashboard-icon-btn,
.dashboard-follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.dashboard-icon-btn:hover,
.dashboard-follow-btn:hover {
  background: rgba(255, 167, 42, 0.15);
  border-color: rgba(255, 167, 42, 0.4);
  color: #ffa72a;
}

.dashboard-icon-btn--danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.dashboard-icon-btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ff6b6b;
}

/* ===== Hero Stat (Ratings + Rank) ===== */
.dashboard-hero-stat {
  text-align: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-bottom: 16px;
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffa72a;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  text-transform: lowercase;
}

.hero-rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
}

.hero-rank i {
  color: #ffd27a;
}

/* ===== Secondary Stats Row ===== */
.dashboard-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-item i {
  color: #ffd27a;
  font-size: 1.1rem;
}

.stat-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.stat-link {
  color: #ffa72a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.stat-link:hover {
  opacity: 0.8;
}

/* ===== Primary CTAs ===== */
.dashboard-primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.2s;
  min-height: 72px;
  border: none;
  cursor: pointer;
}

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

.btn-primary i {
  font-size: 1.4rem;
}

.btn-rate {
  background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-rate:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-nearby {
  background: linear-gradient(135deg, #855a1f 0%, #a67c3d 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(133, 90, 31, 0.3);
}

.btn-nearby:hover {
  box-shadow: 0 6px 20px rgba(133, 90, 31, 0.4);
}

/* ===== Secondary Actions ===== */
.dashboard-secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.btn-secondary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  min-height: 60px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary i {
  font-size: 1.2rem;
  color: #ffd27a;
}

/* ===== Pub Pal Section ===== */
.dashboard-pub-pal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pub-pal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pub-pal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  transition: transform 0.2s, border-color 0.2s;
}

.pub-pal-avatar:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.pub-pal-arrow {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
}

.pub-pal-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.pub-pal-status.complete {
  background: #4caf50;
  color: #fff;
}

.pub-pal-status.pending {
  background: #ff9800;
  color: #fff;
}

.pub-pal-text {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin: 0;
}

.pub-pal-text a {
  color: #ffa72a;
  text-decoration: none;
  font-weight: 600;
}

.pub-pal-text a:hover {
  text-decoration: underline;
}

.pub-pal-nudge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  margin: 0 auto;
  transition: all 0.2s;
}

.pub-pal-nudge:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.pub-pal-nudge:active {
  transform: scale(0.98);
}

/* ===== Mobile Optimizations ===== */
@media screen and (max-width: 600px) {
  .user-dashboard {
    padding: 16px;
    border-radius: 16px;
  }
  
  .dashboard-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  
  .dashboard-avatar {
    width: 44px;
    height: 44px;
  }
  
  .dashboard-greeting {
    font-size: 1.1rem;
  }
  
  .hero-stat-number {
    font-size: 2rem;
  }
  
  .hero-stat-label {
    font-size: 0.9rem;
  }
  
  .btn-primary {
    min-height: 68px;
    padding: 14px 10px;
    font-size: 0.9rem;
  }
  
  .btn-primary i {
    font-size: 1.3rem;
  }
  
  .btn-secondary {
    min-height: 56px;
    font-size: 0.7rem;
  }
  
  .btn-secondary i {
    font-size: 1.1rem;
  }
  
  .dashboard-stats-row {
    padding: 10px 0;
  }
  
  .pub-pal-avatar {
    width: 36px;
    height: 36px;
  }
  
  .pub-pal-text {
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 380px) {
  .user-dashboard {
    padding: 14px;
  }
  
  .dashboard-primary-actions {
    gap: 10px;
  }
  
  .btn-primary {
    font-size: 0.85rem;
    min-height: 64px;
    padding: 12px 8px;
  }
  
  .dashboard-secondary-actions {
    gap: 6px;
  }
  
  .btn-secondary {
    min-height: 54px;
    padding: 10px 4px;
  }
}

/* ===== Tablet/Desktop Enhancements ===== */
@media screen and (min-width: 768px) {
  .user-dashboard {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .dashboard-primary-actions {
    gap: 16px;
  }
  
  .btn-primary {
    min-height: 80px;
    font-size: 1rem;
  }
  
  .btn-primary i {
    font-size: 1.6rem;
  }
  
  .dashboard-secondary-actions {
    gap: 12px;
  }
  
  .btn-secondary {
    min-height: 64px;
    font-size: 0.8rem;
  }
  
  .btn-secondary i {
    font-size: 1.3rem;
  }
}

/* ===== Dark Mode Support (if applicable) ===== */
body.dark .user-dashboard {
  background: linear-gradient(135deg, rgba(30, 24, 21, 0.98) 0%, rgba(20, 16, 14, 0.99) 100%);
  border-color: rgba(255, 167, 42, 0.15);
}

body.dark .btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
