/* ═══════════════════════════════════════════════════
   WP Like Dislike System — Style Sheet
   ═══════════════════════════════════════════════════ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;800&family=Hind:wght@400;500;600&display=swap');

:root {
  --wld-like:     #16a34a;
  --wld-like-bg:  #dcfce7;
  --wld-dis:      #dc2626;
  --wld-dis-bg:   #fee2e2;
  --wld-border:   #e2e8f0;
  --wld-radius:   16px;
  --wld-shadow:   0 4px 24px rgba(0,0,0,.08);
  --wld-font:     'Hind', sans-serif;
  --wld-heading-font: 'Baloo 2', cursive;
}

/* ════════ POST BUTTONS BOX ════════ */
.wld-box {
  font-family: var(--wld-font);
  margin: 2.5rem 0 1.5rem;
  padding: 1.8rem 2rem;
  background: linear-gradient(135deg, #fafafa 0%, #f0f9ff 100%);
  border: 1.5px solid var(--wld-border);
  border-radius: var(--wld-radius);
  box-shadow: var(--wld-shadow);
  transition: box-shadow .3s ease;
}
.wld-box:hover { box-shadow: 0 8px 32px rgba(0,0,0,.12); }

.wld-heading {
  font-family: var(--wld-heading-font);
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.wld-icon-star { font-size: 1.3rem; color: #f59e0b; }

/* ── Buttons Wrapper ── */
.wld-buttons {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--wld-border);
  width: fit-content;
  max-width: 100%;
}

.wld-divider {
  width: 1.5px;
  background: var(--wld-border);
  flex-shrink: 0;
}

/* ── Individual Button ── */
.wld-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.6rem;
  background: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--wld-font);
  font-size: .95rem;
  font-weight: 600;
  color: #475569;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  outline: none;
  position: relative;
  overflow: hidden;
}
.wld-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .25s;
}
.wld-btn:hover { transform: translateY(-2px); }

/* Like button */
.wld-like::before         { background: var(--wld-like-bg); }
.wld-like:hover::before   { opacity: 1; }
.wld-like:hover           { color: var(--wld-like); }
.wld-active-like          {
  background: var(--wld-like-bg) !important;
  color: var(--wld-like) !important;
}
.wld-active-like .wld-btn-icon { transform: scale(1.3) rotate(-10deg); }

/* Dislike button */
.wld-dislike::before       { background: var(--wld-dis-bg); }
.wld-dislike:hover::before { opacity: 1; }
.wld-dislike:hover         { color: var(--wld-dis); }
.wld-active-dislike        {
  background: var(--wld-dis-bg) !important;
  color: var(--wld-dis) !important;
}
.wld-active-dislike .wld-btn-icon { transform: scale(1.3) rotate(10deg); }

.wld-btn-icon {
  font-size: 1.4rem;
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.wld-btn-label {
  position: relative;
  z-index: 1;
  letter-spacing: .02em;
}
.wld-count {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,.07);
  padding: .15rem .55rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  transition: background .25s;
}
.wld-active-like    .wld-count { background: rgba(22,163,74,.18); }
.wld-active-dislike .wld-count { background: rgba(220,38,38,.18); }

/* ── Progress Bar ── */
.wld-bar-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--wld-border);
}
.wld-bar-wrap {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: #e2e8f0;
  margin-bottom: .5rem;
}
.wld-bar-like {
  background: linear-gradient(90deg, #16a34a, #4ade80);
  border-radius: 99px 0 0 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.wld-bar-dislike {
  background: linear-gradient(90deg, #f87171, #dc2626);
  flex: 1;
  border-radius: 0 99px 99px 0;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.wld-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  font-weight: 600;
}
.wld-like-pct    { color: var(--wld-like); }
.wld-dislike-pct { color: var(--wld-dis); }
.wld-total-text  { font-size: .8rem; color: #94a3b8; margin-top: .3rem; margin-bottom: 0; }

/* ── Toast Notification ── */
.wld-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  padding: .7rem 1.4rem;
  border-radius: 99px;
  font-family: var(--wld-font);
  font-size: .9rem;
  z-index: 9999;
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  white-space: nowrap;
}
.wld-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ════════ FOOTER OVERALL SCORE ════════ */
.wld-footer-score {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9998;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #e2e8f0;
  font-family: var(--wld-font);
  padding: 1.1rem 1.5rem 1rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
  border-top: 2px solid rgba(99,179,237,.3);
  animation: wld-slide-up .5s cubic-bezier(.4,0,.2,1) both;
}
@keyframes wld-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.wld-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}
.wld-footer-title {
  font-family: var(--wld-heading-font);
  font-size: 1rem;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.wld-footer-globe { font-size: 1.1rem; }

.wld-footer-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.wld-footer-emoji { font-size: 1.3rem; width: 1.6rem; text-align: center; }

.wld-footer-bar-wrap {
  flex: 1;
  height: 12px;
  background: rgba(255,255,255,.1);
  border-radius: 99px;
  overflow: hidden;
}
.wld-footer-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}
.wld-footer-like-fill    { background: linear-gradient(90deg, #16a34a, #4ade80); }
.wld-footer-dislike-fill { background: linear-gradient(90deg, #f87171, #dc2626); }

.wld-footer-pct {
  font-weight: 800;
  font-size: 1rem;
  min-width: 3.5rem;
  text-align: right;
}
.wld-footer-like-txt    { color: #4ade80; }
.wld-footer-dislike-txt { color: #f87171; }

.wld-footer-num {
  font-size: .78rem;
  color: #94a3b8;
  min-width: 6rem;
}
.wld-footer-total {
  font-size: .82rem;
  color: #94a3b8;
  margin: .4rem 0 0;
}
.wld-footer-total strong { color: #e2e8f0; }

.wld-footer-close {
  position: absolute;
  top: 0; right: 0;
  background: rgba(255,255,255,.1);
  border: none;
  color: #94a3b8;
  font-size: .78rem;
  padding: .3rem .7rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--wld-font);
  transition: background .2s;
}
.wld-footer-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ════════ SIDEBAR WIDGET ════════ */
.wld-widget {
  font-family: var(--wld-font);
  padding: .5rem 0;
}
.wld-widget h3 {
  font-family: var(--wld-heading-font);
  font-size: 1rem;
  margin-bottom: .8rem;
  color: #1e293b;
}
.wld-widget-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
  font-size: .85rem;
}
.wld-wbar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.wld-wbar-fill { height: 100%; border-radius: 99px; }
.wld-wf-like    { background: linear-gradient(90deg,#16a34a,#4ade80); }
.wld-wf-dislike { background: linear-gradient(90deg,#f87171,#dc2626); }
.wld-widget small { font-size: .75rem; color: #94a3b8; }

/* ════════ RESPONSIVE ════════ */
@media (max-width: 600px) {
  .wld-box { padding: 1.2rem 1rem; }
  .wld-btn { padding: .7rem 1rem; font-size: .85rem; }
  .wld-footer-score { padding: .9rem 1rem .8rem; }
  .wld-footer-num { display: none; }
}
