/* Base container positioning */
#userform-container {
  position: fixed;
  z-index: 99999999999;
  right: 20px; 
  bottom: 20px;
  margin-bottom: 0; 
  transition: all 0.3s ease;
}

/* Utility class */
.hide {
  display: none !important;
}

/* Main form styling */
#userform {
  padding: 36px;
  box-sizing: border-box;
  width: 450px;
  max-width: calc(100vw - 40px); 
  background: #3498db;
  border-radius: 12px;
  margin-bottom: 20px; 
  box-shadow: rgba(0, 0, 0, 0.04) 0px 0px 1px, rgb(0 0 0 / 10%) 0px 2px 6px, rgb(0 0 0 / 5%) 5px 10px 20px, rgb(0 0 0 / 5%) 5px 10px 10px;
  transition: width 0.3s ease, padding 0.3s ease;
}

  #userform.hide {
    display: none;
  }

  #userform h2 {
    color: white;
    font-family: Arial, sans-serif;
    margin-top: 0;
    font-size: 1.5rem;
    word-wrap: break-word;
  }

  #userform label {
    color: white;
    font-size: 14px;
    line-height: 24px;
    font-family: Arial, sans-serif;
    display: block;
  }

  #userform input {
    border-radius: 3px;
    border: 1px solid transparent;
    padding: 8px 10px;
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 12px;
    font-size: 1rem;
  }

  #userform button {
    margin-top: 24px;
    display: block;
    padding: 0 14px;
    line-height: 32px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    border-radius: 50px;
    color: white;
    background: transparent;
    border: 1px solid white;
    box-sizing: border-box;
    width: 100% !important;
    transition: background 0.2s ease;
  }

    #userform button:hover {
      background: rgba(0, 0, 0, .2);
      border-color: transparent;
    }

/* Chat button styling - improved fixed positioning */
#userform-button {/* Default size reduced for better experience on all devices */
  height: 60px;
  position: fixed;
  right: 20px; 
  bottom: 20px; 
  transition: all 0.3s ease;
}

  #userform-button button {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #3498db;
    color: white;
    cursor: pointer;
    border: 0;
    outline: none;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  #userform-button svg {
    position: relative;
    top: 0;
    left: 0;
    fill: white;
    width: 100%;
    height: 100%;
    vertical-align: middle;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  #userform-button.minimized svg#chat {
    transform: scale(0.5); 
    opacity: 1;
  }

  #userform-button.minimized svg#minimize {
    transform: scale(0);
    opacity: 0;
    display: none;
  }

  #userform-button.show-form svg#chat {
    transform: scale(0);
    opacity: 0;
    display: none;
  }

  #userform-button.show-form svg#minimize {
    transform: scale(0.5); 
    opacity: 1;
  }

/* Responsive adjustments for medium screens */
@media (max-width: 768px) {
  #userform-container {
    right: 20px; 
    bottom: 20px; 
  }

  #userform {
    width: 380px;
    padding: 28px;
    margin-bottom: 20px;
  }

  #userform-button {
    width: 55px;
    height: 55px;
  }
}

/* Responsive adjustments for small screens */
@media (max-width: 600px), (max-height: 600px) {
  #userform-container {
    right: 15px;
    bottom: 10px;
    margin-bottom: 0;
  }

  #userform {
    width: 300px;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
  }

    #userform h2 {
      font-size: 1.2rem;
      margin-bottom: 12px;
    }

    #userform label {
      font-size: 13px;
      line-height: 20px;
    }

    #userform input {
      padding: 6px 8px;
      margin-bottom: 10px;
      font-size: 14px;
    }

    #userform button {
      margin-top: 16px;
      line-height: 28px;
      font-size: 13px;
    }

  #userform-button {
    width: 50px;
    height: 50px;
    right: 15px;
    bottom: 10px;
  }
}

/* Extra small screens like older smartphones */
@media (max-width: 320px) {
  #userform-container {
    right: 10px;
    bottom: 10px;
  }

  #userform {
    width: 260px;
    padding: 15px;
    max-width: calc(100vw - 20px);
  }

  #userform-button {
    width: 45px;
    height: 45px;
    right: 10px;
    bottom: 10px;
  }
}
/* Base styles for the launcher */
#ujet-launcher {
  position: fixed !important;
  z-index: 99999 !important;
  border-radius: 50% !important;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.05) 5px 10px 20px, rgba(0, 0, 0, 0.05) 5px 10px 10px !important;
  bottom: 15px !important;
  right: 30px !important;
  transition: all 0.3s ease !important;
}

  #ujet-launcher iframe {
    border: 0 !important;
    background: transparent !important;
    vertical-align: middle !important;
    width: 5rem !important;
    height: 5rem !important;
    transition: all 0.3s ease !important;
  }

/* Medium screens */
@media screen and (max-width: 768px) {
  #ujet-launcher {
    bottom: 5px !important;
    right: 5px !important;
  }

    #ujet-launcher iframe {
      width: 4.5rem !important;
      height: 4.5rem !important;
    }
}

/* Small screens */
@media screen and (max-width: 480px) {
  #ujet-launcher {
    bottom: 10px !important;
    right: 20px !important;
  }

    #ujet-launcher iframe {
      width: 4rem !important;
      height: 4rem !important;
    }
}

/* Very small screens */
@media screen and (max-width: 320px) {
  #ujet-launcher {
    bottom: 15px !important;
    right: 15px !important;
  }

    #ujet-launcher iframe {
      width: 3.5rem !important;
      height: 3.5rem !important;
    }
}


