@font-face {
  font-family: 'vazir';
  src: url('/css/fonts/vazir.woff2') format('woff2'),
       url('/css/fonts/vazir.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
    text-align: right;
    font-family: 'vazir', sans-serif;
    background-color: #f5f5f5;
}

    .chatBody {
  padding:5px;
  min-height:50px;
  max-height:300px;
  overflow:auto;
}
    
.chat-input input[type="text"],
.chat-input input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.chat-input button {
    background: #0078ff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}
    
/* chat-widget.css */
#chatWidget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 300px;
  max-height: 400px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  display: none;
  font-family: "vazir", sans-serif;
  z-index: 9999;
  overflow: hidden;
}

/* کانتینر اصلی ویجت */
#chat-widget-frame, #chat-box {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 15px; /* فاصله داخلی محتوا */
    margin: 0;
    font-family: "vazir", sans-serif;
}

/* هدر ویجت */
#chat-header {
    background-color: #070621;
    color: #fff;
    padding: 10px 15px; /* بالا و پایین 10px، چپ و راست 15px */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* فرم شروع گفتگو */
#chat-login-form {
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: #fff;
}

/* فیلدهای ورودی */
#chat-login-form input[type="text"] {
    direction: rtl;        /* متن راست به چپ */
    caret-color: #000;     /* رنگ caret */
    text-align: right;     /* متن داخل تکست‌باکس راست‌چین */
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: "vazir", sans-serif;
}
        
#chat-login-form input[type="email"] {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: "vazir", sans-serif;
}

/* دکمه‌ها */
#chat-login-form button {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background-color: #070621;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#chat-login-form button:hover,
#chat-send:hover {
    background-color: #0a0a3b;
}

/* تکست‌باکس پیام کاربر در صفحه چت */
#chatMessage {
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 78%;           /* اندازه فعلی تکست‌باکس */
    box-sizing: border-box;
    text-align: right;
    resize: none;         /* کاربر خودش اندازه ندهد */
    overflow-y: hidden;   /* تا زمانی که کمتر از max-height است اسکرول نباشد */
    min-height: 30px;
    max-height: 100px;    /* بعد از این ارتفاع، اسکرول ظاهر شود */
}

/* دکمه ارسال پیام */
#sendBtn {
    font-family: 'vazir', sans-serif;
    font-size: 13px;
    background-color: #388e3c;
    color: #fff;
    border: none;
    padding: 6px 0;
    border-radius: 5px;
    width: 20%;
    cursor: pointer;
    transition: background 0.3s;
}

#sendBtn:hover {
    background-color: #2e7030;
}

/* کانتینر ورودی پیام */
#chatInput {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background-color: #f9f9f9;
    border-top: 1px solid #ccc;
}

/* آیکون ویجت – حرفه‌ای با گرادینت و هاور */
#chat-widget-icon{
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg,#070621,#3f51b5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  font-family: "vazir", sans-serif;
  opacity: 1;
}
#chat-widget-icon:hover{
  transform: scale(1.08);
  box-shadow: 0 10px 22px rgba(0,0,0,0.3);
}

/* iframe ویجت + انیمیشن باز/بسته */
#chat-widget-frame{
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 350px;
  height: 450px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  z-index: 9998;

  /* حالت بسته: نامرئی + غیرقابل کلیک */
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;

  /* انیمیشن نرم */
  transition: opacity .35s ease, transform .35s ease;
}

/* وقتی باز است */
#chat-widget-frame.open{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ریسپانسیو موبایل */
@media (max-width: 480px){
  #chat-widget-frame{
    right: 12px;
    width: calc(100vw - 24px);
    height: 60vh;
  }
  #chat-widget-icon{
    width: 56px;
    height: 56px;
  }
}

/* اگر لازم شد حالت محو آیکون در زمان باز بودن */
#chat-widget-icon.minimized{
  opacity: .9;
}

header {
    background-color: #0a1d37;
    padding: 1rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
label {
    direction: rtl;
    font-family: 'vazir', sans-serif;
    display: block;
    margin-bottom: 5px;
}
nav a {
    color: white;
    margin-left: 1rem;
    text-decoration: none;
}
.header-image {
    width: 100%;
    height: auto;
}
main {
    padding: 2rem;
}
.service-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.service-box h2 {
    color: #0a1d37;
}
.note {
    background: #fff7e6;
    border-left: 4px solid #ffa500;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* فرم‌ها */
form {
    background: white;
    text-align: right;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}
input, textarea, select {
    text-align: right;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-family: 'vazir', sans-serif;
    font-size: 1rem;
}
button, .btn {
    background: #0a1d37;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: 'vazir', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    margin-top: 15px;
}
button:hover, .btn:hover {
    background-color: #132d53;
}

/* جدول‌ها */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: white;
}
th, td {
    padding: 0.75rem;
    text-align: right;
    border: 1px solid #ccc;
}
th {
    background-color: #0a1d37;
    color: white;
}

    .form-box {
      background: white;
      padding: 30px;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
      width: 300px;
    }
    .form-box h2 {
      text-align: center;
      margin-bottom: 20px;
    }
    .form-box input {
      width: 100%;
      padding: 10px;
      margin: 10px 0;
      border: 1px solid #ccc;
      border-radius: 5px;
    }
    .form-box button {
      width: 100%;
      padding: 10px;
      background-color: #007bff;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }
    .form-box button:hover {
      background-color: #0056b3;
    }

.support-widget {
  position: fixed;
  bottom: 20px;
  right: 20px; /* ✅ سمت راست پایین */
  z-index: 9999;
}

.support-icon {
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.support-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* ✅ گرد کردن تصویر */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* اختیاری: سایه برای زیبایی */
}

.support-panel {
  display: none;
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 400px;     /* ✅ عرض کمتر */
  height: 500px;    /* ✅ ارتفاع کمتر */
  background: white;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  overflow: hidden;
}

.support-panel.active {
  display: block;
}

.support-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#closeSupport {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #555;
  font-size: 20px;
  font-weight: normal;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  z-index: 10001;
  display: inline-block !important;
  width: 10px !important;
  height: 10px !important;
  right: 10px !important;
}

#closeSupport:hover {
  color: #f44336; /* رنگ قرمز هنگام هاور */
}

.user-info {
  display: flex;
  align-items: center;
  padding: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 8px;
}

.user-details p {
  margin: 0;
  line-height: 1.2;
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        margin-top: 1rem;
    }
    .service-box, form {
        padding: 1rem;
    }
    input, textarea, select, button {
        font-size: 0.95rem;
    }
}