/* cv-detail.php — aktiv "CV Tema" abunəliyi olan istifadəçilər üçün tətbiq olunan stillər.
 * Bütün qaydalar yalnız .cv-themed wrapper-i daxilində işləyir, ona görə temasız CV-lərə
 * heç bir təsiri yoxdur. Faktiki dəyərlər PHP tərəfindən inline CSS dəyişənləri kimi
 * .cv-themed elementinə yazılır (bax: cv-detail.php → $cvThemeStyleVars). */

.cv-themed{
  background: var(--cvt-page-bg, transparent) !important;
  transition: background .2s ease;
  padding-bottom: 60px;
  margin-bottom: -60px;
}
.cv-themed .cv-body{
  padding-top: 32px !important;
  padding-bottom: 24px !important;
}

.cv-themed .cv-hero-header,
.cv-themed .detail-card,
.cv-themed .side-ad{
  background: var(--cvt-card-bg, inherit) !important;
  border-radius: var(--cvt-radius, inherit) !important;
  box-shadow: var(--cvt-shadow, inherit) !important;
}

/* Yan paneldəki reklam kartı (includes/banner-ad.php → .side-ad) digər kartlar kimi
 * temanın fonunu, küncünü və kölgəsini alır (yuxarıdakı qayda). Reklamın öz daxili
 * görünüşü şəbəkədən gəlir və dəyişdirilə bilməz — yalnız çərçivə uyğunlaşdırılır.
 * "Reklam" etiketi temanın mətn rəngindədir ki, tünd temalarda da oxunsun. */
.cv-themed .side-ad-label{
  color: var(--cvt-text, var(--color-ink-faint)) !important;
  opacity: .75;
}
.cv-themed .side-ad-label::before{
  background: var(--cvt-button, var(--color-primary-light)) !important;
}
.cv-themed .side-ad-stage{
  background: linear-gradient(110deg, var(--cvt-button-tint-pale, var(--color-bg-soft)) 30%, transparent 50%, var(--cvt-button-tint-pale, var(--color-bg-soft)) 70%);
  background-size: 220% 100%;
}

.cv-themed .cv-hero-header{
  border-bottom-color: transparent !important;
}

.cv-themed .cv-hero-info,
.cv-themed .detail-card{
  font-family: var(--cvt-font, inherit) !important;
  font-size: var(--cvt-font-size, inherit) !important;
}

.cv-themed .cv-hero-top h1,
.cv-themed .detail-card h2{
  color: var(--cvt-heading, inherit) !important;
}

.cv-themed .cv-hero-info .role-tag,
.cv-themed .detail-card p,
.cv-themed .detail-card li,
.cv-themed .cv-summary-text,
.cv-themed .cv-timeline-item p{
  color: var(--cvt-text, inherit) !important;
}

.cv-themed .cv-hero-actions .btn-primary,
.cv-themed .detail-card .btn-primary{
  background: var(--cvt-button, var(--color-primary)) !important;
  border-color: var(--cvt-button, var(--color-primary)) !important;
}

/* Əlaqə qutuları və stat-pill-lər (yer/təcrübə/maaş/yenilənmə) — temanın düymə rənginə tint verilir.
 * QEYD: color-mix() ƏVƏZİNƏ server tərəfində hesablanmış rgba() dəyərləri istifadə olunur —
 * bəzi mobil brauzerlər color-mix()-i dəstəkləmir və qayda səssizcə işləməyə bilər. */
.cv-themed .stat-row .stat-item .icon-box,
.cv-themed .employer-contact-row{
  background: var(--cvt-button-tint, var(--color-primary-tint)) !important;
}
.cv-themed .cv-hero-stats .stat-item{
  background: var(--cvt-button-tint-pale, var(--color-surface-alt)) !important;
}
.cv-themed .stat-row .stat-item .icon-box,
.cv-themed .employer-contact-icon{
  color: var(--cvt-button, var(--color-primary)) !important;
}
.cv-themed .employer-contact-icon{
  background: #fff !important;
  box-shadow: inset 0 0 0 1.5px var(--cvt-button-tint-soft, var(--color-border-strong)) !important;
}
.cv-themed .employer-contact-row:hover{
  background: var(--cvt-button-tint-strong, var(--color-primary-tint)) !important;
}

