/**
 * Talent Directory Dark Mode Styles
 * Used to apply dark theme to the talent directory pages
 */

/* === Dark Theme Global Variables === */
:root {
  --dark-bg: #121212;
  --dark-bg-secondary: rgba(30, 30, 30, 0.7);
  --dark-card-bg: #000000;
  --dark-text: #FFFFFF;
  --dark-text-secondary: rgba(255, 255, 255, 0.7);
  --dark-border: rgba(255, 255, 255, 0.1);
  --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  --dark-accent: var(--color-primary);
  --dark-accent-light: rgba(236, 27, 97, 0.3);
  --dark-gradient: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(225, 6, 107, 0.5) 100%);
}

/* === Background and Base Styling === */
body.page-talent-directory,
body.post-type-archive-talent,
body.single-talent,
body.tax-talent_category {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

/* === Page Header Styling === */
.cfv-header-section .cfv-page-title .title-dark {
  color: var(--dark-text) !important;
}

.cfv-header-section .cfv-page-title .title-primary {
  color: var(--dark-accent);
}

.talent-description {
  color: var(--dark-text-secondary);
  background-color: var(--dark-bg-secondary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--dark-shadow);
}

/* === Talent Card Styling === */
.talent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1rem 0;
  max-width: 100%;
}

.talent-card,
.talent-carousel-section .talent-card,
.talent-slider .talent-card,
body .talent-card {
  max-width: 100%;
  width: 100%;
  background-color: #000000 !important; /* Pure black with !important */
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.1) !important; /* Subtle white border */
}

/* Remove underlines from talent card links */
.talent-card a,
.talent-card a:hover,
.talent-card a:focus,
.talent-card-link,
.talent-card-link:hover,
.talent-card-link:focus {
  text-decoration: none !important;
  border-bottom: none !important;
}

.talent-card:hover,
.talent-carousel-section .talent-card:hover,
.talent-slider .talent-card:hover,
body .talent-card:hover {
  transform: translateY(-4px);
  background-color: #121212 !important; /* Slightly lighter black on hover */
  border-color: rgba(255, 255, 255, 0.2) !important; /* Subtle white border on hover */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important; /* More pronounced shadow */
}

.talent-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.talent-name {
  font-size: 1.2rem;
  font-family: var(--font-body);
  color: var(--dark-text);
  margin: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.talent-card:hover .talent-name {
  color: var(--dark-accent);
}

/* === Single Talent Page Styling === */
.talent-profile {
  background-color: var(--dark-bg-secondary);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--dark-shadow);
}

.talent-header-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  margin-bottom: 30px;
  height: 450px; /* Fixed height for the row */
  width: 100%; /* Full width */
  box-sizing: border-box; /* Include padding in width */
  max-width: 100%; /* Prevent overflow */
  overflow: hidden; /* Hide overflow */
}

.talent-image-container {
  flex: 1 1 65%;
  max-width: 65%;
  height: 450px; /* Fixed height matching the row */
}

.talent-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--dark-shadow);
  display: block;
}

.talent-info-block {
  flex: 1 1 30%;
  background-color: #000000; /* Pure black */
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--dark-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.talent-info-block h1 {
  color: var(--dark-accent);
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 10px;
}

.talent-stats-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.talent-stats-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dark-border);
}

.talent-stats-list li:last-child {
  border-bottom: none;
}

.talent-stats-list li strong {
  color: var(--dark-accent);
  margin-right: 10px;
}

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

.talent-info-block .talent-meta-tags {
  margin-top: 15px;
}

.talent-meta-tags a {
  display: inline-block;
  background-color: var(--dark-accent-light);
  color: #000000;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.talent-meta-tags a:hover {
  background-color: var(--dark-accent);
  color: var(--dark-accent);
}

.talent-categories-inner .talent-meta-tags a {
  font-size: 0.95rem;
  padding: 6px 14px;
  background-color: rgba(236, 27, 97, 0.2); /* Slightly more vibrant */
  border: 1px solid rgba(236, 27, 97, 0.4);
  transition: all 0.2s ease;
  color: #000000;
}

.talent-categories-inner .talent-meta-tags a:hover {
  background-color: rgba(236, 27, 97, 0.8);
  color: var(--dark-accent);
  transform: translateY(-1px);
}

