/* ===========================
   Custom Icon Fonts
   =========================== */
@font-face {
  font-family: 'icomoon';
  src: url('../fonts/icomoon.eot?dacxy3');
  src: url('../fonts/icomoon.eot?dacxy3#iefix') format('embedded-opentype'),
    url('../fonts/icomoon.ttf?dacxy3') format('truetype'),
    url('../fonts/icomoon.woff?dacxy3') format('woff'),
    url('../fonts/icomoon.svg?dacxy3#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* ===========================
   Kalameh Persian Font
   =========================== */
@font-face {
  font-family: 'KalamehWebFaNum';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/KalamehWebFaNum-Regular.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'KalamehWebFaNum';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/KalamehWebFaNum-SemiBold.woff') format('woff');
  font-display: swap;
}

[class^="icon-"],
[class*=" icon-"] {
  font-family: 'icomoon' !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-igap:before {
  content: "\e902";
}

.icon-rubika:before {
  content: "\e903";
}

.icon-sorosh:before {
  content: "\e904";
}

.icon-bale:before {
  content: "\e900";
}

.icon-eita:before {
  content: "\e901";
}

/* ===========================
   Global Styles & Animations
   =========================== */
@keyframes wtpheartbeat {
  0% {
    -moz-box-shadow: 0 0 0 0 rgba(109, 109, 109, 0.25);
    box-shadow: 0 0 0 0 rgba(109, 109, 109, 0.25);
  }

  70% {
    -moz-box-shadow: 0 0 0 10px rgba(109, 109, 109, 0);
    box-shadow: 0 0 0 10px rgba(109, 109, 109, 0);
  }

  100% {
    -moz-box-shadow: 0 0 0 0 rgba(109, 109, 109, 0);
    box-shadow: 0 0 0 0 rgba(109, 109, 109, 0);
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   Common Overlay Styles
   =========================== */
.wtp-support-widget--container-overlay,
.wtp-support-widget--container-overlay--2,
.wtp-support-widget--container-overlay--3,
.wtp-support-widget--container-overlay--4,
.wtp-support-widget--container-overlay--5 {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 9990;
  backdrop-filter: blur(4px);
  background-color: rgba(0, 0, 0, 0.06);
  display: none;
}

/* ===========================
   Shake Notice
   =========================== */
.wtp-support-shake-notice {
  display: none;
  background-color: #ffffff;
  padding: 6px 10px;
  position: fixed;
  bottom: 85px;
  right: 15px;
  left: 15px;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  box-shadow: 0px 0px 6px #00000014;
  font-size: 12px;
  z-index: 9999;
}

@media screen and (max-height: 992px) {
  .wtp-support-shake-notice {
    display: block;
  }
}

/* ===========================
   WIDGET TYPE 1 - Classic Style
   =========================== */
.wtp-support-widget--container {
  z-index: 9999;
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column-reverse;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--button {
  width: 54px;
  height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(140.29deg, #00c586 21.1%, #007c54 112.76%);
  border-radius: 15px;
  cursor: pointer;
  animation: wtpheartbeat 2s infinite;
  position: relative;
}

.wtp-support-widget--button-welcome {
  position: absolute;
  right: 66px;
  top: 10px;
  background-color: #ffffff;
  padding: 6px 10px 5px;
  width: max-content;
  max-width: 210px;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  box-shadow: 0px 0px 6px #00000014;
  font-size: 14px;
  font-weight: 600;
  opacity: 1;
  transition: all 0.1s;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--button-active {
  width: 54px;
  height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f63b3b;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0px 1px 6px rgb(0 0 0 / 10%);
  animation: none;
}

.wtp-support-widget--button-active .wtp-support-widget--button-welcome {
  opacity: 0;
}

.wtp-support-widget--button-open {
  width: 26px;
  height: 24px;
}

.wtp-support-widget--button-close {
  width: 20px;
  height: 20px;
  display: none;
}

.wtp-support-widget--panel {
  display: none;
}

.wtp-support-widget--panel-item {
  border-radius: 15px;
  margin-bottom: 12px;
  box-shadow: 0px 1px 6px rgb(0 0 0 / 10%);
}

.wtp-support-widget--panel-item a {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  color: #2a2a2a;
}

.wtp-support-widget--panel-item a div {
  position: absolute;
  top: 10px;
  right: 65px;
  width: max-content;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 15px;
  background-color: #fff;
  box-shadow: 0px 1px 6px rgb(0 0 0 / 10%);
  border-radius: 8px;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--panel-item i {
  font-size: 25px;
  color: #fff;
}

/* Widget Type 1 - Position-aware UX */
.wtp-support-widget--container.wtp-pos-top {
  flex-direction: column;
}

.wtp-support-widget--container.wtp-pos-top .wtp-support-widget--button-welcome {
  top: unset;
  bottom: 66px;
}

.wtp-support-widget--container.wtp-pos-top .wtp-support-widget--panel-item a div {
  top: unset;
  bottom: 10px;
}

/* ===========================
   WIDGET TYPE 2 - Card Style
   =========================== */
.wtp-support-widget--container--2 {
  z-index: 9999;
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px 10px 10px;
  width: 300px;
  border-radius: 15px 15px 15px 30px;
  background: #fff;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--content--2 {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.wtp-support-widget--context--2 {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wtp-support-widget--icon--2 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtp-support-widget--icon--circle--2 {
  width: 54px;
  height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wtp-support-widget--icon--svg--2 {
  padding: 13px;
  border-radius: 50%;
  background-color: #4040fb28;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtp-support-widget--icon--svg--2 img {
  width: 24px;
  height: 24px;
}

.wtp-support-widget--content--title--2 {
  color: #4f4f4f;
  font-size: 16px;
  font-weight: 600;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--content--text--2 {
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 300;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--content--text--2 span {
  color: #4040fb;
  font-size: 13px;
  font-weight: 400;
  padding: 0px 8px;
  background-color: #4040fb28;
  border-radius: 3px;
  margin: 0px 3px;
}

.wtp-support-widget--panel--2 {
  padding: 0 0 20px;
  display: none;
}

.wtp-support-widget--panel-item--2 {
  border-radius: 15px;
  margin-bottom: 12px;
  box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.03);
  border: 1px solid #f2f2f2;
}

.wtp-support-widget--panel-item--2 a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.wtp-support-widget--panel-item--2 a div {
  width: max-content;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 15px;
  border-radius: 8px;
  color: #2a2a2a;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--panel-item--2 i {
  font-size: 22px;
  color: #fff;
  padding: 8px;
  border-radius: 6px;
}

.wtp-support-widget--button-close--2 {
  display: none;
}

.wtp-support-widget--content-active .wtp-support-widget--button-close--2 {
  display: block;
}

.wtp-support-widget--icon--svg--2 img.wtp-support-widget--button-close--2 {
  width: 20px;
  height: 20px;
}

.wtp-support-widget--content-active .wtp-support-widget--button-open--2 {
  display: none;
}

.wtp-support-widget--content-active .wtp-support-widget--icon--svg--2 {
  background-color: #f63b3b !important;
  padding: 15px;
}

/* Widget Type 2 - Position-aware UX */
.wtp-support-widget--container--2.wtp-pos-top {
  display: flex;
  flex-direction: column-reverse;
}

.wtp-support-widget--container--2.wtp-pos-top .wtp-support-widget--panel--2 {
  padding: 20px 0 0;
}

/* ===========================
   WIDGET TYPE 3 - Consultation Form
   =========================== */
.wtp-support-widget--container--3 {
  z-index: 9999;
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px 10px 10px;
  width: 300px;
  border-radius: 15px 15px 15px 30px;
  background: #fff;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--content--3 {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.wtp-support-widget--context--3 {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wtp-support-widget--icon--3 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtp-support-widget--icon--circle--3 {
  width: 54px;
  height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wtp-support-widget--icon--svg--3 {
  padding: 13px;
  border-radius: 50%;
  background-color: #4040fb28;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtp-support-widget--icon--svg--3 img {
  width: 24px;
  height: 24px;
}

.wtp-support-widget--content--title--3 {
  color: #4f4f4f;
  font-size: 16px;
  font-weight: 600;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--content--text--3 {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 300;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--panel--3 {
  padding: 0 0 20px;
  display: none;
}

.wtp-support-widget--button-close--3 {
  display: none;
}

.wtp-support-widget--content-active .wtp-support-widget--button-close--3 {
  display: block;
}

.wtp-support-widget--icon--svg--3 img.wtp-support-widget--button-close--3 {
  width: 20px;
  height: 20px;
}

.wtp-support-widget--content-active .wtp-support-widget--button-open--3 {
  display: none;
}

.wtp-support-widget--content-active .wtp-support-widget--icon--svg--3 {
  background-color: #f63b3b !important;
  padding: 15px;
}

/* Widget Type 3 - Position-aware UX */
.wtp-support-widget--container--3.wtp-pos-top {
  display: flex;
  flex-direction: column-reverse;
}

.wtp-support-widget--container--3.wtp-pos-top .wtp-support-widget--panel--3 {
  padding: 20px 0 0;
}

/* Consultation Form Styles */
.wtp-consultation-form {
  padding: 5px 5px 10px 5px;
  box-sizing: border-box;
}

.wtp-consultation-form-group {
  margin-bottom: 15px;
  width: 100%;
  box-sizing: border-box;
}

.wtp-consultation-form-group label {
  display: block;
  margin-bottom: 5px;
  color: #645a5a;
  font-size: 13px;
  font-weight: 600;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-consultation-form-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ececec;
  outline: none;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-consultation-submit {
  width: 100%;
  padding: 10px;
  background: linear-gradient(140.29deg, #00c586 21.1%, #007c54 112.76%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-consultation-submit:hover {
  opacity: 0.9;
}

.wtp-consultation-submit:disabled {
  background: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.wtp-message {
  padding: 12px 15px;
  margin: 0 0 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
  animation: slideIn 0.3s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wtp-message i {
  margin-left: 8px;
}

.wtp-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.wtp-error {
  background-color: #fdecea;
  color: #d32f2f;
  border: 1px solid #ffcdd2;
}

/* ===========================
   WIDGET TYPE 4 - Floating Circle
   =========================== */
.wtp-support-widget--container--4 {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--main-button--4 {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c586, #00c586dd);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  order: 2;
}

.wtp-support-widget--main-button--4:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.wtp-support-widget--icon-wrapper--4 {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wtp-support-widget--button-open--4,
.wtp-support-widget--button-close--4 {
  width: 28px;
  height: 28px;
  position: absolute;
  transition: all 0.3s ease;
}

.wtp-support-widget--button-close--4 {
  opacity: 0;
  transform: rotate(180deg);
}

.wtp-support-widget--tooltip--4 {
  position: absolute;
  right: 75px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 200px;
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--tooltip--4::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: #333;
}

.wtp-support-widget--main-button--4:hover .wtp-support-widget--tooltip--4 {
  opacity: 1;
  visibility: visible;
}

/* Hide tooltip when widget is active (opened) */
.wtp-support-widget--container--4.active .wtp-support-widget--tooltip--4 {
  opacity: 0 !important;
  visibility: hidden !important;
}

.wtp-support-widget--actions--4 {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
  align-items: flex-end;
  order: 1;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(20px);
}

.wtp-support-widget--container--4.active .wtp-support-widget--actions--4 {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wtp-support-widget--container--4.active .wtp-support-widget--button-open--4 {
  opacity: 0;
  transform: rotate(-180deg);
}

.wtp-support-widget--container--4.active .wtp-support-widget--button-close--4 {
  opacity: 1;
  transform: rotate(0deg);
}

.wtp-support-widget--container--4.active .wtp-support-widget--main-button--4 {
  background: #ff4757;
  animation: none;
}

.wtp-support-widget--action-item--4 {
  display: flex;
  align-items: center;
  gap: 15px;
  animation: slideInUp 0.3s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.wtp-support-widget--container--4.active .wtp-support-widget--action-item--4 {
  animation: slideInUp 0.3s ease forwards;
}

.wtp-support-widget--action-button--4 {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.wtp-support-widget--action-button--4:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.wtp-support-widget--action-label--4 {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  transform: translateX(10px);
  font-family: KalamehWebFaNum, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wtp-support-widget--action-label--4.left-side {
  transform: translateX(-10px);
}

.wtp-support-widget--action-item--4:hover .wtp-support-widget--action-label--4 {
  opacity: 1;
  transform: translateX(0);
}

.wtp-support-widget--action-item--4 a {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: inherit;
}

.wtp-support-widget--container--4.active+.wtp-support-widget--container-overlay--4 {
  opacity: 1;
  visibility: visible;
}

/* Widget Type 4 - Position-aware UX */
/* When positioned at top, actions should expand DOWNWARD */
.wtp-support-widget--container--4.wtp-pos-top {
  flex-direction: column-reverse;
}

.wtp-support-widget--container--4.wtp-pos-top .wtp-support-widget--main-button--4 {
  order: 1;
}

.wtp-support-widget--container--4.wtp-pos-top .wtp-support-widget--actions--4 {
  order: 2;
  margin-bottom: 0;
  margin-top: 15px;
  transform: translateY(-20px);
}

.wtp-support-widget--container--4.wtp-pos-top.active .wtp-support-widget--actions--4 {
  transform: translateY(0);
}

.wtp-support-widget--container--4.wtp-pos-top .wtp-support-widget--action-item--4 {
  transform: translateY(-20px);
}

.wtp-support-widget--container--4.wtp-pos-top.active .wtp-support-widget--action-item--4 {
  animation: slideInDown 0.3s ease forwards;
}

@keyframes slideInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Widget Type 4 - Left side adjustments */
.wtp-support-widget--container--4.wtp-pos-left {
  align-items: flex-start;
}

.wtp-support-widget--container--4.wtp-pos-left .wtp-support-widget--actions--4 {
  align-items: flex-start;
}

.wtp-support-widget--container--4.wtp-pos-left .wtp-support-widget--action-item--4 a {
  flex-direction: row-reverse;
}

.wtp-support-widget--container--4.wtp-pos-left .wtp-support-widget--tooltip--4 {
  right: auto;
  left: 75px;
}

.wtp-support-widget--container--4.wtp-pos-left .wtp-support-widget--tooltip--4::after {
  left: auto;
  right: -8px;
  border-right-color: transparent;
  border-left-color: #333;
}

/* ===========================
   WIDGET TYPE 5 - Slide-out Sidebar
   =========================== */
/* Note: Most Widget Type 5 styles are in the template file for better organization */
.wtp-support-widget--container--5.active+.wtp-support-widget--container-overlay--5 {
  opacity: 1;
  visibility: visible;
}

/* ===========================
   Position Presets (Admin)
   =========================== */
.wtp-position-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 200px;
}

.wtp-position-presets .position-preset {
  width: 90px;
  height: 70px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.wtp-position-presets .position-preset:hover {
  border-color: #3B82F6;
  background: #f0f0f0;
}

.wtp-position-presets .position-preset.active {
  border-color: #3B82F6;
  background: #d8e6fb;
}

.wtp-position-presets .position-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #3B82F6;
  border-radius: 4px;
}

.wtp-position-presets .position-icon.top-left {
  top: 8px;
  left: 8px;
}

.wtp-position-presets .position-icon.top-right {
  top: 8px;
  right: 8px;
}

.wtp-position-presets .position-icon.bottom-left {
  bottom: 8px;
  left: 8px;
}

.wtp-position-presets .position-icon.bottom-right {
  bottom: 8px;
  right: 8px;
}

.wtp-setting-position-offset .offset-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wtp-setting-position-offset .offset-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wtp-setting-position-offset .offset-control label {
  font-size: 13px;
  min-width: 80px;
}

.wtp-setting-position-offset .offset-control input {
  width: 80px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

.wtp-setting-position-offset .offset-control span {
  font-size: 12px;
  color: #666;
}

/* Side Position Presets (for type5 sidebar widget) */
.wtp-side-position-presets {
  display: flex;
  gap: 15px;
}

.wtp-side-position-presets .side-position-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100px;
  height: 70px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #f9f9f9;
  cursor: pointer;
  transition: all 0.2s;
}

.wtp-side-position-presets .side-position-preset:hover {
  border-color: #3B82F6;
  background: #f0f0f0;
}

.wtp-side-position-presets .side-position-preset.active {
  border-color: #3B82F6;
  background: #d8e6fb;
}

.wtp-side-position-presets .side-position-icon {
  font-size: 18px;
  color: #3B82F6;
}

.wtp-side-position-presets .side-position-label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.wtp-side-position-presets .side-position-preset.active .side-position-label {
  color: #3B82F6;
}

/* Scheduling Settings */
.wtp-setting-schedule-days .wtp-setting-days-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wtp-setting-days-checkboxes input[type="checkbox"] {
  display: none;
}

.wtp-setting-days-checkboxes label {
  padding: 8px 16px;
  background: #f5f5f5;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.wtp-setting-days-checkboxes input[type="checkbox"]:checked+label {
  background: #3B82F6;
  color: white;
  border-color: #3B82F6;
}

.wtp-setting-days-checkboxes label:hover {
  border-color: #3B82F6;
  background: #d5e5ff;
}

.wtp-setting-schedule-time .wtp-setting-time-inputs {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.wtp-setting-time-inputs label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.wtp-setting-time-inputs input[type="time"] {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  direction: ltr;
  text-align: center;
  min-width: 120px;
  transition: border-color 0.2s;
}

.wtp-setting-time-inputs input[type="time"]:focus {
  outline: none;
  border-color: #3B82F6;
}


/* Widget Scale Control */
.wtp-scale-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.wtp-scale-label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  min-width: 40px;
}

.wtp-scale-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #ddd 0%, #3B82F6 50%, #ddd 100%);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}

.wtp-scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #3B82F6;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.wtp-scale-slider::-webkit-slider-thumb:hover {
  background: #00a672;
  transform: scale(1.1);
}

.wtp-scale-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #3B82F6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.wtp-scale-slider::-moz-range-thumb:hover {
  background: #00a672;
  transform: scale(1.1);
}

.wtp-scale-value {
  font-size: 14px;
  font-weight: 600;
  color: #3B82F6;
  min-width: 50px;
  text-align: center;
}


/* Animation Settings */
.wtp-animation-type-select {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.wtp-animation-type-select:focus {
  outline: none;
  border-color: #3B82F6;
}

.wtp-animation-duration-wrapper,
.wtp-animation-delay-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.wtp-animation-duration-slider,
.wtp-animation-delay-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #ddd 0%, #3B82F6 50%, #ddd 100%);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}

.wtp-animation-duration-slider::-webkit-slider-thumb,
.wtp-animation-delay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #3B82F6;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.wtp-animation-duration-slider::-webkit-slider-thumb:hover,
.wtp-animation-delay-slider::-webkit-slider-thumb:hover {
  background: #00a672;
  transform: scale(1.1);
}

.wtp-animation-duration-slider::-moz-range-thumb,
.wtp-animation-delay-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #3B82F6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.wtp-animation-duration-slider::-moz-range-thumb:hover,
.wtp-animation-delay-slider::-moz-range-thumb:hover {
  background: #00a672;
  transform: scale(1.1);
}

.wtp-animation-duration-value,
.wtp-animation-delay-value {
  font-size: 13px;
  font-weight: 600;
  color: #3B82F6;
  min-width: 45px;
  text-align: center;
}

/* Widget Animation Keyframes */
@keyframes wtpFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes wtpSlideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes wtpSlideInLeft {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes wtpSlideInTop {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes wtpSlideInBottom {
  from {
    transform: translateY(100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes wtpBounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }

  50% {
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes wtpZoomIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes wtpFlipIn {
  from {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }

  to {
    transform: perspective(400px) rotateY(0deg);
    opacity: 1;
  }
}

/* Widget animation classes */
.wtp-widget-animated {
  animation-duration: 0.6s;
  animation-fill-mode: both;
  animation-timing-function: ease-out;
  will-change: transform, opacity;
}

.wtp-widget-anim-fade {
  animation-name: wtpFadeIn;
}

.wtp-widget-anim-slide {
  animation-name: wtpSlideInBottom;
}

.wtp-widget-anim-slide.wtp-pos-top {
  animation-name: wtpSlideInTop;
}

.wtp-widget-anim-slide.wtp-pos-left {
  animation-name: wtpSlideInLeft;
}

.wtp-widget-anim-slide.wtp-pos-right {
  animation-name: wtpSlideInRight;
}

.wtp-widget-anim-bounce {
  animation-name: wtpBounceIn;
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wtp-widget-anim-zoom {
  animation-name: wtpZoomIn;
  animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wtp-widget-anim-flip {
  animation-name: wtpFlipIn;
  animation-duration: 0.8s;
  animation-timing-function: ease-out;
  perspective: 1000px;
}

/* Special animations for Type 5 (sidebar) that preserve translateY(-50%) */
.wtp-support-widget--container--5.wtp-widget-anim-slide {
  animation-name: wtpSlideInType5Right;
}

.wtp-support-widget--container--5.wtp-widget-anim-slide.wtp-pos-left {
  animation-name: wtpSlideInType5Left;
}

@keyframes wtpSlideInType5Right {
  from {
    transform: translateY(-50%) translateX(100px);
    opacity: 0;
  }

  to {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}

@keyframes wtpSlideInType5Left {
  from {
    transform: translateY(-50%) translateX(-100px);
    opacity: 0;
  }

  to {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}

.wtp-support-widget--container--5.wtp-widget-anim-fade {
  animation-name: wtpFadeInType5;
}

@keyframes wtpFadeInType5 {
  from {
    transform: translateY(-50%);
    opacity: 0;
  }

  to {
    transform: translateY(-50%);
    opacity: 1;
  }
}

.wtp-support-widget--container--5.wtp-widget-anim-zoom {
  animation-name: wtpZoomInType5;
}

@keyframes wtpZoomInType5 {
  from {
    transform: translateY(-50%) scale(0);
    opacity: 0;
  }

  to {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

.wtp-support-widget--container--5.wtp-widget-anim-bounce {
  animation-name: wtpBounceInType5;
}

@keyframes wtpBounceInType5 {
  0% {
    transform: translateY(-50%) scale(0.3);
    opacity: 0;
  }

  50% {
    transform: translateY(-50%) scale(1.05);
  }

  70% {
    transform: translateY(-50%) scale(0.9);
  }

  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}


/* Live Preview System */
.wtp-preview-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
}

.wtp-preview-controls label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.wtp-preview-scale {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.wtp-preview-scale::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #3B82F6;
  border-radius: 50%;
  cursor: pointer;
}

.wtp-preview-scale::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #3B82F6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.wtp-preview-scale-value {
  font-size: 12px;
  font-weight: 600;
  color: #3B82F6;
  min-width: 40px;
}

/* Old simplified preview CSS removed - now using AJAX-loaded templates */


/* Select Element Styling - Match Plugin Design */
.wtp-animation-type-select,
select[name*="wtp_widgets"] {
  border-radius: 6px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  padding: 8px 12px;
  font-size: 13px;
  color: #475569;
  transition: all 0.2s ease;
  width: 100%;
  padding: 10px 15px;
  font-family: "KalamehWebFaNum", sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 20px;
  padding-left: 40px;
}

.wtp-animation-type-select:hover,
select[name*="wtp_widgets"]:hover {
  border-color: #3B82F6;
}

.wtp-animation-type-select:focus,
select[name*="wtp_widgets"]:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}


/* ============================================
   Live Preview System - Viewport & Scene
   ============================================ */

/* Viewport - The visible frame/window */
.wtp-live-preview-viewport {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scene - Container for the widget preview */
.wtp-live-preview-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.2s ease;
}

/* Loading and Error states - centered in viewport */
.wtp-live-preview-viewport .wtp-preview-loading,
.wtp-live-preview-viewport .wtp-preview-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 16px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100;
  white-space: nowrap;
}

.wtp-live-preview-viewport .wtp-preview-error {
  color: #e74c3c;
  border: 1px solid #fce4e4;
}

/* Reset widget positioning in preview - center all widgets */
.wtp-live-preview-scene [class*="wtp-support-widget--container"],
.wtp-live-preview-scene [class*="wtp-widget-"] {
  position: relative !important;
  top: unset !important;
  bottom: unset !important;
  left: unset !important;
  right: unset !important;
  transform: none !important;
  margin: 0 auto !important;
}

/* Widget Type 5 specific - remove vertical centering transform */
.wtp-live-preview-scene .wtp-support-widget--container--5 {
  transform: none !important;
}

/* Show panels in preview - they're normally hidden until clicked */
.wtp-live-preview-scene .wtp-support-widget--panel,
.wtp-live-preview-scene .wtp-support-widget--panel--2,
.wtp-live-preview-scene .wtp-support-widget--panel--3,
.wtp-live-preview-scene .wtp-support-widget--panel--5 {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Show type 4 action buttons in preview */
.wtp-live-preview-scene .wtp-support-widget--actions--4 {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Type 4 action items in preview - show them expanded */
.wtp-live-preview-scene .wtp-support-widget--action-item--4 {
  opacity: 1 !important;
  transform: none !important;
}

/* Remove animations in preview for instant display */
.wtp-live-preview-scene .wtp-widget-animated {
  animation: none !important;
  animation-delay: 0s !important;
}

/* Hide overlays in preview - they cover the whole viewport */
.wtp-live-preview-scene .wtp-support-widget--container-overlay,
.wtp-live-preview-scene .wtp-support-widget--container-overlay--2,
.wtp-live-preview-scene .wtp-support-widget--container-overlay--3,
.wtp-live-preview-scene .wtp-support-widget--container-overlay--4,
.wtp-live-preview-scene [class*="wtp-overlay-"] {
  display: none !important;
}

/* Disable all pointer events in preview */
.wtp-live-preview-scene * {
  pointer-events: none !important;
  user-select: none !important;
}

/* Ensure proper z-index layering */
.wtp-live-preview-scene [class*="wtp-support-widget--container"],
.wtp-live-preview-scene [class*="wtp-widget-"] {
  z-index: 10 !important;
}

/* Type 5 sidebar specific adjustments for preview */
.wtp-live-preview-scene .wtp-support-widget--panel--5 {
  transform: translateX(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Type 5 - show as active in preview */
.wtp-live-preview-scene .wtp-support-widget--container--5 {
  display: flex !important;
  flex-direction: row !important;
}

.wtp-live-preview-scene .wtp-support-widget--container--5.sidebar-left {
  flex-direction: row-reverse !important;
}

/* ============================================
   Live Preview - Icon Sizes & Consistency
   ============================================ */

/* Ensure FontAwesome icons display at correct sizes in preview */
.wtp-live-preview-scene .wtp-support-widget--panel-item i,
.wtp-live-preview-scene .wtp-support-widget--panel-item--2 i {
  font-size: 22px !important;
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wtp-live-preview-scene .wtp-support-widget--action-button--4 i {
  font-size: 20px !important;
}

.wtp-live-preview-scene .wtp-support-widget--contact-icon--5 i {
  font-size: 16px !important;
}

/* Ensure images in preview are properly sized */
.wtp-live-preview-scene .wtp-support-widget--button-open,
.wtp-live-preview-scene .wtp-support-widget--button-close {
  width: 26px !important;
  height: 24px !important;
}

.wtp-live-preview-scene .wtp-support-widget--icon--svg--2 img,
.wtp-live-preview-scene .wtp-support-widget--icon--svg--3 img {
  width: 24px !important;
  height: 24px !important;
}

.wtp-live-preview-scene .wtp-support-widget--button-open--4,
.wtp-live-preview-scene .wtp-support-widget--button-close--4 {
  width: 28px !important;
  height: 28px !important;
}

.wtp-live-preview-scene .wtp-support-widget--button-open--5,
.wtp-live-preview-scene .wtp-support-widget--button-close--5 {
  width: 20px !important;
  height: 20px !important;
}

/* Ensure consistent box sizing */
.wtp-live-preview-scene * {
  box-sizing: border-box !important;
}

/* Fix for widget panel items in preview */
.wtp-live-preview-scene .wtp-support-widget--panel-item a,
.wtp-live-preview-scene .wtp-support-widget--panel-item--2 a {
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

/* Hide welcome tooltips in preview for cleaner view */
.wtp-live-preview-scene .wtp-support-widget--button-welcome {
  display: none !important;
}

/* Type 2 & 3 - show both content and panel */
.wtp-live-preview-scene .wtp-support-widget--content--2,
.wtp-live-preview-scene .wtp-support-widget--content--3 {
  cursor: default !important;
}

/* Ensure button colors are applied */
.wtp-live-preview-scene .wtp-support-widget--button {
  animation: none !important;
}

.wtp-live-preview-scene .wtp-support-widget--main-button--4 {
  animation: none !important;
}

/* Plugin: compact chat widget overrides
   Targets inline widget classes using prefix selectors so no PHP edits are required.
*/

[class^="wtp-chat-window-"],
[class*=" wtp-chat-window-"] {
  font-size: 13px !important;
}

[class^="wtp-chat-window-"] .wtp-chat-button i,
[class*=" wtp-chat-window-"] .wtp-chat-button i,
[class^="wtp-chat-button-"] i,
[class*=" wtp-chat-button-"] i {
  font-size: 20px !important;
}

/* Ensure chat button/icon color remains white (override other rules) */
[class^="wtp-chat-button-"] i,
[class*=" wtp-chat-button-"] i,
[class^="wtp-chat-window-"] i,
[class*=" wtp-chat-window-"] i {
  color: #fff !important;
}

[class^="wtp-chat-window-"] .wtp-chat-operator-avatar i,
[class*=" wtp-chat-window-"] .wtp-chat-operator-avatar i {
  font-size: 18px !important;
}

[class^="wtp-chat-window-"] .wtp-chat-operator-details h4,
[class*=" wtp-chat-window-"] .wtp-chat-operator-details h4 {
  font-size: 14px !important;
}

[class^="wtp-chat-window-"] .wtp-chat-operator-details p,
[class*=" wtp-chat-window-"] .wtp-chat-operator-details p {
  font-size: 12px !important;
}

[class^="wtp-chat-window-"] .wtp-chat-message-time,
[class*=" wtp-chat-window-"] .wtp-chat-message-time {
  font-size: 10px !important;
}

[class^="wtp-chat-window-"] .wtp-chat-input,
[class*=" wtp-chat-window-"] .wtp-chat-input {
  font-size: 13px !important;
  padding: 8px 12px !important;
}

/* Pre-chat form overflow fixes */
[class^="wtp-pre-chat-form-"],
[class*=" wtp-pre-chat-form-"] {
  box-sizing: border-box !important;
  padding: 20px 14px !important;
  overflow: hidden !important;
}

[class^="wtp-pre-chat-form-"] .wtp-pre-chat-body,
[class*=" wtp-pre-chat-form-"] .wtp-pre-chat-body {
  overflow: auto !important;
  /* max-height: calc(100% - 110px) !important; */
  gap: 10px !important;
}

/* Make inputs slightly smaller to avoid overflow on short viewports */
[class^="wtp-pre-chat-form-"] .wtp-form-field input,
[class*=" wtp-pre-chat-form-"] .wtp-form-field input {
  padding: 10px 12px !important;
  font-size: 13px !important;
}

/* Compact start button */
[class^="wtp-pre-chat-form-"] .wtp-start-chat-btn,
[class*=" wtp-pre-chat-form-"] .wtp-start-chat-btn {
  padding: 12px !important;
  font-size: 14px !important;
}

/* Improved success animation and quick check mark */
[class^="wtp-pre-chat-form-"].wtp-form-success,
[class*=" wtp-pre-chat-form-"].wtp-form-success {
  animation: wtpFormSuccessCompact 450ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

@keyframes wtpFormSuccessCompact {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  60% {
    opacity: 0.9;
    transform: translateY(-6px) scale(0.995);
  }

  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
    visibility: hidden;
  }
}

[class^="wtp-pre-chat-form-"].wtp-form-success:after,
[class*=" wtp-pre-chat-form-"].wtp-form-success:after {
  content: '\2713';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  line-height: 52px;
  border-radius: 50%;
  background: var(--wtp-accent, #3B82F6);
  color: #fff;
  font-size: 26px;
  opacity: 0;
  animation: wtpCheckPopCompact 450ms 120ms forwards;
}

@keyframes wtpCheckPopCompact {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }

  60% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -60%) scale(1);
    opacity: 1;
  }
}

@media (max-width:480px),
(max-height:520px) {

  [class^="wtp-chat-window-"],
  [class*=" wtp-chat-window-"] {
    font-size: 12px !important;
  }

  /* [class^="wtp-pre-chat-form-"] .wtp-pre-chat-body,
  [class*=" wtp-pre-chat-form-"] .wtp-pre-chat-body {
    max-height: calc(100% - 100px) !important;
  } */
}