/* استایل کلی فرم */
#ramsarland-ad-form {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
}

/* عنوان */
#ramsarland-ad-form h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

/* فیلدها */
#ramsarland-ad-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
}

#ramsarland-ad-form input[type="text"],
#ramsarland-ad-form input[type="number"],
#ramsarland-ad-form input[type="file"],
#ramsarland-ad-form textarea,
#ramsarland-ad-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

/* باکس‌های انتخاب پکیج */
#ramsarland-ad-form .package {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  overflow: hidden;
}
#ramsarland-ad-form .package:hover {
  border-color: #0e8385;
  box-shadow: 0 0 5px rgba(14,131,133,0.3);
}
/* چینش تصاویر انتخاب پکیج */
#ramsarland-ad-form .ramsarland-package-options {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 15px;
}

#ramsarland-ad-form .ramsarland-package-options .package {
  flex: 1;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  transition: border 0.2s, box-shadow 0.2s;
}

#ramsarland-ad-form .ramsarland-package-options .package img {
  width: 100%;
  height: auto;
  display: block;
}

#ramsarland-ad-form .ramsarland-package-options .package input:checked + img {
  border: 2px solid #0e8385;
  box-shadow: 0 0 5px rgba(14,131,133,0.4);
}

#ramsarland-ad-form .ramsarland-package-options .package .placeholder {
  padding: 30px 10px;
  font-size: 14px;
  color: #555;
}
نه
#ramsarland-ad-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* دکمه */
#ramsarland-ad-form button,
#ramsarland-ad-form input[type="submit"] {
  background: transparent;
  color: #0e8385;
  padding: 12px 18px;
  border: 1px solid #0e8385;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  width: 100%;
  font-family: inherit;
  font-weight: 500;
}

#ramsarland-ad-form button:hover,
#ramsarland-ad-form input[type="submit"]:hover {
  background: #0e8385;
  color: #fff;
}

/* Disabled state for submit button */
#ramsarland-ad-form button:disabled,
#ramsarland-ad-form input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading animation for submit button */
#ramsarland_submit_btn.loading {
  position: relative;
  opacity: 0.8;
}

#ramsarland_submit_btn.loading::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid #fff;
  border-top: 2px solid #0e8385;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* تصاویر پیش‌نمایش */
#ramsarland-ad-form .preview {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

#ramsarland-ad-form .preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* آپلود سفارشی تصاویر */
#ramsarland-ad-form .custom-file-upload {
  margin-bottom: 15px;
}

#ramsarland-ad-form .custom-file-row {
  display: flex;
  gap: 20px;
}

#ramsarland-ad-form .custom-file-row .custom-file-upload {
  flex: 1;
}

/* باکس آپلود با پیش‌نمایش داخلی */
#ramsarland-ad-form .upload-box {
  width: 120px;
  height: 120px;
  border: 2px dashed #0e8385;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0e8385;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.3s, color 0.3s;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#ramsarland-ad-form .upload-box.has-image {
  border-style: solid;
  color: transparent; /* مخفی کردن متن "+ انتخاب تصویر" */
}

#ramsarland-ad-form .upload-box {
  position: relative;
}

#ramsarland-ad-form .upload-box .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  line-height: 1;
}


#ramsarland-ad-form fieldset {
  border-radius: 6px;
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 20px;
}

#ramsarland-ad-form select {
  border-radius: 6px !important;
}

/* توضیحات پکیج (باکس جدید) */
#ramsarland-ad-form #package-description {
  border: 1px solid #ddd;
  background: #fafafa;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  display: none; /* پیش‌فرض مخفی باشه */
}

/* فیلدهای غیرفعال (برای پکیج‌های غیرمجاز) */
#ramsarland-ad-form .ramsarland-field[style*='opacity: 0.5'] {
  background: #f6f6f6;
  pointer-events: none;
  cursor: not-allowed;
  border-radius: 6px;
  padding: 10px;
  transition: background 0.3s, opacity 0.3s;
}
#ramsarland-ad-form .ramsarland-field[style*='opacity: 0.5'] label {
  color: #999;
}

/* ریسپانسیو */
@media (max-width: 480px) {
  #ramsarland-ad-form {
    padding: 15px;
  }
  #ramsarland-ad-form h3 {
    font-size: 18px;
  }
}

