/* ----------------------------------------- */
/*  Actor Sheet Styles                       */
/* ----------------------------------------- */

.bol.sheet.actor {
  min-width: 820px;
  min-height: 700px;
  height: 700px;

  .window-content {
    .bol-actor-form {
      background-image: url("/systems/bol/ui/logo.webp");
      background-repeat: no-repeat;
      background-size: 190px 115px;
    }

    .bol-actor-form {
      .sidebar {
        padding-top: 115px;
        min-width: 250px;
        width: 250px;
        max-width: 250px;
        overflow: hidden;

        .profile-img {
          cursor: pointer;
          border: none;
          background-color: #EEE;
          height: auto;
          width: calc(250px - 10px);
          min-width: calc(250px - 10px);
          max-width: calc(250px - 10px);
          margin-right: 10px;
        }

        .items-list {
          width: calc(250px - 10px);
          max-width: calc(250px - 10px);
          margin-right: 10px;
        }
      }

      .main {
        .sheet-body {
          overflow: hidden;

          .tab {
            .attribute {
              &.vigor {
                background-image: url("/systems/bol/ui/attributes/vigor.webp");
                background-repeat: no-repeat;
                background-position: center 40%;
                background-size: 100px 100px;
              }

              &.agility {
                background-image: url("/systems/bol/ui/attributes/agility.webp");
                background-repeat: no-repeat;
                background-position: center 40%;
                background-size: 100px 100px;
              }

              &.mind {
                background-image: url("/systems/bol/ui/attributes/mind.webp");
                background-repeat: no-repeat;
                background-position: center 40%;
                background-size: 100px 100px;
              }

              &.appeal {
                background-image: url("/systems/bol/ui/attributes/appeal.webp");
                background-repeat: no-repeat;
                background-position: center 40%;
                background-size: 100px 100px;
              }

              .stat-value {
                margin-top: -18px;
                &.rounded {
                  background: transparent;
                  border: none;
                  box-shadow: none;
                  text-align: center;
                  line-height: 4rem;
                }
              }
            }

            .aptitude {
              .stat-value {
                &.rounded-border {
                  background: transparent;
                  text-align: center;
                  line-height: 4rem;
                }
              }
            }
          }
        }
      }
    }
  }

  .resources-value {
    text-align: center;
    color: #4b4a44;
  }

  .inc-dec-btns-resource {
    color: #8b0000;
    &:hover { color: #4b4a44; }
  }

  .horde-stat-label {
    font-weight: bold;
    font-family: "Wolfsbane2Expanded", cursive;
    font-size: 1rem;
    font-variant: small-caps;
    color: #4b4a44;
    display: flex;
    align-items: center;
  }

  .horde-stat-row {
    align-items: center;
    margin-bottom: 4px;
  }

  .horde-stat-sep {
    color: #4b4a44;
    font-weight: bold;
    padding: 0 4px;
    flex: 0;
  }

  .bol-footer {
    height: 62px;
    max-height: 62px;
    min-height: 62px;

    .footer-left img {
      border: none;
      height: 62px;
      max-height: 62px;
      min-height: 62px;
      transform: scaleX(-1);
    }

    .footer-center {
      margin-top: 20px;
      margin-left: calc(-330px * 2);
      margin-right: calc(-330px * 2);
      height: 30px;
      max-height: 30px;
      min-height: 30px;
    }

    .footer-right {
      text-align: right;

      img {
        border: none;
        height: 62px;
        max-height: 62px;
        min-height: 62px;
      }
    }
  }

  .stat-max {
    font-size: 1rem;
    font-weight: bold;
    color: #4b4a44;
  }

  .bonus-text {
    margin-top: 7px;
  }

  .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: darkred;
  }

  .resource-bonus {
    font-weight: bold;
    color: darkred;
  }

  .resources-value {
    background-color: #2a2a2a30;
    border-color: #003c1e;
    margin-top: 4px;
    border-radius: 0.5rem;
  }

  .resources-novalue {
    background-color: #2a2a2a00;
    border-color: #003c1e;
    margin-top: 4px;
    border-radius: 0.5rem;
  }

  .stat-roll {
    font-size: 1.5rem;
    color: #4b4a44;

    &.malus {
      color: darkred;
    }

    &.bonus {
      color: darkgreen;
    }
  }

  .header-field-label,
  .stat-label {
    font-weight: bold;
    font-family: "Wolfsbane2Expanded", cursive;
    font-size: 2rem;
    font-variant: small-caps;
    color: #4b4a44;
  }

  .rounded {
    border-radius: 100px;
    width: 4rem;
    height: 4rem;
  }

  .rounded-border {
    border: 3px solid #4b4a44;
    box-shadow: 5px 5px 5px gray;
    border-radius: 100px;
    width: 4rem;
    height: 4rem;
  }

  .half-rounded {
    border-radius: 100px 100px 0px 0px;
    width: 4rem;
    height: 4rem;
  }

  .half-rounded-border {
    border-radius: 100px 100px 0px 0px;
    border: 3px solid #4b4a44;
    width: 4rem;
    height: 4rem;
  }
}

/* ----------------------------------------- */
/*  HUD and Chat Extensions                  */
/* ----------------------------------------- */

.rollable {
  cursor: pointer;
}

.chat-message .chat-icon {
  float: right;
  border: 1px outset lightgray;
  box-shadow: 3px 3px 3px black;
  margin: 3px;
  width: 64px;
  height: 64px;
}

