/* ============================================================================
   ITMZZ Service Marketplace - Talent Profile Page Styles
   Uses design tokens from general-styles.css
   ============================================================================ */

/* Talent Profile Page Styles */
/* Uses design tokens from general-styles.css */

.profile-header {
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  padding: 0;
}

.profile-header::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
}

.profile-header.has-banner .profile-header-inner {
  padding: 32px var(--card-padding) var(--card-padding);
}

.profile-header.no-banner .profile-header-inner {
  padding: var(--card-padding);
}

.profile-banner {
  height: 240px;
  background: var(--gradient-primary);
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
}

.profile-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--gradient-primary);
  opacity: 0.92;
  z-index: 0;
}

.profile-banner[style] {
  background-image: var(--profile-banner-image, none);
}

.profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.75) 100%);
  z-index: 1;
}

.profile-banner-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.profile-banner-placeholder i {
  font-size: 1.6rem;
}

.profile-header-inner {
  position: relative;
  z-index: 3;
  margin-top: -120px;
}

.profile-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.profile-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4);
  background: rgba(15, 23, 42, 0.65);
  padding: 8px 16px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  display: inline-block;
}

.profile-avatar-wrapper {
  text-align: center;
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary-blue);
  object-fit: cover;
  margin-top: -20px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

.profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--gradient-dark);
}

.profile-info .section-title {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
  background: rgba(15, 23, 42, 0.7);
  padding: 10px 18px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  display: inline-block;
}

.profile-subtitle {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
}

.profile-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 1rem;
}

.profile-rating .rating-stars i {
  color: var(--warning);
  margin-right: 2px;
}

.profile-rating .btn-link {
  padding: 0;
  font-size: 0.85rem;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 1rem;
}

.meta-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  align-items: flex-start;
}

.meta-item--placeholder {
  opacity: 0.7;
}

.meta-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.meta-value {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.profile-social a {
  margin-right: 6px;
  margin-bottom: 6px;
}

.profile-actions {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
}

.profile-actions .btn {
  margin-bottom: 10px;
  font-weight: 600;
}

.profile-actions .btn:last-child {
  margin-bottom: 0;
}

.store-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 10px 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-secondary);
}

.metric i {
  color: var(--primary-blue);
}

/* Stats Grid */
.profile-stats {
  margin-top: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 16px 14px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-xs);
  text-align: center;
  position: relative;
  border: 1px solid var(--border-light);
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary-blue);
  font-size: 1.2rem;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card[data-toggle="tooltip"] {
  cursor: help;
}

/* About Section */
.about-section {
  margin-top: 25px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.section-heading {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 160px;
  overflow: hidden;
  position: relative;
}

.about-content.expanded {
  max-height: none;
}

.about-gradient-fade {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-card));
  pointer-events: none;
}

.toggle-about {
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Skills */
.skills-section {
  margin-top: 25px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: var(--gradient-primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Service / Proposal Cards - Minimal non-conflicting styles */
.card--compact {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  background: var(--bg-card);
}

.badge-primary {
  background: var(--primary-blue);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
}


/* Tips Section */
.tips-section {
  padding: 20px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

.tip-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tip-item i {
  color: var(--primary-blue);
}

/* Sticky Action Bar (Mobile) */
.sticky-action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 8px 12px;
  display: none;
  z-index: 400;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.sticky-action-bar .btn {
  flex: 1;
  margin: 0 4px;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .sticky-action-bar {
    display: flex;
  }

  .profile-actions {
    display: none;
  }
}

/* Unified Thumb Styling - Minimal enhancements only */
.unified-thumb {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.unified-thumb .image img {
  transition: transform 0.4s ease;
}

.unified-thumb:hover .image img {
  transform: scale(1.04);
}

.unified-thumb .caption p.desc-trunc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  margin-bottom: 8px;
  min-height: 40px;
}

.proposed-thumb {
  border-color: var(--accent-success);
}

.proposed-thumb .proposed-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-success);
  color: #fff;
  padding: 3px 7px;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 3px;
  text-transform: uppercase;
}

.proposed-thumb .request-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 0.6rem;
}

.portfolio-thumb {
  border-color: var(--primary-blue);
}

.portfolio-title {
  margin: 0;
  color: var(--text-primary);
}

.portfolio-subtitle {
  color: var(--text-muted);
  margin: 5px 0 0 0;
}

/* Grid Layout Fix */
.product-grid-row {
  display: flex;
  flex-wrap: wrap;
}

.product-grid-row::before,
.product-grid-row::after {
  display: none;
  /* Disable Bootstrap clearfix pseudo-elements for flex container */
}

.product-grid-row>.product-layout {
  margin-bottom: 20px;
  /* Add vertical spacing between rows */
  display: flex;
  /* Ensure the column itself is a flex container so the card can fill height */
  flex-direction: column;
}

.unified-thumb {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Fill the column height */
  padding-bottom: 0 !important;
  /* Force remove bottom padding */
  border: 1px solid var(--border-light);
  /* Ensure border is on the thumb */
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  /* Ensure content doesn't overflow border radius */
  background: var(--bg-card);
}

.thumb-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.unified-thumb .caption {
  flex-grow: 1;
  /* Push button group to bottom */
  display: flex;
  flex-direction: column;
  padding: 10px 15px;
  /* Add padding to caption content */
}

.unified-thumb .caption p.desc-trunc {
  margin-bottom: auto;
  /* Push price to bottom of caption if needed */
}

.unified-thumb .button-group {
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-secondary);
  display: flex;
  width: 100%;
  margin: 0;
  /* Remove default margins */
}

.unified-thumb .button-group button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  color: var(--text-secondary);
  transition: color 0.2s, background-color 0.2s;
  outline: none;
}

.unified-thumb .button-group button:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--primary-blue);
}

.unified-thumb .button-group button+button {
  border-left: 1px solid var(--border-light);
}

/* Quick Edit Link */
.quick-edit-link {
  font-size: 0.65rem !important;
  padding: 4px 8px !important;
  margin-top: 4px;
  opacity: 0.8;
}

.quick-edit-link:hover {
  opacity: 1;
}

/* Proposal Status Badges */
.proposed-thumb .proposed-badge.status-draft {
  background: var(--bg-warning);
  color: var(--text-primary);
}

.proposed-thumb .proposed-badge.status-submitted {
  background: var(--primary-blue);
}

.proposed-thumb .proposed-badge.status-in_review {
  background: var(--bg-info);
}

.proposed-thumb .proposed-badge.status-published {
  background: var(--accent-success);
}

.proposed-thumb .proposed-badge.status-rejected {
  background: var(--bg-danger);
}

/* Responsive */
@media (max-width: 992px) {
  .profile-header-inner {
    margin-top: -100px;
  }

  .profile-avatar {
    margin-top: -10px;
  }

  .profile-actions {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .profile-avatar {
    margin-top: -20px;
    width: 100px;
    height: 100px;
  }

  .profile-header .section-title {
    font-size: 1.4rem;
  }

  .profile-kicker-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-header-inner {
    margin-top: -70px;
  }

  .profile-actions {
    padding: 14px;
  }

  .profile-meta-grid {
    grid-template-columns: 1fr;
  }

  .about-section,
  .skills-section {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .profile-banner {
    height: 200px;
  }

  .profile-avatar {
    width: 90px;
    height: 90px;
    border-width: 3px;
  }

  .profile-actions {
    padding: 12px;
  }
}