/* ========================================================
   UNI STUDENT - Compact & Smooth WhatsApp Consultation Popup
   z-index: 999999 | No scroll | Sleek & Disturbance-free
   ======================================================== */

/* Hidden launcher */
.uni-wa-launcher {
  display: none !important;
}

/* --- Compact WhatsApp Card Window --- */
.uni-wa-card {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  width: 345px;
  max-width: calc(100vw - 32px);
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(14, 5, 63, 0.2), 0 0 0 1px rgba(0, 86, 204, 0.1);
  z-index: 999999 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom left;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  pointer-events: none;
}

[dir="rtl"] .uni-wa-card {
  left: auto;
  right: 24px;
  transform-origin: bottom right;
}

/* Open State */
.uni-wa-card.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Card Header - Sleek Single Row */
.uni-wa-header {
  background: linear-gradient(135deg, #075e54 0%, #128c7e 60%, #25d366 100%);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 3;
}

.uni-wa-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #ffffff;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.uni-wa-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background-color: #25d366;
  border: 2px solid #075e54;
  border-radius: 50%;
}

[dir="rtl"] .uni-wa-avatar-status {
  right: auto;
  left: 0;
}

.uni-wa-info {
  flex: 1;
  min-width: 0;
}

.uni-wa-info h6 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uni-wa-info p {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 5px;
}

.uni-wa-info .consult-pop-live-dot {
  width: 6px;
  height: 6px;
  background-color: #25d366;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.5);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 4px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.uni-wa-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.uni-wa-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

/* Card Body & Form - Compact & Scroll-Free */
.uni-wa-body {
  background: #ffffff;
  padding: 10px 14px 12px;
  overflow: hidden !important;
  flex: none;
  border-radius: 0 0 16px 16px;
  position: relative;
  z-index: 1;
}

.uni-wa-form-card {
  display: flex;
  flex-direction: column;
}

.uni-wa-field {
  margin-bottom: 6px;
}

.uni-wa-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 2px;
  line-height: 1.1;
}

.uni-wa-field label i {
  color: #128c7e;
  font-size: 11.5px;
}

.uni-wa-field input,
.uni-wa-field select {
  width: 100%;
  height: 33px;
  padding: 5px 10px;
  font-size: 12.5px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  background-color: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.uni-wa-field input:focus,
.uni-wa-field select:focus {
  border-color: #25d366;
  background-color: #ffffff;
  box-shadow: 0 0 0 2.5px rgba(37, 211, 102, 0.18);
}

.uni-wa-field .iti {
  width: 100%;
}

.uni-wa-field .iti input {
  height: 33px;
  font-size: 12.5px;
}

.uni-wa-field .select2-container .select2-selection--single {
  height: 33px !important;
  background-color: #f8fafc;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 7px !important;
}

.uni-wa-field .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 31px;
  font-size: 12.5px;
  color: #0f172a;
  padding-left: 10px;
}

[dir="rtl"] .uni-wa-field .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 0;
  padding-right: 10px;
}

.uni-wa-field .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 31px;
}

/* Ensure Select2 Dropdown is above all and smooth */
.select2-container--open {
  z-index: 9999999 !important;
}

.select2-container--open .select2-dropdown,
.select2-dropdown {
  z-index: 9999999 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Glossy Green Submit Button (Compact) */
.uni-wa-submit-btn {
  position: relative;
  width: 100%;
  height: 36px;
  background: linear-gradient(180deg, #3de276 0%, #2bd56a 49%, #1eb952 50%, #15a847 100%);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 
    0 3px 12px rgba(26, 185, 80, 0.35),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.7),
    inset 0 -1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 6px;
  user-select: none;
}

.uni-wa-submit-btn::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 3px;
  right: 3px;
  height: 47%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

.uni-wa-submit-btn i {
  font-size: 16px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.uni-wa-submit-btn span {
  position: relative;
  z-index: 1;
}

.uni-wa-submit-btn:hover {
  transform: translateY(-1px) scale(1.01);
  background: linear-gradient(180deg, #44e87d 0%, #32da71 49%, #20be56 50%, #17ad4a 100%);
  box-shadow: 
    0 5px 16px rgba(26, 185, 80, 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.85);
}

.uni-wa-submit-btn:active {
  transform: translateY(1px) scale(0.98);
}

.uni-wa-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.uni-wa-security-note {
  margin: 5px 0 0;
  font-size: 10px;
  color: #64748b;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 500;
}

.uni-wa-security-note i {
  color: #10b981;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
  .uni-wa-card {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    bottom: 10px !important;
    max-width: 100% !important;
    border-radius: 14px;
  }
}

.iti input.form-control, .iti input[type="tel"] {
    width: 100% !important;
    height: auto;
    min-height: 33px;
}