/* ═══════════════════════════════════════════════════════════════
   Shared styles for public pages (sole trader + company)
   Used by: public_profile.html, public_company.html
   ═══════════════════════════════════════════════════════════════ */

/* ── Wrapper ── */
.pp-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: var(--font-family, sans-serif);
}

.pp-grid {
  align-items: flex-start;
}

/* ── Sticky left column ── */
.pp-left-col {
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

/* ── Generic card ── */
.pp-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: visible;
}

/* ── Header card ── */
.pp-header-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  overflow: visible;
}

/* Top row */
.pp-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 2rem;
  overflow: visible;
  position: relative;
}

.pp-social-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pp-social-link {
  color: #282D3B;
  font-size: 1.3rem;
  transition: opacity 0.2s;
  text-decoration: none;
}

.pp-social-link:hover { opacity: 0.65; }

.pp-verified-badge {
  width: 1.5rem;
  height: 1.5rem;
}

/* Verified badge tooltip */
.pp-verified-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.pp-verified-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 220px;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
}

.pp-verified-wrapper:hover .pp-verified-tooltip,
.pp-verified-tooltip.pp-verified-tooltip--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.pp-verified-tooltip-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #282D3B;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.pp-verified-tooltip-item {
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.pp-verified-tooltip-item:last-child { margin-bottom: 0; }

.pp-verified-tooltip-item strong { color: #667eea; }

/* Click overlay to close tooltip on mobile */
.pp-verified-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  display: none;
}

.pp-verified-overlay.pp-verified-overlay--visible { display: block; }

/* Centre */
.pp-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.pp-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  object-fit: cover;
}

.pp-avatar-placeholder {
  background: #667eea;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pp-display-name {
  margin: 0.75rem 0 0;
  font-size: 1.75rem;
  font-weight: bold;
  color: #282D3B;
  text-align: center;
}

.pp-contacts {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #282D3B;
  text-align: center;
}

/* Bottom row */
.pp-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2rem;
  margin-top: 0.75rem;
}

.pp-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #282D3B;
  font-size: 1.1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
  text-decoration: none;
}

.pp-icon-btn:hover { background: rgba(0,0,0,0.06); }

.pp-icon-btn:disabled { opacity: 0.4; cursor: default; }

/* Owner notice */
.pp-owner-notice {
  background: #fff3cd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #856404;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Publications placeholder */
.pp-pub-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #bbb;
}

/* Author pages dropdown (article detail sidebar) */
.pp-profile-dropdown {
  position: relative;
}

.pp-profile-dropdown-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}

.pp-profile-dropdown-menu.pp-profile-dropdown-menu--visible {
  display: block;
}

.pp-profile-dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #282D3B;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.pp-profile-dropdown-item:last-child {
  border-bottom: none;
}

.pp-profile-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Section title */
.pp-section-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
}

.pp-title-icon { margin-right: 0.5rem; }

