/* ============================
   General Styles
============================ */
:root {
  --chat-button-primary-color: #1ab744;
  --chat-button-secondary-color: #2196f3;
  --chat-button-text-color: #fff;
  --chat-button-pulse-duration: 1.5s;
  --chat-button-size: 70px;
  --chat-button-font-family: "Lato", sans-serif;
  --chat-button-box-shadow: 0px 0px 10px 10px #dedede;
  --chat-button-border-radius: 5px;
}

/* ============================
   Pulse Button Styles
============================ */
.pulse {
  background: var(--chat-button-primary-color);
  position: fixed;
  bottom: 30px;
  right: 30px;
  font-size: -webkit-xxx-large;
  text-align: center;
  z-index: 9999999;
  border-radius: 50%;
  height: var(--chat-button-size);
  width: var(--chat-button-size);
  line-height: var(--chat-button-size);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* Pulse Animation */
@-webkit-keyframes Animated-pulse {
  0% {
    -webkit-transform: scale(0.1);
    transform: scale(0.1);
    opacity: 0;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    -webkit-transform: scale(2);
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes Animated-pulse {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.pulse:hover,
.pulse:focus {
  transform: scale(1.1);
}

.pulse:nth-child(1) {
  animation: Animated-pulse var(--chat-button-pulse-duration) infinite;
}

.pulse:nth-child(2) {
  animation: Animated-pulse var(--chat-button-pulse-duration) infinite 0.3s;
}

.pulse:nth-child(3) {
  animation: Animated-pulse var(--chat-button-pulse-duration) infinite 0.6s;
}

/* ============================
   Toggle Switch Styles
============================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: var(--chat-button-secondary-color);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(14px);
}

.toggle-switch input:focus + .slider {
  box-shadow: 0 0 4px var(--chat-button-secondary-color);
  outline: 2px solid var(--chat-button-secondary-color);
}

/* =========================
   Chat Button Image Styles
============================ */
.chat-icon img {
    margin-bottom: 9px;
    max-width: 100%;
}

/* ============================
   Accessibility and Hover Styles
============================ */
.pulse:hover,
.pulse:focus {
  transform: scale(1.2);
}

/* ============================
   Admin Panel Section
============================ */
.afcb-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

/* Settings Form */
.afcb-settings-form {
  flex: 1;
  min-width: 55%;
  padding: 25px;
  border-radius: var(--chat-button-border-radius);
  box-shadow: var(--chat-button-box-shadow);
  background: #ffffff;
}

.afcb-settings-form h1 {
  margin-top: 0;
  color: #23282d;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.3;
}

.afcb-settings-form .description {
  color: #646970;
  margin-bottom: 20px;
}

.afcb-settings-form input#submit {
  background: #2271b1;
  border: none;
  font-size: 14px;
  padding: 8px 15px;
  transition: all 0.3s;
  color: var(--chat-button-text-color);
  border-radius: var(--chat-button-border-radius);
  cursor: pointer;
  box-shadow: 0 1px 0 #2271b1;
  height: auto;
  line-height: 1.4;
}

.afcb-settings-form input#submit:hover {
  background: #135e96;
  box-shadow: 0 1px 0 #135e96;
}

.afcb-settings-form input#submit:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

/* Plugin Info */
#afcb-about-plugin {
  flex: 0 0 35%;
  min-width: 300px;
  padding: 20px;
  background: #f6f7f7;
  box-shadow: var(--chat-button-box-shadow);
  border-radius: var(--chat-button-border-radius);
  border: 1px solid #dcdcde;
}

#afcb-about-plugin h2 {
  margin-top: 0;
  color: #23282d;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #dcdcde;
  padding-bottom: 10px;
}

.plugin-info p {
  color: #50575e;
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0;
}

.plugin-info strong {
  color: #23282d;
  font-weight: 600;
}

.plugin-info .description {
  color: #646970;
  font-size: 13px;
  font-style: italic;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dcdcde;
}

/* ============================
   Responsive Adjustments
============================ */
@media (max-width: 1200px) {
  .afcb-container {
    flex-direction: column;
  }

  .afcb-settings-form,
  #afcb-about-plugin {
    flex: 1;
    min-width: 100%;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .afcb-settings-form,
  #afcb-about-plugin {
    padding: 15px;
  }

  .pulse {
    bottom: 20px;
    right: 20px;
    height: 60px;
    width: 60px;
    line-height: 60px;
  }
}