/* Baxış/Dostlar sayğacları, bölmə başlığı ikonları (Bacarıqlar, Təcrübə və s.) və bacarıq pill-ləri */
.cv-themed .cv-engagement-icon{
  background: var(--cvt-button-tint, var(--color-primary-tint)) !important;
  color: var(--cvt-button, var(--color-primary-dark)) !important;
  box-shadow: inset 0 0 0 1px var(--cvt-button-tint-soft, var(--color-primary-light)) !important;
}
.cv-themed .cv-section-icon{
  background: var(--cvt-button-tint, var(--color-primary-tint)) !important;
  color: var(--cvt-button, var(--color-primary-dark)) !important;
}
.cv-themed .cv-pill-skill{
  background: var(--cvt-button-tint, var(--color-primary-tint)) !important;
  color: var(--cvt-button, var(--color-primary-dark)) !important;
}
.cv-themed .cv-like-btn:hover{
  background: var(--cvt-button-tint, var(--color-primary-tint)) !important;
  border-color: var(--cvt-button-tint-soft, var(--color-primary-light)) !important;
  color: var(--cvt-button, var(--color-primary-dark)) !important;
}
.cv-themed .cv-like-btn.is-liked{
  background: var(--cvt-button, var(--color-primary)) !important;
}

/* Profil şəkli çərçivəsi və tema/VIP nişanı */
.cv-themed .cv-hero-avatar-wrap{
  position: relative;
}
.cv-themed .cv-hero-avatar{
  position: relative;
  z-index: 1;
}
.cv-themed .cv-verified-badge{
  z-index: 3;
  bottom: -8px !important;
  right: -8px !important;
}
.cv-themed .cvt-frame-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  object-fit: cover;
  z-index: 2;
}
.cv-themed .cvt-badge-img{
  position: absolute;
  top: -8px;
  left: -8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  background: #fff;
  z-index: 4;
  transform: rotate(-18deg);
}

/* Şəklin ətrafında fırlanan emoji (hər kəs görür) */
.cv-orbit-emoji-orbit{
  position: absolute;
  inset: -22px;
  pointer-events: none;
  z-index: 3;
  animation: cvOrbitSpin 6.5s linear infinite;
}
.cv-orbit-emoji{
  position: absolute;
  top: 0;
  left: 50%;
  font-size: 22px;
  line-height: 1;
  transform: translateX(-50%);
  animation: cvOrbitCounterSpin 6.5s linear infinite;
  filter: drop-shadow(0 2px 4px rgba(20,10,12,.28));
}
@keyframes cvOrbitSpin{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
@keyframes cvOrbitCounterSpin{ from{ transform: translateX(-50%) rotate(0deg); } to{ transform: translateX(-50%) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce){
  .cv-orbit-emoji-orbit, .cv-orbit-emoji{ animation: none; }
}

/* Yalnız CV sahibinə görünən "+" düyməsi və emoji seçici */
.cv-orbit-add-btn{
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--cvt-button, var(--color-primary));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 5;
}
.cv-orbit-add-btn:hover{ transform: translateX(-50%) scale(1.08); }
.cv-orbit-picker{
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 20;
  text-align: center;
}
.cv-orbit-picker-title{
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-ink-soft);
}
.cv-orbit-picker-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cv-orbit-picker-grid form{ display: contents; }
.cv-orbit-picker-option{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border);
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.cv-orbit-picker-option:hover{ border-color: var(--cvt-button, var(--color-primary)); transform: translateY(-1px); }
.cv-orbit-picker-option.is-selected{
  border-color: var(--cvt-button, var(--color-primary));
  background: var(--cvt-button-tint, var(--color-primary-tint));
}
.cv-orbit-picker-remove{ margin-top: 10px; }

