/* WIDGET BUTTON (Yuvarlaq düymə) */
.contact-widget-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-widget-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.contact-widget-btn i {
  color: white;
  font-size: 1.8rem;
}

/* WIDGET POPUP (Açılan Pəncərə) */
.widget-popup {
  position: fixed;
  bottom: 100px; /* Düymədən bir az yuxarıda */
  right: 30px;
  width: 360px; /* DÜZƏLİŞ: Sabit en verdik ki, ekranı tutmasın */
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 9998;
  display: none; /* JS ilə açılacaq */
  border: 1px solid #f1f5f9;
  font-family: "Inter", sans-serif;
  animation: slideUpWidget 0.3s ease forwards;
}

@keyframes slideUpWidget {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* HEADER */
.w-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.w-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.w-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.w-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* BODY Area */
.w-body {
  padding: 20px;
  background: #f8fafc;
  min-height: 250px;
}

/* MENU (Seçim Düymələri) */
.w-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.w-menu-btn {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.w-menu-btn:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.1);
}

.w-icon {
  width: 45px;
  height: 45px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  font-size: 1.2rem;
}

/* FORM STYLES */
.w-form-view {
  display: none; /* Default gizli */
}

.w-input-group {
  margin-bottom: 12px;
}

.w-input-group input,
.w-input-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
  outline: none;
  transition: 0.2s;
  box-sizing: border-box; /* Vacib: padding eni artırmasın */
}

.w-input-group input:focus,
.w-input-group textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.w-btn-submit {
  width: 100%;
  padding: 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: 0.2s;
  margin-top: 5px;
}

.w-btn-submit:hover {
  background: #2563eb;
}

/* CHAT VIEW */
.w-chat-view {
  display: none;
  height: 300px;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 85%;
  line-height: 1.4;
}

.msg-admin {
  background: #f1f5f9;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.msg-user {
  background: #3b82f6;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  outline: none;
}

.chat-input-area button {
  width: 45px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* RESPONSIVE (Mobil üçün) */
@media (max-width: 480px) {
  .widget-popup {
    width: 90%;
    right: 5%;
    bottom: 90px;
  }
}
/* --- WIDGET ALERT MODAL (Xüsusi Xəbərdarlıq - YENİLƏNMİŞ) --- */
.w-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Yarı şəffaf qara */
  backdrop-filter: blur(4px); /* Arxa fonu bulandırmaq */
  z-index: 10000; /* Widget-dən də yuxarıda olsun */
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.w-alert-overlay.active {
  opacity: 1;
}

.w-alert-box {
  background: white;
  width: 90%; /* Mobildə daşmasın deyə */
  max-width: 350px; /* Maksimum genişlik bir az artırıldı */
  padding: 30px 25px; /* Daxili boşluq artırıldı */
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #e2e8f0;
}

.w-alert-overlay.active .w-alert-box {
  transform: scale(1);
}

.w-alert-icon {
  width: 65px; /* İkon bir az böyüdü */
  height: 65px;
  background: #fff7ed;
  color: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem; /* İkon fontu böyüdü */
  margin: 0 auto 20px auto;
}

.w-alert-box h4 {
  margin: 0 0 15px 0;
  color: #1e293b;
  font-size: 1.3rem; /* Başlıq bir az böyüdü */
  font-weight: 700;
}

/* --- ƏSAS DƏYİŞİKLİK BURADADIR --- */
.w-alert-box p {
  color: #64748b;
  font-size: 1.1rem; /* Mesajın şrifti böyüdüldü (əvvəl 0.95rem idi) */
  line-height: 1.6; /* Oxunaqlıq üçün sətir hündürlüyü artırıldı */
  margin-bottom: 25px; /* Düymə ilə məsafə artırıldı */
}
/* -------------------------------- */

.w-alert-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 30px; /* Düymə bir az böyüdü */
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: 0.2s;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
}

.w-alert-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.6);
}
/* --- Widget Alert Status Rəngləri --- */

/* Uğurlu (Yaşıl) */
.w-alert-icon.success {
  background: #dcfce7 !important; /* Açıq yaşıl fon */
  color: #16a34a !important; /* Tünd yaşıl ikon */
}

/* Xəta (Qırmızı) */
.w-alert-icon.error {
  background: #fee2e2 !important; /* Açıq qırmızı fon */
  color: #ef4444 !important; /* Tünd qırmızı ikon */
}
