$primary-blue: #003366;
$primary-pink: #d81b60;
$light-pink-bg: #fff0f5;
$text-blue: #0056b3;
$bg-color: #f5fafd;
$orange-btn: #d35400;
$error-red: #d32f2f;

$shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
$border-color: #e0e0e0;
$light-gray-bg: #eeeeee;

:root {
  --primary-blue: #{$primary-blue};
  --primary-pink: #{$primary-pink};
  --light-pink-bg: #{$light-pink-bg};
  --text-blue: #{$text-blue};
  --bg-color: #{$bg-color};
  --orange-btn: #{$orange-btn};
  --error-red: #{$error-red};
}

body {
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.layout-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

header {
  padding: 0px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px 0 30px;
  height: 80px;
  background-color: #f5fdff;
  border-bottom: none;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  z-index: 100;

  .back-button {
    background-color: $primary-blue;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .title-container {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 0 20px;
    margin: 0 auto;
    max-width: 70%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;

    h1 {
      color: $primary-blue;
      font-size: 25px;
      margin: 0;
      font-weight: 500;
      line-height: 1.2;
      text-transform: capitalize;
      width: 100%;
    }

    .subtitle {
      color: $primary-blue;
      font-size: 16px;
      margin-top: 2px;
      text-transform: none;
      width: 80%;
    }
  }

  .menu-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;

    .triangle-btn {
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
      transition: transform 0.2s;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;

      &:hover {
        transform: scale(1.1);
      }

      img {
        width: 50px;
        height: auto;
        display: block;
      }
    }

    .dropdown-menu {
      display: none;
      position: absolute;
      top: 100%;
      right: 0;
      background-color: $light-gray-bg;
      min-width: 260px;
      box-shadow: $shadow;
      padding: 15px;
      border-radius: 10px;
      z-index: 1000;
      flex-direction: column;
      gap: 10px;
      margin-top: 5px;

      &.show {
        display: flex;
      }

      .menu-item {
        display: block;
        width: 100%;
        padding: 12px 15px;
        text-decoration: none;
        color: white;
        font-weight: bold;
        font-size: 15px;
        text-align: center;
        border-radius: 6px;
        box-sizing: border-box;
        transition: opacity 0.2s;
        border: none;
        cursor: pointer;
        font-family: inherit;

        &:hover {
          opacity: 0.9;
        }
      }

      .btn-orange {
        background-color: #f89d1c;
      }

      .btn-pink {
        background-color: $primary-pink;
      }

      .btn-cyan {
        background-color: #00aeef;
      }
    }
  }

  @media (max-width: 900px) {
    padding: 5px 15px 0 15px;
    height: 70px;

    .back-button {
      padding: 6px 12px;
      font-size: 12px;
    }

    .title-container {
      padding: 10px 10px 0 10px;
      max-width: 60%;

      h1 {
        font-family: Rubik;
        font-weight: 500;
        font-style: Medium;
        font-size: 35px;
        padding-bottom: NONE;
        line-height: 100%;
        letter-spacing: 0px;
        text-align: center;
        vertical-align: middle;
        color: #ff0000;
      }

      .subtitle {
        font-size: 12px;
      }
    }

    .menu-wrapper {
      .triangle-btn {
        width: 35px;
        height: 35px;

        img {
          width: 35px;
        }
      }

      .dropdown-menu {
        min-width: 200px;
        padding: 10px;

        .menu-item {
          font-size: 14px;
          padding: 10px;
        }
      }
    }
  }
}