.dialog-button {
  max-height: 2rem;
}

.xp-next {
  color: darkgrey;
  font-size: 1.0rem;
  border: 1px solid #4b4a44;
  box-shadow: 1px 1px 1px gray;
  border-radius: 100px;
  width: 1.25rem;
  height: 1.25rem;
}

.tooltip-container {
  position: relative;
  display: inline-block;

  .tooltiptext {
    text-align: center;
    position: absolute;
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    background-color: #f2f3a2a0;
    padding: 4px;
    width: 4rem;
    border-radius: 25%;
    border-width: 1px;
    transform: translate(-40%, -60%);
  }

  &:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }
}

.tokenhudext {
  display: flex;
  flex: 0 !important;
  font-family: CaslonPro;
  font-weight: 600;

  &.left {
    justify-content: flex-start;
    flex-direction: column;
    position: absolute;
    top: 2.75rem;
    right: 16rem;
  }

  &.right {
    justify-content: flex-start;
    flex-direction: column;
    position: absolute;
    top: -4rem;
    max-width: 250px;
    left: 4rem;
  }

  &.right2 {
    justify-content: flex-start;
    flex-direction: column;
    position: absolute;
    top: -4rem;
    left: 11rem;
  }
}

.control-icon.tokenhudicon {
  width: fit-content;
  height: fit-content;
  min-width: 6rem;
  flex-basis: auto;
  padding: 0.20rem;
  line-height: 1.1rem;
  margin: 0.20rem;

  &.right {
    margin-left: 8px;
  }
}

#token-hud .status-effects.active {
  z-index: 2;
}

.bol-hud-menu label {
  font-size: 0.6rem;
}

.bol-margin-tb-2 {
  margin-top: 2px;
  margin-bottom: 2px;
}

.character-summary-container {
  background: #f5f0e8;
  padding: 4px;

  // Table layout
  .cs-table {
    width: 100%;
    margin: 0;
  }

  // Section headers (PJs / PNJs)
  .cs-section-header {
    background: linear-gradient(135deg, #7a0000, darkred);
    padding: 4px 6px;
    min-height: 28px;
    align-items: center;
    margin-top: 2px;

    .item-name,
    .cs-name-col {
      font-family: "Wolfsbane2Expanded", cursive !important;
      font-size: 1.1em !important;
      color: #fff !important;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
    .cs-group-header {
      font-family: 'Signika', sans-serif !important;
      font-size: 0.75em !important;
      color: #ffdddd !important;
      text-align: center;
      justify-content: center;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      border-left: 1px solid rgba(255,255,255,0.25);
    }
  }

  // Column sub-header row (abbrevs)
  .cs-col-row {
    background: #ede0cc;
    min-height: 20px;
    padding: 1px 6px;
    align-items: center;
    border-bottom: 1px solid #c8b89a;
    .cs-col-header {
      font-family: 'Signika', sans-serif !important;
      font-size: 0.75em !important;
      color: #7a0000 !important;
      text-align: center;
      justify-content: center;
      font-weight: bold;
    }
  }

  // Actor portrait
  .cs-portrait-col {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cs-portrait {
    width: 30px;
    height: 30px;
    border-radius: 3px;
    border: 1px solid #c0a080;
    object-fit: cover;
  }

  // Name column
  .cs-name-col {
    min-width: 9rem;
    width: 9rem;
  }

  // Actor rows
  .cs-actor-row {
    min-height: 36px;
    padding: 3px 4px;
    border-bottom: 1px solid #d0c8b8;
    align-items: center;
    background: #faf6ee;
    transition: background 0.15s;

    &:hover {
      background: #ede8dc;
    }
  }

  // Actor name link
  .cs-actor-name {
    font-family: 'Signika', sans-serif;
    font-size: 0.9em;
    color: #7a0000;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;

    &:hover { text-decoration: underline; }
  }

  // Stat cells (clickable rolls)
  .cs-stat {
    justify-content: center;
    text-align: center;
  }
  // Visual separator at start of a column group
  .cs-group-sep {
    border-left: 1px solid #c0a878;
  }
  .cs-col-row .cs-group-sep {
    border-left: 1px solid #c0a878;
  }
  .cs-rollable {
    display: inline-block;
    min-width: 1.8em;
    text-align: center;
    color: #333;
    font-size: 0.88em;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    border-radius: 3px;
    padding: 1px 3px;
    cursor: pointer;
    text-decoration: none;

    &:hover {
      background: darkred;
      color: #fff;
    }
  }

  // Resource cells (val/max)
  .cs-resource {
    justify-content: center;
    font-size: 0.82em;
    color: #555;
    gap: 1px;
  }
  .cs-res-val { color: #191813; font-weight: bold; font-family: 'Orbitron', sans-serif; }
  .cs-res-sep { color: #999; }
  .cs-res-max { color: #888; font-family: 'Orbitron', sans-serif; }

  // Horoscope inputs
  .cs-input {
    width: 3rem;
    text-align: center;
    border: 1px solid #c0a080;
    border-radius: 3px;
    padding: 2px 4px;
    background: #fff;
    font-size: 0.85em;
  }

  // Delete button
  .actor-delete { color: #c0392b; }
  .actor-delete:hover { color: #e74c3c; }
}


.activated-green {
  color: darkgreen;
}

.compendium-sidebar .directory-item.compendium.locked .compendium-banner {
  opacity: 0.5;
}
