/**
 * Pages Modern UI - Professional, brand-focused, business-ready design
 * Polished creator/business hub aesthetic
 */

/* ============================================ */
/* PAGE PROFILE HEADER - Professional Brand Hub */
/* ============================================ */
.page-detail-header {
  background: var(--bg-primary);
  border-radius: 0;
  margin-bottom: 16px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.page-cover {
  position: relative;
  width: 100%;
  height: 350px;
  background: linear-gradient(135deg, var(--sphere-blue) 0%, var(--sphere-purple) 100%);
  background-size: cover;
  background-position: center;
  border-radius: 0;
  overflow: hidden;
}

.page-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.15) 100%);
  z-index: 1;
  pointer-events: none;
}

.page-profile-info {
  position: relative;
  padding: 0 24px 20px 24px;
  margin-top: -60px;
  z-index: 10;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.page-avatar-section {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.page-detail-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sphere-blue), var(--sphere-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
  font-weight: 700;
  border: 5px solid var(--bg-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.page-detail-avatar:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(8, 145, 178, 0.3);
  border-color: var(--accent);
}

.page-title-section {
  flex: 1;
  padding-top: 50px;
  min-width: 0;
}

.page-title-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text-primary);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-verification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.page-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.page-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(147, 51, 234, 0.1));
  border: 1px solid rgba(8, 145, 178, 0.3);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sphere-blue);
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.page-category-badge:hover {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(147, 51, 234, 0.15));
  border-color: rgba(8, 145, 178, 0.5);
  transform: translateY(-1px);
}

.page-meta-sep {
  color: var(--border-primary);
  font-weight: 300;
}

.page-profile-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 18px 0;
  line-height: 1.6;
  max-width: 700px;
}

.page-profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================ */
/* CTA BUTTON - Professional Call-to-Action */
/* ============================================ */
.page-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--sphere-blue), var(--sphere-purple));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.35);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.page-cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.page-cta-button:hover::before {
  left: 100%;
}

.page-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.45);
}

.page-cta-button:active {
  transform: translateY(0);
}

.page-cta-button svg {
  width: 18px;
  height: 18px;
}

/* ============================================ */
/* PAGE TABS NAVIGATION - Professional Brand Menu */
/* ============================================ */
.page-tabs-nav {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-primary);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  max-width: 1100px;
  margin: 0 auto;
}

.page-detail-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-detail-tabs::-webkit-scrollbar {
  display: none;
}

.page-detail-tabs .tab {
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.page-detail-tabs .tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sphere-blue), var(--sphere-purple));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.page-detail-tabs .tab:hover {
  background: rgba(8, 145, 178, 0.05);
  color: var(--text-primary);
}

.page-detail-tabs .tab.active {
  color: var(--sphere-blue);
  border-bottom-color: transparent;
}

.page-detail-tabs .tab.active::after {
  width: 100%;
}

/* ============================================ */
/* ABOUT SECTION - Enhanced */
/* ============================================ */
.page-about-section {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.page-about-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.page-info-grid {
  display: grid;
  gap: 16px;
}

.page-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: 8px;
  transition: background 0.2s;
}

.page-info-item:hover {
  background: var(--bg-tertiary);
}

.page-info-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.page-info-content {
  flex: 1;
}

.page-info-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================ */
/* REVIEWS & RATINGS */
/* ============================================ */
.page-reviews-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-primary);
}

.page-reviews-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.page-rating-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin: 16px;
}

.page-rating-score {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-rating-stars {
  display: flex;
  gap: 4px;
  font-size: 24px;
  color: #fbbf24;
  margin-bottom: 8px;
}

.page-rating-count {
  font-size: 14px;
  color: var(--text-muted);
}

.page-reviews-list {
  padding: 16px;
}

.page-review-item {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 12px;
}

.page-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.page-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.page-review-author {
  flex: 1;
}

.page-review-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.page-review-date {
  font-size: 13px;
  color: var(--text-muted);
}

.page-review-rating {
  display: flex;
  gap: 2px;
  font-size: 16px;
  color: #fbbf24;
  margin-bottom: 8px;
}

.page-review-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================ */
/* MEDIA GALLERY (Pages) */
/* ============================================ */
.page-media-gallery {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* ============================================ */
/* BUSINESS HOURS DISPLAY */
/* ============================================ */
.page-hours-grid {
  display: grid;
  gap: 8px;
}

.page-hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 14px;
}

.page-hours-day {
  font-weight: 600;
  color: var(--text-primary);
}

.page-hours-time {
  color: var(--text-secondary);
}

.page-hours-open {
  color: #22c55e;
  font-weight: 600;
}

.page-hours-closed {
  color: var(--text-muted);
}

/* ============================================ */
/* CONTACT INFO */
/* ============================================ */
.page-contact-grid {
  display: grid;
  gap: 12px;
}

.page-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.page-contact-item:hover {
  background: var(--bg-tertiary);
}

.page-contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.page-contact-details {
  flex: 1;
}

.page-contact-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.page-contact-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================ */
/* MOBILE RESPONSIVE - Optimized for Touch */
/* ============================================ */
@media (max-width: 768px) {
  .page-cover {
    height: 220px;
  }

  .page-detail-avatar {
    width: 110px;
    height: 110px;
    font-size: 2.5rem;
    border-width: 4px;
  }

  .page-title-section {
    padding-top: 30px;
  }

  .page-title-section h1 {
    font-size: 1.5rem;
  }

  .page-verification-badge {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .page-profile-info {
    padding: 0 16px 16px 16px;
    margin-top: -45px;
  }

  .page-avatar-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-tabs-nav {
    padding: 0 16px;
  }

  .page-detail-tabs .tab {
    padding: 14px 18px;
    font-size: 14px;
  }

  .page-cta-button {
    padding: 10px 20px;
    font-size: 14px;
  }

  .page-category-badge {
    padding: 5px 12px;
    font-size: 12px;
  }

  .page-rating-summary {
    flex-direction: column;
    text-align: center;
  }

  .page-media-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .page-cover {
    height: 180px;
  }

  .page-detail-avatar {
    width: 90px;
    height: 90px;
    font-size: 2rem;
  }

  .page-title-section h1 {
    font-size: 1.3rem;
  }

  .page-profile-info {
    padding: 0 12px 12px 12px;
    margin-top: -35px;
  }

  .page-detail-tabs .tab {
    padding: 12px 14px;
  }
}

/* ============================================ */
/* EMPTY STATES */
/* ============================================ */
.page-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.page-empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.page-empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-secondary);
}

.page-empty-state p {
  font-size: 14px;
  margin: 0 0 20px 0;
  color: var(--text-muted);
}

/* ============================================ */
/* ENHANCED PAGE TAB CONTENT STYLING */
/* ============================================ */
.page-detail-tab-contents {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-detail-tab-content {
  animation: fadeInTab 0.25s ease;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced metric cards with hover */
.page-detail-tab-content .metric-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-primary);
}

.page-detail-tab-content .metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Page cover edit button */
.page-cover-edit-btn {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Tab content cards */
.page-detail-tab-content .about-info-grid > div {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-primary);
  transition: background 0.15s;
}

.page-detail-tab-content .about-info-grid > div:hover {
  background: var(--bg-tertiary);
}

/* Messages tab conversations hover effect */
.page-messages-inbox-container > div:first-child {
  border-radius: 12px 12px 0 0;
}

.page-messages-inbox-container > div:last-child {
  border-radius: 0 0 12px 12px;
  border-bottom: none !important;
}

/* Page detail tabs - flex items for icons */
.page-detail-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-detail-tabs .tab svg {
  flex-shrink: 0;
}