.talent-bio-block {
  background-color: #000000;
  border-radius: 10px;
  padding: 25px;
  margin-top: 0;
  box-shadow: var(--dark-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.talent-bio-heading,
.talent-stats-heading {
  color: var(--dark-accent);
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 10px;
}

.talent-bio-content {
  color: var(--dark-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  position: relative;
}

/* Truncated bio - simple 10 line limit */
.talent-bio-content.truncated {
  max-height: 16.5em; /* Approximately 10 lines at 1.7 line-height */
  overflow: hidden;
}

/* === Talent Request Form === */
.talent-request-form {
  flex: 1 1 30%;
  max-width: 30%;
  background-color: #000000;
  border-radius: 10px;
  padding: 0; /* No padding on container */
  box-shadow: var(--dark-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 450px; /* Fixed height matching the image container */
  box-sizing: border-box; /* Include padding in the height calculation */
  overflow: hidden !important; /* Force hide any overflow content */
  position: relative; /* For positioning inner form */
  display: flex; /* Add flex display */
  max-width: 30%; /* Maintain max width */
  min-width: 0; /* Allow container to shrink if needed */
}

/* Fix for the form wrapper */
.cfv-request-form-wrap {
  width: 100%; /* Full width */
  height: 410px; /* Slightly shorter than container to prevent overflow */
  display: flex;
  flex-direction: column;
  margin: 0; /* Remove any default margins */
  padding: 0; /* Remove any default padding */
  box-sizing: border-box; /* Include padding in height */
  overflow-y: auto; /* Allow scrolling if error messages make content too tall */
  overflow-x: hidden; /* Prevent horizontal overflow */
  position: relative; /* Enable absolute positioning of child elements */
}

/* Fix for the inner form content */
.talent-request-form .cfv-request-form {
  display: flex;
  flex-direction: column;
  box-sizing: border-box; /* Include padding in height calculation */
  height: 100%;
  max-height: 450px; /* Match container height exactly */
  overflow: hidden; /* Prevent overflow in all directions */
  padding: 20px; /* Add 20px padding as requested */
  margin: 0; /* Remove margins completely */
  max-width: 100%; /* Prevent horizontal overflow */
  width: 100%; /* Full width */
}

.talent-request-form h3 {
  color: var(--dark-accent);
  font-size: 0.95rem; /* Even smaller heading */
  margin-top: 0;
  margin-bottom: 4px; /* Minimal margin */
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 3px; /* Minimal padding */
  text-align: center;
  box-sizing: border-box; /* Include padding in height */
}

.talent-request-form label {
  font-size: 0.8rem; /* Smaller label text */
  margin-bottom: 3px; /* Reduced margin */
  display: block;
  color: var(--dark-text-secondary);
}

.talent-request-form input,
.talent-request-form textarea,
.talent-request-form select {
  background-color: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--dark-border);
  color: var(--dark-text);
  padding: 4px 8px; /* Minimal padding */
  border-radius: 5px;
  width: 100%;
  max-width: 100%; /* Ensure no horizontal overflow */
  margin-bottom: 4px; /* Minimal margin */
  font-size: 0.8rem; /* Smaller font */
  box-sizing: border-box; /* Include padding in height */
  height: auto; /* Natural height */
  overflow: hidden; /* Prevent text overflow */
  text-overflow: ellipsis; /* Add ellipsis for overflowing text */
}

.talent-request-form textarea {
  height: 85px; /* Increased height by 40px */
  resize: none; /* Prevent resizing */
  min-height: 85px; /* Enforce minimum height */
  margin-top: 0; /* No top margin */
  margin-bottom: 5px; /* Small bottom margin */
  box-sizing: border-box; /* Include padding in height */
  max-width: 100%; /* Prevent horizontal overflow */
  width: 100%; /* Full width */
  display: block; /* Block display to control width */
}

.talent-request-form input:focus,
.talent-request-form textarea:focus,
.talent-request-form select:focus {
  border-color: var(--dark-accent);
  outline: none;
}

.talent-request-form .cfv-request-button {
  background-color: var(--dark-accent);
  color: white !important; /* Ensure text color */
  border: none;
  padding: 5px 15px; /* Minimal vertical padding */
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 0; /* No top margin */
  margin-bottom: 0; /* No bottom margin */
  width: 100%; /* Full width button */
  font-size: 0.85rem; /* Smaller font */
  line-height: 1.2;
  display: block;
  text-align: center;
  position: relative; /* Ensure visibility */
  z-index: 5; /* Higher z-index to prevent hiding */
  box-sizing: border-box; /* Include padding in height */
}

.talent-request-form .cfv-request-button:hover {
  background-color: #d6105a;
}

/* Navigation buttons removed */

/* Talent Navigation Buttons */
.talent-navigation {
  margin-top: 15px;
  padding: 0 20px 20px;
}

.talent-nav-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.talent-nav-button {
  display: inline-block;
  background-color: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--dark-border);
  color: var(--dark-text);
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talent-nav-button:hover {
  background-color: var(--dark-accent);
  color: white;
  border-color: var(--dark-accent);
}

.nav-arrow {
  display: inline-block;
  font-weight: bold;
}

.prev-talent .nav-arrow {
  margin-right: 5px;
}

.next-talent .nav-arrow {
  margin-left: 5px;
}

/* Fix the row that contains the name and email inputs */
.talent-request-form .cfv-request-row {
  display: flex;
  flex-direction: column;
  gap: 5px; /* Smaller gap */
  margin-bottom: 5px; /* Smaller margin */
  width: 100%; /* Full width */
  box-sizing: border-box; /* Include padding in width */
  max-width: 100%; /* Prevent horizontal overflow */
  overflow: hidden; /* Prevent overflow */
}

/* Success/Error messages styling - Global and form-specific */
.cfv-success-message,
.cfv-error-message,
.talent-request-form .cfv-success-message,
.talent-request-form .cfv-error-message {
  margin: 10px 0;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  font-family: var(--font-body, 'Futura', 'Trebuchet MS', 'Outfit', sans-serif);
  box-sizing: border-box;
  max-width: 100%;
  word-wrap: break-word;
  line-height: 1.4;
  display: block;
  clear: both;
}

.cfv-success-message,
.talent-request-form .cfv-success-message {
  background-color: rgba(39, 174, 96, 0.2);
  border: 1px solid rgba(39, 174, 96, 0.5);
  color: #2ecc71;
}

.cfv-error-message,
.talent-request-form .cfv-error-message {
  background-color: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.5);
  color: #e74c3c;
}

/* Ensure error messages in small containers have proper spacing */
.talent-request-form .cfv-success-message,
.talent-request-form .cfv-error-message {
  margin: 5px 0;
  padding: 6px 10px;
  font-size: 0.8rem;
}

/* === Categories & Tags Section === */
.talent-categories-inner {
  margin-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.talent-categories-heading {
  color: var(--dark-accent);
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 15px;
  font-family: var(--font-heading, 'Outfit', 'Futura', 'Trebuchet MS', sans-serif);
}

.talent-categories-inner .talent-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

/* === Gallery Section === */
.talent-gallery-section {
  margin-top: 40px;
  background-color: #000000;
  border-radius: 10px;
  padding: 25px;
  box-shadow: var(--dark-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-heading {
  color: var(--dark-accent);
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 10px;
}

.spmgmt-talent-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.spmgmt-gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--dark-shadow);
  aspect-ratio: 1;
  background-color: #1a1a1a;
}

.spmgmt-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.spmgmt-gallery-item:hover img {
  transform: scale(1.05);
}

.spmgmt-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.spmgmt-gallery-overlay .dashicons {
  font-size: 36px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.spmgmt-gallery-item:hover .spmgmt-gallery-overlay {
  opacity: 1;
}

/* Responsive gallery grid */
@media (max-width: 1024px) {
  .spmgmt-talent-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .spmgmt-talent-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .spmgmt-talent-gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* === Videos/Products Section === */
.talent-videos-section {
  margin-top: 40px;
  background-color: #000000;
  border-radius: 10px;
  padding: 25px;
  box-shadow: var(--dark-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.similar-talent-section {
  margin-top: 40px;
  background-color: #000000;
  border-radius: 10px;
  padding: 25px 25px 40px 25px; /* Extra bottom padding */
  box-shadow: var(--dark-shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Compact talent grid for talent directory section */
.talent-grid-small {
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-bottom: 0;
}

.talent-grid-small .talent-card {
  margin-bottom: 15px;
}

.talent-grid-small .talent-card img {
  height: 160px;
}

.talent-grid-small .talent-name {
  font-size: 0.9rem;
  padding: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talent-videos-heading {
  color: var(--dark-accent);
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--dark-border);
  padding-bottom: 10px;
}

.talent-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.talent-video-card {
  background-color: var(--dark-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--dark-shadow);
  transition: transform 0.3s ease;
}

.talent-video-card:hover {
  transform: translateY(-5px);
}

.talent-video-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* .talent-video-title { - moved to typography.css */
  padding: 12px;
  color: var(--dark-text);
  font-size: 1rem;
  margin: 0;
  text-align: center;
}

/* === Responsive Adjustments === */
@media (max-width: 991px) {
  .talent-header-row {
    flex-direction: column;
    height: auto; /* Reset fixed height on tablets */
  }

  .talent-image-container,
  .talent-request-form {
    flex: 1 1 100%;
    max-width: 100%;
    height: auto; /* Reset fixed heights */
  }
  
  .talent-image-container {
    height: 400px; /* Fixed height for image on tablets */
  }
  
  .talent-request-form {
    margin-top: 30px;
    height: auto; /* Auto height for form on tablets */
  }
  
  .talent-image-container img {
    max-height: 400px; /* Cap image height on tablets */
    object-fit: cover; /* Cover the container */
  }
  
  .talent-info-block,
  .talent-bio-block {
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: 30px;
  }
  
  .talent-grid-small {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .talent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .talent-grid-small {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .talent-card img,
  .talent-grid-small .talent-card img {
    height: 200px;
  }
  
  .spmgmt-talent-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .talent-details-row {
    flex-direction: column;
  }
  
  .talent-bio-block {
    margin-top: 30px;
  }
  
  .talent-image-container img {
    max-height: 350px; /* Slightly shorter on medium screens */
  }
  
  /* Compact form on mobile */
  .talent-request-form {
    padding: 0;
    height: auto; /* Allow flexible height on mobile */
    min-height: 300px; /* Set a reasonable minimum height */
  }
  
  /* Mobile navigation buttons */
  .talent-nav-table {
    width: 100% !important;
    margin-top: 10px !important;
  }
  
  .talent-nav-mini-btn {
    min-width: 50px;
    padding: 6px 8px;
    font-size: 0.75rem;
  }
  
  .talent-request-form h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }
  
  .cfv-request-form-wrap {
    height: auto; /* Auto height on mobile */
    min-height: 280px; /* Slightly smaller to prevent scrolling */
    width: 100%;
  }
  
  .talent-request-form .cfv-request-form {
    flex: 1; /* Take all available space */
    padding: 20px; /* Maintain 20px padding on mobile */
  }
  
  .talent-request-form input,
  .talent-request-form select {
    padding: 5px 8px;
    margin-bottom: 5px;
  }
  
  .talent-request-form textarea {
    height: 50px;
    min-height: 50px;
  }
  
  .talent-request-form .cfv-request-button {
    padding: 6px 12px;
    margin-top: 0;
    font-size: 0.85rem;
  }
  
  /* Adjust navigation for mobile */
  .talent-navigation {
    padding: 0 15px 15px;
    margin-top: 10px;
  }
  
  .talent-nav-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .talent-nav-button {
    width: 100%;
    padding: 8px 10px;
  }
}

@media (max-width: 576px) {
  .talent-grid {
    grid-template-columns: 1fr;
  }
  
  .talent-grid-small {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .talent-card {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .talent-grid-small .talent-card {
    max-width: none;
    margin: 0;
  }
  
  .talent-card img {
    height: 250px;
  }
  
  .talent-grid-small .talent-card img {
    height: 150px;
  }
  
  .spmgmt-talent-gallery {
    grid-template-columns: 1fr;
  }
  
  .talent-videos-grid {
    grid-template-columns: 1fr;
  }
}
}