/* ساختار کلی پورتال */
.sr-portal {
  font-family: "IRANSans", Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
  max-width: 600px;
  margin: 20px auto;
  padding: 15px;
  background: #f7f9fa;    
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* دکمه‌ها */
.sr-btn {
  background-color: #6f0b0b;
  color: #fff;
  border: none;
  padding: 10px 18px;
  margin: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.sr-btn:hover {
  background-color: #005177;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}
.sr-btn.sr-primary {
  background-color: #003871;
  border: none !important;
  color: #fff !important;
}
.sr-primary:focus, .sr-primary:hover {
	background-color: #6a0000 !important;
}
.sr-btn.sr-primary:hover {
  background-color: #051a50;
}
.sr-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
}
.sr-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* مودال */
.sr-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.sr-modal[aria-hidden="false"] {
  display: flex;
}
.sr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.sr-modal__content {
  position: relative;
  background: #fff;
  width: 95%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  animation: scaleIn 0.3s ease;
  direction: rtl;
  box-sizing: border-box;
  padding: 0; /* محتوا padding جداگانه دارد */
}
@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.sr-modal__close {
  position: absolute;
  left: 8px;
  top: 8px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #fff;
}
.sr-modal__close:hover {
  color: #d3d3d3;
}

/* هدر مودال */
.sr-modal__content h3 {
  margin: 0;
  padding: 16px 20px;
  background: #6A0000;       
  border-bottom: 1px solid #ddd;
  border-radius: 10px 10px 0 0;
  font-size: 16px;
  color: #fff;
}

/* محتوای داخلی مودال */
.sr-modal__content form,
.sr-modal__content .sr-success,
.sr-modal__content .sr-failure,
.sr-modal__content .sr-track-result {
  padding: 20px;
}

/* فیلدهای فرم */
.sr-field {
  margin-bottom: 15px;
}
.sr-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
  color: #555;
  font-size: 13px;
}
.sr-field input,
.sr-field textarea,
.sr-field select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.sr-field input:focus,
.sr-field textarea:focus,
.sr-field select:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
  outline: none;
}

/* فرم پیگیری — پیش‌فرض مخفی */
#sr-followup-form {
  display: none;
  margin-top: 15px;
  flex-direction: column;
  gap: 10px;
}
#sr-followup-form:not([hidden]) {
  display: flex;
}
#sr-followup-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
#sr-followup-form .sr-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
#sr-followup-form button[type="submit"] {
  align-self: flex-start;
}
#sr-followup-form .sr-error {
  font-size: 12px;
  color: #d93025;
}

/* خطاها */
.sr-error {
  color: #d93025;
  font-size: 12px;
  margin-top: 3px;
  min-height: 16px;
}

/* پیام موفقیت و خطا */
.sr-success,
.sr-failure {
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 14px;
}
.sr-success {
  background: #f0faf4;
  border-left: 4px solid #34a853;
  color: #1e7e34;
  text-align: center;
  margin: 5px;
}
.sr-failure {
  background: #fff5f5;
  border-left: 4px solid #d93025;
  color: #a50e0e;
}

/* لیست پیگیری‌ها */
.sr-track-result {
  margin-top: 10px;
}
.sr-track-result ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.sr-track-result li {
  background: #fff;
  border: 1px solid #eee;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sr-track-result li .sr-status {
  color: #d93025;
  font-weight: bold;
}

/* لودینگ */
.sr-loading {
  font-size: 13px;
  color: #666;
  margin-right: 10px;
}

/* Honeypot */
.sr-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}