.application.dialog.lethalfantasy {
  color: var(--color-dark-1);

  input,
  select {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: var(--color-dark-6);
    color: var(--color-dark-2);
  }

  .apply-damage-dialog {
    .dialog-content {
      padding: 6px;
      font-size: calc(var(--font-size-standard) * 1);

      .header {
        text-align: center;
        padding: 4px;
        margin-bottom: 6px;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 3px;
      }

      .damage-summary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 6px;
        margin-bottom: 6px;
        background-color: rgba(139, 0, 0, 0.1);
        border-radius: 3px;

        .damage-value {
          color: var(--color-level-error);
          font-size: calc(var(--font-size-standard) * 1.2);
          font-weight: bold;
        }
      }

      .dr-summary {
        display: flex;
        justify-content: space-around;
        gap: 4px;
        padding: 3px;
        margin-bottom: 6px;
        font-size: calc(var(--font-size-standard) * 0.85);
        background-color: rgba(0, 0, 0, 0.05);
        border-radius: 3px;
      }

      .damage-options {
        .option-line {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding: 3px 6px;
          margin: 2px 0;
          background-color: rgba(0, 0, 0, 0.05);
          border-radius: 3px;

          strong {
            color: var(--color-dark-1);
            font-size: calc(var(--font-size-standard) * 1.05);
          }
        }
      }
    }
  }
}

.lethalfantasy-roll-dialog {
  fieldset {
    padding: 4px;
  }
  .goto-token-button {
    justify-content: center;
    align-items: center;
    align-content: center;
    margin-left: 0.5rem;
    max-width: 8rem;
    background-color: var(--color-dark-6);
    color: var(--color-dark-2);
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
  }
}

.lethalfantasy-range-defense-dialog {
  width: 18rem;

  fieldset {
    padding: 4px;
  }
  .fieldset-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  select {
    margin-left: 0.5rem;
    min-width: 12rem;
    max-width: 12rem;
  }
  .field-section {
    display: flex;
    align-items: center;
    justify-content: left;
  }
  .field-name {
    width: 5rem;
    min-width: 5rem;
    max-width: 5em;
  }
}

.dialog-form {
  .form-footer {
    padding: 4px;
    gap: 4px;
    button {
      min-width: 8rem;
      min-height: 2rem;
      padding: 2px 6px;
      margin: 0;
      font-size: calc(var(--font-size-standard) * 0.9);
    }
  }
}

.dialog-modifier {
  display: flex;
  justify-content: center;
  align-items: center;
  select {
    border: none;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--color-dark-2);
    width: 60px;
    text-align: center;
  }
}

.dialog-favor {
  display: flex;
  justify-content: center;
  align-items: center;
  select {
    border: none;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--color-dark-2);
    width: 120px;
    text-align: center;
  }
}

.main,
.dialog-damage,
.dialog-resource,
.dialog-challenge,
.dialog-save {
  margin-bottom: 0px;
  padding-bottom: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-secondary);
  font-size: calc(var(--font-size-standard) * 1);
  color: var(--color-dark-1);
  select {
    min-width: 8rem;
    max-width: 8rem;
    margin-left: 1rem;
  }
}

&.dice-roll {
  flex-direction: column;

  .dice-total,
  .dice-formula {
    padding-top: 4px;
  }
  .dice-total {
    margin-bottom: 4px;
  }
  .message-header {
    font-family: var(--font-primary);
  }
  img {
    border: 0px;
  }
  .intro-chat {
    border-radius: 20px;
    display: flex;
    flex-direction: row;
    .intro-img {
      padding: 4px;
      width: 80px;
      align-self: center;
    }
    .intro-right {
      display: flex;
      flex-direction: column;
      .introText {
        font-family: var(--font-secondary);
        font-size: calc(var(--font-size-standard) * 1);
        width: 210px;
        margin-left: 20px;
      }
    }
  }
  .result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: calc(var(--font-size-standard) * 1);
    text-shadow: 0 0 10px var(--color-shadow-primary);
  }

  .damage-buttons {
    width: 100%;
    padding: 8px;
    margin-top: 8px;

    .damage-buttons-title {
      font-weight: bold;
      margin-bottom: 8px;
      font-size: calc(var(--font-size-standard) * 0.95);
      text-align: center;
    }

    .damage-buttons-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 6px;
      padding: 8px;
      background-color: rgba(0, 0, 0, 0.1);
      border-radius: 5px;

      &.monster-damage {
        grid-template-columns: 1fr;
        justify-items: center;
      }

      .damage-roll-btn {
        padding: 6px 10px;
        background: linear-gradient(to bottom, #8b4513 0%, #6b3410 100%);
        border: 1px solid #4b2408;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        color: #f0f0e0;
        cursor: pointer;
        border-radius: 4px;
        font-size: calc(var(--font-size-standard) * 0.85);
        font-weight: 500;
        text-align: center;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;

        i {
          font-size: calc(var(--font-size-standard) * 1);
        }

        &:hover {
          background: linear-gradient(to bottom, #9b5523 0%, #7b4420 100%);
          box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
          transform: translateY(-1px);
          border-color: #5b3418;
        }

        &:active {
          transform: translateY(0);
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }
      }
    }
  }

  .damage-result {
    width: 100%;
    padding: 8px;

    ul {
      padding: 0;
      margin: 0;
    }

    .li-apply-wounds {
      list-style: none;
      margin-top: 10px;
      padding: 0;
      display: none;

      > div:first-child {
        font-weight: bold;
        margin-bottom: 8px;
        font-size: calc(var(--font-size-standard) * 0.95);
        text-align: center;
      }

      .combatants-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        margin-top: 5px;
        padding: 8px;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 5px;

        .apply-wounds-btn {
          padding: 6px 10px;
          background: linear-gradient(to bottom, #5a5850 0%, #4b4a44 100%);
          border: 1px solid #2b2a24;
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
          color: #f0f0e0;
          cursor: pointer;
          border-radius: 4px;
          font-size: calc(var(--font-size-standard) * 0.85);
          font-weight: 500;
          text-align: center;
          transition: all 0.2s ease;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          max-width: 100%;

          &:hover {
            background: linear-gradient(to bottom, #6a6860 0%, #5a5850 100%);
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
            transform: translateY(-1px);
            border-color: #3b3a34;
          }

          &:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
          }
        }
      }
    }
  }
}
