@layer components {
  
  /* Items with borders */
  .bordered-item {
    margin: 1rem;
    border: 2px solid var(--grey-dark);
    border-radius: 1rem;
    box-shadow: 0.25rem 0.125rem var(--grey);
    padding: 1rem;
  }

  .header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: var(--grey-darker);
    color: var(--white);
    border: none;
    border-bottom: 1px solid var(--grey);
    box-shadow: 0px 4px 2px var(--black-tp-2);
    position: relative;
    z-index: 10;
  }

  .logo {
    display: flex;
    align-items: center;
  }

  .logo img {
    width: auto;
    height: 56px;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .chat-title {
    height: 64px;
    line-height: 64px;
    margin-left: 15px;
    padding-right: 15px;
    border-right: 1px solid var(--grey);
  }

  .chatbot-type {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    width: 146px;
    padding-left: 15px;
    padding-right: 15px;
    border-left: 1px solid var(--grey);
    border-right: 1px solid var(--grey);
  }

  .new-actions {
    display: flex;
    border-right: 1px solid var(--grey);
  }

  .new-actions:hover .dropdown > button {
    background-color: var(--grey);
  }

  .new-actions .dropdown{
    width: 64px;
  }

  .new-actions .dropdown > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 8px;
    box-sizing: border-box;
    background-color: var(--grey-darker);
    border: none;
    cursor: pointer;
    transition: background-color 0.1s ease;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
  }

  .new-actions img {
    width: 28px;
    height: 28px;
    display: block;
  }

  .new-actions img:hover {
    background-color: var(--grey);
  }

  .new-actions .dropdown > button{
    background-color: var(--grey-darker);
    transition: background-color 0.1s ease;
  }

  .new-actions .dropdown > button[aria-expanded="true"] {
    background-color: var(--grey);
  }

  .chat-actions {
    display: flex;
    margin-left: auto;
    border-left: 1px solid var(--grey);
  }

  .chat-actions:hover .dropdown > button {
    background-color: var(--grey);
  }

  .chat-actions .dropdown > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 8px;
    box-sizing: border-box;
    background-color: var(--grey-darker);
    border: none;
    cursor: pointer;
    transition: background-color 0.1s ease;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
  }

  .chat-actions .dropdown {
    width: 64px;
    align-items: center;
    justify-content: center;
  }

  .chat-actions .dropdown > button{
    background-color: var(--grey-darker);
    transition: background-color 0.1s ease;
  }

  .chat-actions .dropdown > button[aria-expanded="true"] {
    background-color: var(--grey);
  }

  .dropdown {
    position: relative;
  }

  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--grey);
    border: 1px solid var(--grey);
    box-shadow: 0 4px 8px var(--black-tp-1);
    padding: 0.25rem 0;
    list-style: none;
    margin: 0;
    min-width: 16rem;
    z-index: 100;
  }

  .dropdown-menu.open  {
    display: block;
  }

  .dropdown-menu li {
    margin: 0;
    color: var(--white);
  }

  .dropdown-menu li + li {
    border-top: 1px solid var(--grey-darker);
  }

  .dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
  }

  .dropdown-menu a:hover {
    background-color: var(--grey-lighter);
  }

  .profile-section {
    display: grid;
    justify-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--grey-darker);
  }

  /* Home Page Header */
  .topbar {
    display: flex;
    justify-content: space-between;
    max-height: 50px;
    border-bottom: 1px solid var(--grey-light);
  }
  .topbar a {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .home-logo {
    display: flex;
    align-items: center;
  }

  .home-logo img {
    width: auto;
    height: 42px;
    padding: 0.75rem;
  }

  .home-right-section {
    display: flex;

  }

  footer a {
    color: var(--black);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    padding: 5px;
  }
  footer a:visited {
    color: var(--black);
    text-decoration: none;
  }
  
  .home-links {
    display: flex;
    align-items: center;
    margin-right: 0.25rem;
    margin-left: auto;
  }
  .home-links a {
    margin-right: 0.25rem;
  }
  .home-links a:hover {
    color: var(--main-blue);
    text-decoration: underline;
  }
  .home-links a:visited {
    color: var(--main-blue);
    text-decoration: none;
  }

  .home-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--grey-light);
    padding-left: 0.25rem;
  }
  .sign-up-button {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
  }
  .sign-up-button a:hover {
    color: var(--main-blue);
    text-decoration: underline;
  }
  .sign-up-button a:visited {
    color: var(--main-blue);
    text-decoration: none;
  }
  .login-button a {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border: 1px solid var(--black);
    border-radius: 999px;
    background-color: var(--main-blue);
    color: var(--white);
    margin-left: 0.25rem;
    margin-right: 0.25rem;
  }
  .login-button a:hover {
    background-color: var(--main-blue-lighter);
    color: var(--whitest);
    box-shadow: 0 1px 10px var(--black-tp-1);
  }
  

  /* Footer Elements */
  footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem;
    border-top: 1px solid var(--grey-lightest);
    background: var(--white);
  }
  footer p,
  footer a {
    font: var(--default-font);
    color: var(--black);
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  footer a:hover {
    text-decoration: underline;
  }

  @media (min-width: 768px) {
    .header h1 {
      font-size: 2rem;
    }
    .topbar {
      min-height: 75px;
      margin-left: 2rem;
      margin-right: 2rem;
    }
    .home-logo img {
      height: 67px;
    }
    .home-links a,
    .sign-up-button a,
    .login-button a {
      text-decoration: none;
      font-size: 1.25rem;
      margin-left: 1rem;
      margin-right: 1rem;
    }
    footer a {
      padding-left: 1.5rem;
      padding-right: 1.5rem;
    }
  }  
}