.pp-icon-accent { color: #667eea; }

.pp-icon-red { color: #e11d48; }

/* Section header with slider buttons */
.pp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pp-slider-btns {
  display: flex;
  gap: 0.25rem;
}

.pp-slider-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pp-slider-btn:hover { background: rgba(0,0,0,0.06); }

.pp-slider-btn:disabled { opacity: 0.35; cursor: default; }

/* Service card */
.pp-service-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  height: 100%;
  background: #fafafa;
}

.pp-svc-name {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.pp-svc-price {
  color: #667eea;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.pp-svc-unit {
  font-size: 0.85rem;
  color: #888;
  font-weight: 400;
}

.pp-svc-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

/* Placeholder blocks */
.pp-placeholder {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: #aaa;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pp-placeholder-sm { min-height: 150px; }

.pp-add-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid #667eea;
  border-radius: 6px;
  color: #667eea;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}

.pp-add-link:hover { background: #667eea; color: #fff; }

/* Company detail row (used on company page) */
.pp-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: #444;
  font-size: 0.95rem;
}

.pp-detail-icon {
  color: #888;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Responsive: remove sticky on small screens */
@media (max-width: 991px) {
  .pp-left-col { position: static; }
}

/* ── Sticky Share Sidebar ── */
.pp-share-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-100%);
  background: #fff;
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  z-index: 1050;
  transition: transform 0.3s ease;
}

.pp-share-icons-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.pp-share-sidebar--visible {
  transform: translateY(-50%) translateX(0);
}

.pp-share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.pp-share-item:hover {
  background: #f3f4f6;
  transform: scale(1.05);
}

.pp-share-item i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.pp-share-item .pp-share-label {
  font-size: 0.65rem;
  color: #666;
  font-weight: 500;
}

.pp-share-system  { color: #667eea; }

.pp-share-whatsapp { color: #25d366; }

.pp-share-facebook { color: #1877f2; }

.pp-share-twitter  { color: #1da1f2; }

.pp-share-telegram { color: #0088cc; }

.pp-share-linkedin { color: #0a66c2; }

.pp-share-copy     { color: #282D3B; }

.pp-share-item.pp-share-hidden { display: none; }

.pp-share-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #999;
  margin-top: 0.5rem;
  transition: background 0.15s, color 0.15s;
}

.pp-share-close:hover { background: #f3f4f6; color: #333; }

.pp-share-close i { font-size: 1.1rem; }

.pp-share-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.pp-share-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* QR Code container — desktop: QR on right of icons */
.pp-qrcode-container {
  order: 1;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
}

.pp-qrcode-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pp-qrcode-wrapper canvas {
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.pp-qrcode-canvas-wrap {
  position: relative;
  display: inline-flex;
  line-height: 0;
}

.pp-qrcode-label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  text-align: center;
}

/* Mobile — QR at top, icons in horizontal row */
@media (max-width: 576px) {
  .pp-share-sidebar {
    flex-direction: column !important;
    align-items: center;
    padding: 1.5rem 1rem 1rem !important;
    gap: 1rem !important;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    transform: translateY(100%);
    border-radius: 12px 12px 0 0;
  }
  .pp-share-sidebar--visible { transform: translateY(0); }
  .pp-qrcode-container {
    order: -1;
    margin: 0;
    padding: 0 0 1rem 0;
    border-left: none;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    justify-content: center;
  }
  .pp-qrcode-wrapper { gap: 0.75rem; }
  .pp-qrcode-wrapper canvas {
    width: 200px !important;
    height: 200px !important;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  }
  .pp-qrcode-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
  }
  .pp-share-icons-column {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }
  .pp-share-item { width: 64px; height: 64px; }
  .pp-share-close {
    position: absolute;
    top: -40px;
    right: 1rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin: 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
  }
  .pp-share-sidebar--visible .pp-share-close {
    visibility: visible;
    opacity: 1;
  }
}

/* ── Publications Section ── */
.pp-publications-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Detailed TimeSlot Card ── */
.pp-timeslot-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

/* ── Business Support Card Styles for Featured Publication ── */
.pp-publications .job-thumb-box_article {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.pp-publications .job-thumb-box_article:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pp-publications .job-image-box-wrap {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
}

.pp-publications .job-image-box-wrap-info {
  gap: 0.5rem;
}

.pp-publications .badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
}

.pp-publications .badge-level {
  background: #fef3c7;
  color: #92400e;
}

.pp-publications .job-body {
  padding: 1.25rem;
}

.pp-publications .job-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.pp-publications .job-title-link {
  color: #282D3B;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pp-publications .job-title-link:hover {
  color: #667eea;
}

.pp-publications .job-location {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.pp-publications .custom-link {
  color: #667eea;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: color 0.2s ease;
}

.pp-publications .custom-link:hover {
  color: #5a67d8;
}

/* Additional detail items for all card types */
.pp-card-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* ── React Publication Card Wrapper ── */
.pp-react-card-wrapper {
  position: relative;
  width: 100%;
}

.react-publication-mount {
  min-height: 200px; /* Reserve space while loading */
}

/* SEO fallback card */
.pp-fallback-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
}

.pp-fallback-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1f2937;
}

.pp-fallback-card p {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.pp-fallback-card a {
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
}

.pp-fallback-card a:hover {
  color: #5a67d8;
}

/* TimeSlot public card styles moved to timeslot_public_card.css */

/* ═══════════════════════════════════════════════════════════════
   Gallery Grid Styles for Work Examples
   ═══════════════════════════════════════════════════════════════ */

.pp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  gap: 10px;
  margin-top: 1rem;
}

.pp-gallery-item {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f5f5f5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pp-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pp-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive gallery adjustments */
@media (max-width: 768px) {
  .pp-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .pp-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
  }
}