/* widget reason update */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 16px;
}

#widget-container {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating Toggle Button */
#widget-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

#widget-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary-hover);
}

/* The Form Card */
.widget-card {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 340px;
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Visibility States */
.hidden {
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  pointer-events: none;
}

#widget-container h3 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  color: var(--text-main);
  font-weight: 700;
}

.field-group {
  margin-bottom: 18px;
}

#widget-container label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

#widget-container input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #f1f5f9;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  color: var(--text-main);
  box-sizing: border-box;
  transition: all 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-submit {
  flex: 2;
  background: var(--primary);
  color: white;
}

.btn-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-submit:disabled {
  background: #a5a6f6;
  cursor: not-allowed;
}

.btn-clear {
  flex: 1;
  background: #f1f5f9;
  color: var(--text-muted);
}

.btn-clear:hover {
  background: #e2e8f0;
}

/* Loading Overlay Style */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  border-radius: var(--radius);
  z-index: 10;
  font-weight: 600;
  color: var(--primary);
}

/* widget reason update */

/* ===== Scrollbar CSS ===== */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #55913b #ffffff;
}

/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: #55913b;
  border-radius: 10px;
  border: 3px solid transparent;
}

body {
  margin: 0;
  background-color: #364f3c;
}
.container {
  height: 100vh;
  width: 100%;
  color: white;
}

.header {
  min-height: 80px;
  background-color: rgb(54 79 60);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-left: 10px;
  padding-right: 10px;
  align-items: flex-end;
  justify-content: flex-start;
  border-bottom-style: solid;
  border-bottom-color: gray;
}
.btnContainer {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  color: green;
  font-size: 30px;
  border-style: solid;
  border-color: gray;
  margin: 5px;
  padding-top: 4px;
  cursor: pointer;
  position: relative;
  min-width: 100px;
  min-height: 100px;
  align-items: center;
  justify-content: center;
  align-content: center;
  text-align: center;
}

.btnContainer:hover {
  background-color: #34c054ef;
}

.user-count {
  position: absolute;
  font-size: 19px;
  top: 0;
  right: 0;
  background-color: white;
  color: red;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

.btnUser {
  background-color: transparent;
  cursor: pointer;
  font-size: 15px;
  border-radius: 10px;
  margin: 5px;
  color: white;
}
.body-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  min-height: calc(100% - 137px);
}
.msg-container {
  min-height: calc(100% - 115px);
  align-items: center;
  display: flex;
  justify-content: flex-start;
  padding-top: 35px;
  flex-direction: column;
  padding-left: 10px;
  padding-right: 10px;
  min-width: 500px;
  max-width: 750px;
}

.msg {
  background-color: #86bb71;
  min-width: calc(100% - 20px);
  min-height: 80px;
  border-radius: 10px;
  display: flex;
  padding: 5px;
  margin-bottom: 45px;
  position: relative;
  max-width: 100%;
}
.arrow {
  position: absolute;
  background-color: #86bb71;
  width: 20px;
  height: 20px;
  top: -8px;
  left: 51px;
  z-index: -1;
  transform: rotate(45deg);
}

.server-time {
  position: absolute;
  right: 20px;
  bottom: 0;
  font-size: 10px;
}

.time {
  position: absolute;
  top: -29px;
}

.left {
  flex: 2;

  display: flex;
  justify-content: space-around;
  align-items: center;
  align-content: center;
  color: white;
}

.left > .sender {
  font-size: 20px;
  flex: 1;
  text-align: center;
  border-right-color: white;
  border-right-style: solid;
  height: 100%;
  justify-content: center;
  align-items: center;
  align-content: center;
  display: flex;
  padding-right: 5px;
  flex-direction: column;
}
.left > .message {
  font-size: 18px;
  flex: 2;
  text-align: center;
  word-break: break-word;
}

.right {
  border-left-style: solid;
  border-left-color: white;
  display: flex;
  align-content: center;
  justify-content: flex-start;
  align-items: center;
  padding-left: 10px;
  display: none;
}

.icon-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-content: center;
  flex-direction: row;
  flex-wrap: wrap;
}
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #686872;
  cursor: pointer;

  border-radius: 10px;
  padding: 5px;
  background-color: #6868721c;
}
.icon > i {
  color: black;
  margin-bottom: 10px;
  font-size: 30px;
}

.icon:hover {
  background-color: #68687247;
}

.icon:hover,
.icon:hover > i {
  color: white;
}

.cover {
  height: 100vh;
  width: 100vw;
  z-index: 9999;
  position: fixed;
  background-color: #cad1c5b0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  color: black;
}

.cover > i {
  margin-right: 20px;
  font-size: 80px;
  color: rgb(110, 26, 26);
}

@media screen and (max-width: 600px) {
  .msg-container {
    min-width: calc(100% - 20px);
  }

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