/* Cooldowns visuais — habilidades, itens, buffs, ações */

.dsk-cd-host {
  position: relative;
  overflow: visible;
}

.dsk-cd-host .dsk-cd-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  z-index: 5;
}

.dsk-cd-host:not(.dsk-cd-host--active) .dsk-cd-layer {
  display: none;
}

.dsk-cd-shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(4, 6, 12, 0.62);
  backdrop-filter: blur(0.5px);
}

.dsk-cd-ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    var(--dsk-cd-ring-color, rgba(212, 175, 55, 0.92)) calc(var(--dsk-cd-pct, 100) * 1%),
    rgba(255, 255, 255, 0.07) 0
  );
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: dsk-cd-ring-spin 8s linear infinite;
}

@keyframes dsk-cd-ring-spin {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(18deg);
  }
}

.dsk-cd-host[data-cd-variant='buff'] {
  --dsk-cd-ring-color: rgba(96, 210, 150, 0.92);
}

.dsk-cd-host[data-cd-variant='debuff'] {
  --dsk-cd-ring-color: rgba(230, 100, 100, 0.92);
}

.dsk-cd-host[data-cd-variant='action'] {
  --dsk-cd-ring-color: rgba(120, 170, 255, 0.9);
}

.dsk-cd-host[data-cd-variant='invest'] {
  --dsk-cd-ring-color: rgba(212, 175, 55, 0.92);
}

.dsk-cd-timer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f5f0e6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  z-index: 2;
}

.dsk-cd-host .dsk-cd-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) scale(0.96);
  min-width: 8.5rem;
  max-width: 12rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: linear-gradient(165deg, rgba(16, 20, 32, 0.98), rgba(8, 10, 18, 0.98));
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.58rem;
  line-height: 1.35;
  color: rgba(225, 228, 235, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 20;
  pointer-events: none;
}

.dsk-cd-host .dsk-cd-tooltip strong {
  display: block;
  font-family: Cinzel, serif;
  font-size: 0.62rem;
  color: #f0e6c8;
  margin-bottom: 0.12rem;
}

.dsk-cd-host:hover .dsk-cd-tooltip,
.dsk-cd-host:focus-within .dsk-cd-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

/* Buff bar — reutiliza anel compartilhado */
.dsk-buff-icon.dsk-cd-host .dsk-cd-layer {
  inset: 0;
  border-radius: 8px;
}

.dsk-buff-icon.dsk-cd-host .dsk-cd-timer {
  top: auto;
  bottom: -0.05rem;
  transform: translateX(-50%);
  font-size: 0.48rem;
  font-weight: 600;
}

.dsk-buff-icon .dsk-cd-tooltip {
  display: none !important;
}

.dsk-buff-icon.dsk-cd-host .dsk-cd-shade {
  border-radius: 8px;
  background: rgba(4, 6, 12, 0.35);
}

/* Heal quick buttons */
.dsk-heal-quick-btn.dsk-cd-host .dsk-cd-timer {
  font-size: 0.62rem;
}

/* Bank investment card */
.dsk-bank-cd-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(212, 175, 55, 0.14);
}

.dsk-bank-cd-icon {
  position: relative;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  border-radius: 10px;
  background: rgba(12, 16, 28, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.dsk-bank-cd-meta {
  font-size: 0.68rem;
  color: rgba(200, 205, 220, 0.9);
  line-height: 1.4;
}

.dsk-bank-cd-meta strong {
  color: #f0e6c8;
  font-family: Cinzel, serif;
}

/* Exploration heal */
.exp-heal-use-btn.dsk-cd-host {
  min-width: 4.5rem;
}

.settings-audio-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.settings-audio-grid label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.settings-audio-sub {
  margin-left: 1.1rem;
  padding-left: 0.55rem;
  border-left: 2px solid rgba(212, 175, 55, 0.18);
}

.settings-audio-sub.is-muted {
  opacity: 0.45;
  pointer-events: none;
}
