/**
 * /assets/css/character-hp-mana.css
 *
 * Purpose:  Resource Card Styles (HP/Mana v3.0 Smart Buttons)
 * Deps:     app.css (CSS variables)
 * Version:  3.0.0
 * Load:     index.php
 *
 * BEM-Prefix: .rc (resource-card)
 * Ersetzt:    Alte .resource-bar-wrapper aus character-overview.css
 */

/* ==========================================================================
   Container
   ========================================================================== */

.rc {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  margin-top: 0.875rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rc:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.rc--hp {
  border-left: 3px solid rgba(255, 107, 107, 0.5);
}

.rc--hp:hover {
  border-left-color: rgba(255, 107, 107, 0.7);
}

.rc--mana {
  border-left: 3px solid rgba(100, 149, 237, 0.5);
}

.rc--mana:hover {
  border-left-color: rgba(100, 149, 237, 0.7);
}

/* ==========================================================================
   Header
   ========================================================================== */

.rc__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rc__title {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rc__title--hp {
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.35);
}

.rc__title--mana {
  color: #6495ed;
  text-shadow: 0 0 10px rgba(100, 149, 237, 0.35);
}

.rc__vals {
  display: flex;
  align-items: baseline;
  gap: 0.12rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

.rc__cur {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
}

.rc__sep {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.1rem;
}

.rc__max {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.rc__max:hover {
  color: rgba(255, 255, 255, 0.8);
}

.rc__edit-ico {
  font-size: 0.6rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.rc__max:hover .rc__edit-ico {
  opacity: 1;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.rc__bar {
  height: 20px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rc__fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
}

.rc__fill--hp {
  background: linear-gradient(90deg, #d63031 0%, #ff6b6b 50%, #ff8787 100%);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.25);
}

.rc__fill--mana {
  background: linear-gradient(90deg, #2e6bba 0%, #6495ed 50%, #87b4f5 100%);
  box-shadow: 0 0 10px rgba(100, 149, 237, 0.25);
}

.rc__pct {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* ==========================================================================
   Bar States
   ========================================================================== */

.rc--critical .rc__fill--hp {
  background: linear-gradient(90deg, #8b0000, #dc3545);
  animation: rcPulse 1.5s ease-in-out infinite;
}

.rc--critical .rc__bar--hp {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(220, 53, 69, 0.3);
}

.rc--depleted .rc__fill {
  width: 0% !important;
  min-width: 0;
}

.rc--depleted .rc__bar {
  opacity: 0.5;
}

.rc--full .rc__fill--hp {
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.35);
}

.rc--full .rc__fill--mana {
  box-shadow: 0 0 14px rgba(100, 149, 237, 0.35);
}

@keyframes rcPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.65;
  }
}

/* ==========================================================================
   Actions Container
   ========================================================================== */

.rc__actions {
  margin-top: 0.7rem;
}

/* ==========================================================================
   Quick Buttons Row
   ========================================================================== */

.rc__qrow {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.rc__qbtn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1 1 0;
  text-align: center;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.4;
  max-width: 60px;
}

.rc__qbtn:hover {
  transform: translateY(-1px);
}

.rc__qbtn:active,
.rc__qbtn--press {
  transform: scale(0.93);
}

.rc__qbtn--neg {
  color: #ff8787;
  border-color: rgba(255, 107, 107, 0.2);
}

.rc__qbtn--neg:hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
}

.rc__qbtn--pos {
  color: #72d687;
  border-color: rgba(114, 214, 135, 0.2);
}

.rc__qbtn--pos:hover {
  background: rgba(114, 214, 135, 0.15);
  border-color: rgba(114, 214, 135, 0.4);
  color: #5ec76e;
}

/* ==========================================================================
   Manual Input Row
   ========================================================================== */

.rc__form {
  margin-bottom: 0.5rem;
}

.rc__input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.7rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  max-width: 260px;
  margin: 0 auto;
}

.rc__sign {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc__sign:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.rc__sign--neg.rc__sign--active,
.rc__sign--neg:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.rc__sign--pos.rc__sign--active,
.rc__sign--pos:hover {
  background: rgba(114, 214, 135, 0.2);
  color: #5ec76e;
}

.rc__input {
  background: transparent;
  border: none;
  color: #fff;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  width: 65px;
  padding: 0.35rem 0.2rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  -moz-appearance: textfield;
}

.rc__input::-webkit-outer-spin-button,
.rc__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rc__input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.04);
}

.rc__go {
  background: rgba(255, 255, 255, 0.07);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.rc__go:hover {
  background: rgba(13, 110, 253, 0.2);
  color: #6ea8fe;
}

/* ==========================================================================
   Full Heal
   ========================================================================== */

.rc__heal-form {
  text-align: center;
}

.rc__heal {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.12), rgba(40, 167, 69, 0.06));
  border: 1px solid rgba(40, 167, 69, 0.25);
  color: #72d687;
  border-radius: 0.55rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 260px;
}

.rc__heal:hover {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.22), rgba(40, 167, 69, 0.12));
  border-color: rgba(40, 167, 69, 0.45);
  color: #5ec76e;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(40, 167, 69, 0.15);
}

/* ==========================================================================
   Max Edit
   ========================================================================== */

.rc__max-form {
  padding-top: 0.7rem;
}

.rc__max-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.rc__max-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  white-space: nowrap;
}

.rc__max-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.28rem 0.45rem;
  width: 75px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  -moz-appearance: textfield;
}

.rc__max-input::-webkit-outer-spin-button,
.rc__max-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.rc__max-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.rc__max-save {
  background: rgba(13, 110, 253, 0.12);
  border: 1px solid rgba(13, 110, 253, 0.25);
  color: #6ea8fe;
  border-radius: 0.5rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.rc__max-save:hover {
  background: rgba(13, 110, 253, 0.22);
  border-color: rgba(13, 110, 253, 0.45);
}

/* ==========================================================================
   Disabled State
   ========================================================================== */

.rc__disabled {
  text-align: center;
  padding: 0.6rem 0 0.2rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Floating Numbers
   ========================================================================== */

.rc__float {
  position: absolute;
  top: -5px;
  right: 12px;
  font-weight: 900;
  font-size: 1.3rem;
  pointer-events: none;
  z-index: 10;
  animation: rcFloatUp 1.2s ease-out forwards;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.rc__float--heal {
  color: #5ec76e;
}

.rc__float--dmg {
  color: #ff6b6b;
}

@keyframes rcFloatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-30px) scale(1.1);
    opacity: 0;
  }
}

/* ==========================================================================
   Bar Flash
   ========================================================================== */

.rc__fill--flash-heal {
  animation: rcFlashHeal 0.4s ease;
}

.rc__fill--flash-dmg {
  animation: rcFlashDmg 0.4s ease;
}

@keyframes rcFlashHeal {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.4);
  }
}

@keyframes rcFlashDmg {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(0.55);
  }
}

/* ==========================================================================
   Input Shake
   ========================================================================== */

.rc__input--shake {
  animation: rcShake 0.35s ease;
}

@keyframes rcShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 480px) {
  .rc {
    padding: 0.8rem 0.9rem;
  }

  .rc__qrow {
    gap: 0.2rem;
  }

  .rc__qbtn {
    font-size: 0.75rem;
    padding: 0.25rem 0;
    max-width: 50px;
  }

  .rc__cur {
    font-size: 1.05rem;
  }

  .rc__input-row {
    max-width: 100%;
  }

  .rc__heal {
    max-width: 100%;
  }
}