/* Ad hissəsi üçün animasiyalar (yalnız aktiv CV Tema abunəsi olan CV sahibi seçə bilər) */
.cv-themed .cv-hero-top h1.cv-name-anim-shimmer,
.cv-themed .cv-hero-top h1.cv-name-anim-gradient{
  background: linear-gradient(90deg, var(--cvt-button, #f43f5e) 0%, var(--cvt-heading, #241417) 45%, var(--cvt-button, #f43f5e) 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  animation: cvNameShimmer 3.2s linear infinite;
}
@keyframes cvNameShimmer{ to{ background-position: -200% center; } }

.cv-themed .cv-hero-top h1.cv-name-anim-glow{
  animation: cvNameGlow 2.1s ease-in-out infinite;
}
@keyframes cvNameGlow{
  0%, 100%{ text-shadow: 0 0 5px var(--cvt-button-tint, rgba(244,63,94,.4)); }
  50%{ text-shadow: 0 0 16px var(--cvt-button, #f43f5e), 0 0 6px var(--cvt-button, #f43f5e); }
}

.cv-themed .cv-hero-top h1.cv-name-anim-bounce{
  display: inline-block;
  animation: cvNameBounce 1.5s ease-in-out infinite;
}
@keyframes cvNameBounce{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

.cv-themed .cv-hero-top h1.cv-name-anim-wave{
  display: inline-block;
  animation: cvNameWave 2.4s ease-in-out infinite;
}
@keyframes cvNameWave{
  0%, 100%{ transform: rotate(0deg); }
  25%{ transform: rotate(-1.6deg); }
  75%{ transform: rotate(1.6deg); }
}

.cv-themed .cv-hero-top h1.cv-name-anim-pulse{
  display: inline-block;
  animation: cvNamePulse 1.7s ease-in-out infinite;
}
@keyframes cvNamePulse{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.045); }
}

@media (prefers-reduced-motion: reduce){
  .cv-themed .cv-hero-top h1[class*="cv-name-anim-"]{ animation: none !important; }
}

/* Ad üçün "+" düyməsi (avatardakı ilə eyni üslub, adın yanında) */
.cv-name-add-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--cvt-button, var(--color-primary));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.cv-name-add-btn:hover{ transform: scale(1.08); }
.cv-name-picker-wrap{ position: relative; display: inline-flex; }
.cv-name-picker{
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 20;
  text-align: left;
}
.cv-name-picker-title{
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-ink-soft);
}
.cv-name-picker-list{ display: flex; flex-direction: column; gap: 6px; }
.cv-name-picker-list form{ display: block; }
.cv-name-picker-option{
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.cv-name-picker-option:hover{ border-color: var(--cvt-button, var(--color-primary)); }
.cv-name-picker-option.is-selected{
  border-color: var(--cvt-button, var(--color-primary));
  background: var(--cvt-button-tint, var(--color-primary-tint));
}
.cv-name-picker-remove{ margin-top: 8px; }
@media (max-width: 480px){
  .cv-themed .cvt-badge-img{
    width: 28px;
    height: 28px;
    top: -6px;
    left: -6px;
  }
  .cv-themed .cv-verified-badge{
    bottom: -6px !important;
    right: -6px !important;
  }
}

/* Mobildə mətnin kart kənarlarına yapışmaması üçün əlavə daxili boşluq */
@media (max-width: 760px){
  .cv-themed .detail-card,
  .cv-themed .cv-hero-header{
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
  .cv-themed .cv-summary-text,
  .cv-themed .detail-card p,
  .cv-themed .detail-card li,
  .cv-themed .cv-timeline-item p{
    padding-right: 4px;
  }
}

/* FORUM bloku (cv-detail.php → .cv-forum-card) — CV sahibinin son videosu.
 * Blok özü .detail-card olduğu üçün fon, künc və kölgəni yuxarıdakı qaydalardan alır;
 * burada yalnız daxili rənglər temanın düymə rənginə uyğunlaşdırılır. */
.cv-themed .cv-forum-head{
  border-bottom-color: var(--cvt-button-tint-soft, var(--color-border)) !important;
}
.cv-themed .cv-forum-head-ic,
.cv-themed .cv-forum-cat{
  background: var(--cvt-button-tint, var(--color-primary-tint)) !important;
  color: var(--cvt-button, var(--color-primary-dark)) !important;
}
.cv-themed .cv-forum-head-body b,
.cv-themed .cv-forum-info b{
  color: var(--cvt-heading, inherit) !important;
}
.cv-themed .cv-forum-head-body small,
.cv-themed .cv-forum-meta,
.cv-themed .cv-forum-time{
  color: var(--cvt-text, inherit) !important;
}
.cv-themed .cv-forum-metric-rose{
  color: var(--cvt-button, var(--color-primary)) !important;
}
.cv-themed .cv-forum-item{
  border-radius: var(--cvt-radius, 12px) !important;
}
.cv-themed .cv-forum-item:hover{
  background: var(--cvt-button-tint-pale, var(--color-surface-alt)) !important;
}
.cv-themed .cv-forum-item:hover .cv-forum-info b{
  color: var(--cvt-button, var(--color-primary-dark)) !important;
}
.cv-themed .cv-forum-thumb{
  background: var(--cvt-button-tint-pale, var(--color-surface-alt)) !important;
  box-shadow: inset 0 0 0 1px var(--cvt-button-tint-soft, var(--color-border)) !important;
}
.cv-themed .cv-forum-play{
  background: var(--cvt-button, rgba(0, 0, 0, .58)) !important;
}
.cv-themed .cv-forum-more{
  background: var(--cvt-button-tint, var(--color-surface-alt)) !important;
  color: var(--cvt-button, var(--color-primary-dark)) !important;
  border-radius: var(--cvt-radius, 10px) !important;
}
.cv-themed .cv-forum-more:hover{
  background: var(--cvt-button-tint-strong, var(--color-primary-tint)) !important;
}
