/* aspaz.az — Virtual Hədiyyə Sistemi: premium kart görünüşü + animasiyalar (bənd 20) */

/* Sayt üzrə .hint stili yalnız .form-group daxilində işləyir; admin modallarında
   (.vip-field) istifadə olunan izahat mətnləri üçün eyni görünüşü təkrarlayırıq. */
.vip-field .hint, .vip-modal .hint {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-ink-faint, #9a8286);
  font-weight: 400;
  margin-top: 5px;
}
.gift-validity-hint {
  display: block; margin: -6px 0 16px; padding: 8px 12px;
  background: var(--color-surface-alt, #fdf2f4); border-radius: 8px;
  font-size: 11.5px; line-height: 1.5;
}
.gift-label-2l { display: flex; align-items: flex-start; min-height: 32px; line-height: 1.3; }

/* ---------- Balans kartı (user/gifts.php) ---------- */
.gift-balance-card { position: relative; overflow: hidden; }
.gift-balance-summary {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 16px; padding: 18px 20px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 200, 120, .18), rgba(255, 120, 170, .12));
  border: 1px solid rgba(255, 180, 120, .35);
}
.gift-balance-amount {
  font-family: var(--font-display, inherit); font-weight: 800; font-size: 34px; line-height: 1;
  color: var(--color-primary-dark, #b5622a);
}
.gift-balance-amount span { font-size: 14px; font-weight: 600; opacity: .7; margin-left: 4px; }
.gift-balance-meta { font-size: 13.5px; color: var(--color-ink-soft, #555); display: flex; flex-direction: column; gap: 4px; }
.gift-empty-state { text-align: center; }

/* ---------- Paket kartları (satın alma) ---------- */
.gift-pkg-grid, .gift-pkg-buy-card { box-sizing: border-box; }
.gift-pkg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 14px;
}
.gift-pkg-buy-card {
  border-radius: 18px; padding: 22px 18px; text-align: center;
  background: linear-gradient(160deg, #fff, #fff8f1);
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .05);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.gift-pkg-buy-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 0, 0, .09); }
.gift-pkg-buy-icon { font-size: 42px; line-height: 1; margin-bottom: 4px; }
.gift-pkg-buy-name { font-size: 16px; font-weight: 700; margin: 0; }
.gift-pkg-buy-desc {
  font-size: 12.5px; color: var(--color-ink-faint, #888); margin: 0; min-height: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gift-pkg-buy-contents { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin: 8px 0 2px; max-width: 220px; }
.gift-pkg-buy-item {
  font-size: 15px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0, 0, 0, .04); flex-shrink: 0;
}
.gift-pkg-buy-item-more {
  font-size: 11px; font-weight: 700; color: var(--color-primary-dark, #b5622a);
  background: var(--color-primary-tint, #fff1f3);
}
.gift-pkg-buy-price { font-weight: 700; font-size: 14.5px; margin: 8px 0 4px; }
.gift-pkg-buy-price span { font-weight: 500; font-size: 12px; opacity: .7; }
.gift-pkg-buy-validity { font-size: 11.5px; color: var(--color-ink-faint, #888); margin-bottom: 4px; }

/* ---------- Admin: paket içindəki hədiyyələr ---------- */
.gift-item-grid {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important; gap: 18px !important; margin-top: 18px !important;
}
.gift-item-card {
  border-radius: 18px !important; padding: 24px 16px 18px !important; text-align: center !important;
  background: linear-gradient(160deg, #fff, #fff3e6) !important;
  border: 1.5px solid var(--color-primary-light, #fecdd6) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07) !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease !important;
  display: flex !important; flex-direction: column !important; align-items: center !important; gap: 10px !important;
}
.gift-item-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0, 0, 0, .12); }
.gift-item-card.is-inactive { opacity: .5; background: #f3f3f3 !important; border-color: rgba(0, 0, 0, .08) !important; }
.gift-item-icon {
  font-size: 40px !important; line-height: 1; width: 68px !important; height: 68px !important; display: flex !important;
  align-items: center; justify-content: center; border-radius: 50% !important;
  background: rgba(255, 160, 60, .18) !important; margin-bottom: 2px;
  box-shadow: inset 0 0 0 2px rgba(255, 160, 60, .25);
}
.gift-item-name { font-size: 15px !important; font-weight: 800 !important; color: var(--color-ink, #241417) !important; line-height: 1.3; min-height: 20px; }
.gift-item-meta { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.gift-item-actions {
  display: flex; justify-content: center; gap: 6px; margin-top: 6px; padding-top: 12px;
  width: 100%; border-top: 1px dashed rgba(0, 0, 0, .08);
}

/* ---------- Hədiyyə göndərmə modalı (cv-detail.php) ---------- */
.gift-send-balance-note {
  text-align: center; font-size: 12.5px; font-weight: 600; color: var(--color-primary-dark, #b5622a);
  background: var(--color-primary-tint, #fff1f3); border-radius: 10px; padding: 8px 12px; margin-bottom: 2px;
}
.gift-send-balance-note span { font-weight: 500; opacity: .8; }
.gift-send-item-scroll { max-height: 260px; overflow-y: auto; margin: 0 -4px; padding: 2px 4px; }
.gift-send-item-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px;
}
.gift-send-item-option {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: 80px; padding: 12px 6px 10px; border-radius: 14px; border: 1.5px solid rgba(0, 0, 0, .07);
  background: linear-gradient(160deg, #fff, #fff8f1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--color-ink-soft, #5c464a);
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.gift-send-item-option span:last-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.gift-send-item-option:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0, 0, 0, .08); }
.gift-send-item-option.selected {
  border-color: var(--color-primary, #e07a3f); background: var(--color-primary-tint, #fff1f3);
  color: var(--color-primary-dark, #b5622a); box-shadow: 0 6px 14px rgba(224, 122, 63, .18);
}
.gift-send-item-option .gift-log-icon {
  margin: 0; width: 40px; height: 40px; font-size: 22px;
  background: rgba(255, 180, 90, .16);
}
.gift-send-item-option.selected .gift-log-icon { background: #fff; }

/* ---------- Tarixçə / alınan-göndərilən siyahısı ---------- */
.gift-log-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gift-log-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, .025); border: 1px solid rgba(0, 0, 0, .05);
}
.gift-log-icon {
  font-size: 26px; width: 46px; height: 46px; flex: 0 0 auto; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 180, 90, .18);
}
.gift-log-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gift-log-title { font-size: 13.5px; }
.gift-log-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--color-ink-faint, #888); align-items: center; }

/* ---------- CV-detail.php: alınan hədiyyələr göstəricisi ---------- */
.cv-received-gifts {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 12px; border-top: 1px dashed rgba(0, 0, 0, .08);
}
.cv-received-gifts-count { font-size: 13px; font-weight: 700; }
.cv-received-gifts-icons { display: flex; gap: 4px; flex-wrap: wrap; }
.cv-received-gifts-icons .gift-log-icon { width: 32px; height: 32px; font-size: 17px; }
.cv-received-gifts-more {
  font-size: 11.5px !important; font-weight: 800; color: var(--color-primary-dark, #b5622a);
  background: var(--color-primary-tint, #fff1f3) !important;
}
@media (max-width: 480px) {
  .cv-received-gifts { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cv-received-gifts-icons { gap: 3px; }
  .cv-received-gifts-icons .gift-log-icon { width: 26px; height: 26px; font-size: 14px; }
  .cv-received-gifts-more { width: 26px; height: 26px; font-size: 10px !important; }
}

/* ---------- Animasiya effektləri (bənd 4) ---------- */
@keyframes giftSparkle {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 210, 90, 0)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px rgba(255, 210, 90, .85)); transform: scale(1.08); }
}
@keyframes giftFly {
  0% { transform: translateY(6px) rotate(-6deg); }
  50% { transform: translateY(-6px) rotate(6deg); }
  100% { transform: translateY(6px) rotate(-6deg); }
}
@keyframes giftHeartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.18); }
  40% { transform: scale(1); }
  60% { transform: scale(1.12); }
}
@keyframes giftExplosion {
  0% { transform: scale(.7); opacity: .6; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes giftPremiumGlow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 215, 130, .6)) saturate(1); }
  50% { filter: drop-shadow(0 0 12px rgba(255, 190, 60, 1)) saturate(1.3); }
}

@keyframes giftConfetti {
  0%, 100% { transform: rotate(0deg) scale(1); filter: hue-rotate(0deg); }
  25% { transform: rotate(-12deg) scale(1.06); filter: hue-rotate(60deg); }
  50% { transform: rotate(0deg) scale(1.12); filter: hue-rotate(140deg); }
  75% { transform: rotate(12deg) scale(1.06); filter: hue-rotate(220deg); }
}
@keyframes giftRainbow {
  0% { filter: hue-rotate(0deg) saturate(1.3); }
  100% { filter: hue-rotate(360deg) saturate(1.3); }
}
@keyframes giftBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
  50% { transform: translateY(0); }
  65% { transform: translateY(-4px); }
  80% { transform: translateY(0); }
}
@keyframes giftShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-4deg); }
  40% { transform: translateX(4px) rotate(4deg); }
  60% { transform: translateX(-3px) rotate(-2deg); }
  80% { transform: translateX(3px) rotate(2deg); }
}
@keyframes giftZoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.32); }
}
@keyframes giftRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes giftGlowHalo {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(120, 200, 255, .5)); }
  50% { filter: drop-shadow(0 0 14px rgba(120, 200, 255, 1)); }
}
@keyframes giftFireworks {
  0% { transform: scale(.6) rotate(0deg); opacity: .5; }
  40% { transform: scale(1.3) rotate(15deg); opacity: 1; }
  70% { transform: scale(.95) rotate(-8deg); }
  100% { transform: scale(1.1) rotate(0deg); opacity: 1; }
}
@keyframes giftSnowDrift {
  0% { transform: translateY(-4px) translateX(0) rotate(-4deg); }
  50% { transform: translateY(4px) translateX(3px) rotate(4deg); }
  100% { transform: translateY(-4px) translateX(0) rotate(-4deg); }
}
@keyframes giftWave {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

.gift-anim-sparkle { animation: giftSparkle 1.8s ease-in-out infinite; }
.gift-anim-fly { animation: giftFly 2.2s ease-in-out infinite; }
.gift-anim-heart { animation: giftHeartbeat 1.6s ease-in-out infinite; }
.gift-anim-explosion { animation: giftExplosion .6s cubic-bezier(.34, 1.56, .64, 1) 1; }
.gift-anim-premium { animation: giftPremiumGlow 2.4s ease-in-out infinite; }
.gift-anim-confetti { animation: giftConfetti 1.8s ease-in-out infinite; }
.gift-anim-rainbow { animation: giftRainbow 3s linear infinite; }
.gift-anim-bounce { animation: giftBounce 1.4s ease-in-out infinite; }
.gift-anim-shake { animation: giftShake 1s ease-in-out infinite; }
.gift-anim-zoom { animation: giftZoom 1.3s ease-in-out infinite; }
.gift-anim-rotate { animation: giftRotate 2.6s linear infinite; }
.gift-anim-glow { animation: giftGlowHalo 2s ease-in-out infinite; }
.gift-anim-fireworks { animation: giftFireworks .7s cubic-bezier(.34, 1.56, .64, 1) 1; }
.gift-anim-snow { animation: giftSnowDrift 2.6s ease-in-out infinite; }
.gift-anim-wave { animation: giftWave 1.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .gift-anim-sparkle, .gift-anim-fly, .gift-anim-heart, .gift-anim-explosion, .gift-anim-premium,
  .gift-anim-confetti, .gift-anim-rainbow, .gift-anim-bounce, .gift-anim-shake, .gift-anim-zoom,
  .gift-anim-rotate, .gift-anim-glow, .gift-anim-fireworks, .gift-anim-snow, .gift-anim-wave {
    animation: none;
  }
}

/* ---------- Bölüm başlıqları (user/gifts.php) ---------- */
.gift-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.gift-section-title { font-size: 18px; margin: 0; }

/* ---------- Sekmə paneli (Alınan / Göndərilən / Tarixçə) ---------- */
.gift-log-card { padding-bottom: 22px; }
.gift-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 16px 0 18px; padding: 5px;
  background: var(--color-surface-alt, #fdf2f4); border-radius: 14px;
}
.gift-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center; padding: 10px 6px; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--color-ink-soft, #5c464a);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  min-width: 0;
}
.gift-tab-icon { font-size: 18px; line-height: 1; }
.gift-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gift-tab:hover { background: rgba(255, 255, 255, .6); }
.gift-tab.active {
  background: #fff; color: var(--color-primary-dark, #d81f3d);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

/* ---------- Tarixçə / alınan-göndərilən sətirləri ---------- */
.gift-log-row { transition: background .15s ease, transform .12s ease; }
.gift-log-row:hover { background: rgba(0, 0, 0, .045); transform: translateY(-1px); }
.gift-log-title b { color: var(--color-ink, #241417); }

@media (max-width: 480px) {
  .gift-tabs { grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; }
  .gift-tab { padding: 9px 3px; font-size: 10.5px; gap: 3px; }
  .gift-tab-icon { font-size: 16px; }
  .gift-section-title { font-size: 16px; }
  .cv-section-icon { width: 28px; height: 28px; font-size: 13px; }
  .gift-send-modal { padding: 18px 16px 16px !important; }
  .gift-send-modal .vip-modal-head { margin-bottom: 12px !important; }
  .gift-send-modal .vip-modal-icon { width: 42px !important; height: 42px !important; font-size: 19px !important; margin-bottom: 6px !important; }
  .gift-send-modal .vip-modal-head h3 { font-size: 16px !important; }
  .gift-send-item-scroll { max-height: 210px; }
}
@media (max-width: 900px) {
  .gift-pkg-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .gift-item-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 560px) {
  .gift-pkg-grid { grid-template-columns: 1fr; gap: 14px; }
  .gift-pkg-buy-card { padding: 18px 20px; }
  .gift-pkg-buy-contents { max-width: 280px; }
  .gift-send-item-option { width: 70px; padding: 10px 4px 8px; }
  .gift-send-item-option .gift-log-icon { width: 34px; height: 34px; font-size: 19px; }
  .gift-balance-summary { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gift-log-row { padding: 10px; }
}
