@import url("https://fonts.googleapis.com/css2?family=Tiny5&display=swap");

.machine-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 35vw;
  height: 100vh;
  background: url("/sprites-bubble/machine/ui/machine.png") no-repeat center center;
  background-size: 110%;
  image-rendering: pixelated;
  margin-right: 15px;

  .machine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ecf0f1;
    font-weight: bold;
    margin-top: 47%;
    width: 80%;

    .liquid-tab {
      border-right: 10px solid #a78b8f;
      border-bottom: 10px solid #a78b8f;

      &.active-tab {
        border-right: 10px solid #a78b8f00;
        border-bottom: 10px solid #a78b8f00;
      }
    }

    .tapioca-tab {
      border-left: 10px solid #a78b8f;
      border-bottom: 10px solid #a78b8f;

      &.active-tab {
        border-left: 10px solid #a78b8f00;
        border-bottom: 10px solid #a78b8f00;
      }
    }

    .liquid-tab,
    .tapioca-tab {
      flex: 1;
      text-align: center;
      justify-content: center;
      height: 60px;
      padding: 0.5rem;
      cursor: pointer;
      transition: background-color 0.3s ease;
      color: #a78b8f;

      &.active-tab {
        color: #a78b8f;
      }

      button {
        display: flex;
        justify-content: space-around;
        align-items: flex-end;
        background: none;
        border: none;
        color: inherit;
        font-size: 30px;
        font-weight: inherit;
        font-family: "Tiny5", serif;
        width: 100%;
        height: 90%;
        cursor: pointer;
      }
    }
  }

  .bubbletea-content {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    width: 79%;
    height: 155px;

    p {
      font-weight: bold;
    }

    ul {
      display: flex;
      list-style: none;
      gap: 10px;
      padding: 0;
      margin: 0;
    }

    li {
      padding: 0.5rem 0;

      .custom-checkbox {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 100px;
        height: 100px;
        cursor: pointer;
      
        input[type="checkbox"] {
          appearance: none;
          -webkit-appearance: none;
          width: 100%;
          height: 100%;
          margin: 0;
          background-color: #ECE1E2;
          border: 8px solid #CCABAF;
          outline: none;
          cursor: pointer;
          transition: border-color 0.3s ease;
        }
      
        input[type="checkbox"]:checked {
            background-color: #CBABAE;
            border: 8px solid #A78B8F;
        }

        input[type="checkbox"]:disabled {
            background-color: #b3b3b3;
            border: 8px solid rgb(155, 155, 155);
            opacity: .3;
            cursor:not-allowed;
        }
      
        img {
          position: absolute;
          pointer-events: none;
        }
      
        input[type="checkbox"]:hover {
          border-color: #936C6E;
        }
      }
    }
  }

  .machine-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: none;
    height: 33%;
    width: 63%;

    .ingredient-list {
      flex: 2;
      flex-direction: column;

      .ingredient-title {
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
        font-weight: bold;
        text-decoration: underline;
      }

      ul {
        display: flex;
        gap: 10px;
        list-style: none;
        padding: 0;
        margin: 0;

        li {
          padding: 0.5rem 0;
          font-size: 1rem;

          &:hover {
            color: #1abc9c;
            cursor: pointer;
          }
        }
      }
    }

    .submit-tea {
        display: flex;
        justify-content: center;
        align-items: center;
      
        .submit-button {
          background: url("/sprites-bubble/button/button_default.png") no-repeat center center;
          background-size: cover;
          height: 120px;
            width: 120px;
          border: none;
          border-radius: 5px;
          cursor: pointer;
          transition: background-color 0.3s ease;
      
          &.default {
            background: url("/sprites-bubble/button/button_default.png") no-repeat center center;
            background-size: cover;
          }
      
          &.disabled {
            background: url("/sprites-bubble/button/button_disabled.png") no-repeat center center;
            background-size: cover;
            cursor: not-allowed;
            opacity: 0.5;
          }
      
          &:active {
            background: url("/sprites-bubble/button/button_hover.png") no-repeat center center;
            background-size: cover;
          }
        }
      }
      
  }
}