/* جلوگیری از زوم خودکار موبایل (خصوصاً iOS) هنگام فوکوس روی فیلدها */
@media (max-width: 820px) {
  #ramsarland-ad-form input:not([type="radio"]):not([type="checkbox"]),
  #ramsarland-ad-form select,
  #ramsarland-ad-form textarea,
  #ramsarland-edit-ad-form input:not([type="radio"]):not([type="checkbox"]),
  #ramsarland-edit-ad-form select,
  #ramsarland-edit-ad-form textarea,
  .claim-section input:not([type="radio"]):not([type="checkbox"]),
  .claim-section select,
  .claim-section textarea,
  #ramsarland-login input:not([type="radio"]):not([type="checkbox"]),
  #ramsarland-login select,
  #ramsarland-login textarea {
    font-size: 16px !important;
  }
}

.ramsarland-map-card {
  margin: 14px 0 18px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit !important;
}

.ramsarland-map-card-head {
  margin-bottom: 10px;
}

.ramsarland-map-card-head strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.ramsarland-map-card-head span {
  color: #6b7280;
  font-size: 11px;
}

.ramsarland-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.ramsarland-map-locate-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit !important;
}

.ramsarland-map-status {
  color: #6b7280;
  font-size: 11px;
}

.ramsarland-leaflet-map {
  width: 100%;
  height: 250px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ramsarland-leaflet-map,
.ramsarland-leaflet-map *,
.ramsarland-leaflet-map .leaflet-container,
.ramsarland-leaflet-map .leaflet-control,
.ramsarland-leaflet-map .leaflet-popup-content,
.ramsarland-leaflet-map .leaflet-tooltip {
  font-family: inherit !important;
}

.ramsarland-leaflet-map .leaflet-control-attribution {
  font-size: 10px;
  opacity: 0.75;
}

.ramsarland-leaflet-map .leaflet-control-zoom a {
  width: 24px;
  height: 24px;
  line-height: 22px;
  font-size: 16px;
}

.ramsarland-ad-map-display {
  border: 0;
  padding: 0;
  background: transparent;
}

.ramsarland-map-fields-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ramsarland-map-fields-grid > div:nth-child(n+3) {
  grid-column: 1 / -1;
}

.ramsarland-map-fields-grid label {
  margin-bottom: 4px;
  color: #3d4b5c;
  font-size: 12px;
}

.ramsarland-map-fields-grid input {
  direction: ltr;
  font-size: 12px !important;
  background: #ffffff;
}

.ramsarland-ad-map-display .ramsarland-map-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ramsarland-ad-map-display .ramsarland-map-links a {
  font-size: 12px;
  text-decoration: none;
  border: 1px solid #d7e2e8;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0e8385;
  background: #fff;
}

@media (max-width: 640px) {
  .ramsarland-leaflet-map {
    height: 210px;
  }
  .ramsarland-map-fields-grid {
    grid-template-columns: 1fr;
  }
  .ramsarland-map-fields-grid > div:nth-child(n+3) {
    grid-column: auto;
  }
}

.ramsarland-dynamic-fields-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.ramsarland-dynamic-field {
  min-width: 0;
}

.rl-taxonomy-multiselect {
  position: relative;
}

.rl-taxonomy-toggle {
  width: 100%;
  border: 1px solid #d9dee3;
  border-radius: 8px;
  min-height: 44px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.rl-taxonomy-toggle-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rl-taxonomy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.rl-chip {
  border: 1px solid #d8e2f0;
  background: #f2f7ff;
  color: #1f2937;
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
}

.rl-chip-x {
  color: #ef4444;
  font-size: 14px;
  line-height: 1;
}

.rl-taxonomy-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d9dee3;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
  z-index: 30;
  padding: 10px;
}

.rl-taxonomy-search {
  width: 100%;
  border: 1px solid #d9dee3;
  border-radius: 6px;
  min-height: 36px;
  padding: 6px 10px;
}

.rl-taxonomy-status {
  min-height: 14px;
  color: #6b7280;
  font-size: 11px;
  margin: 5px 0;
}

.rl-taxonomy-options {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.rl-tax-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 7px;
  cursor: pointer;
  font-size: 13px;
}

.rl-tax-option:hover {
  background: #f3f7ff;
}
