/**
 * Wireless Tariffs Module
 */

[hidden] {
  display: none !important;
}

.wt-wrapper {
  direction: rtl;
  position: relative;
}

/* =========================================
   تب‌ها (Tabs) و اسکرول افقی
   ========================================= */
.wt-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 2px solid #e5e7eb;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.wt-tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.wt-tab-btn:hover {
  border-color: #9ca3af;
}

.wt-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.wt-tab-pane {
  display: none;
}

.wt-tab-pane.active {
  display: block;
}

/* =========================================
   فیلترها (Filters)
   ========================================= */
.wt-filters {
  display: grid;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.wt-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wt-filter-label {
  font-weight: 700;
  color: #374151;
  margin-left: 4px;
}

.wt-filter-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.wt-filter-btn:hover {
  border-color: #9ca3af;
}

.wt-filter-btn.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

/* =========================================
   گروه‌بندی دوره‌ها و کارت‌ها
   ========================================= */
.wt-duration-group {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-right: 5px solid var(--wt-duration-color, #6b7280);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 22px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.wt-duration-title {
  margin: 0 0 16px;
  padding: 0;
  color: var(--wt-duration-color, #111827);
  font-size: 18px;
  font-weight: 800;
}

.wt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.wt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: 5px solid var(--wt-duration-color, #6b7280);
  border-radius: 16px;
  padding: 20px 16px 16px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
  transition: all 0.25s ease;
}

.wt-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.12);
}

.wt-has-badge {
  padding-top: 26px;
}

.wt-badge {
  position: absolute;
  top: -12px;
  right: 14px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.wt-badge-recommended {
  background: #f59e0b;
}

.wt-badge-economy {
  background: #10b981;
}

.wt-badge-popular {
  background: #ef4444;
}

.wt-badge-new {
  background: #3b82f6;
}

.wt-badge-custom,
.wt-badge-default {
  background: #6b7280;
}

.wt-approval-code {
  font-size: 12px;
  color: #6b7280;
}

.wt-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--wt-duration-color, #111827);
}

.wt-specs {
  display: grid;
  gap: 8px;
}

.wt-spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}
.wt-speed strong {
  direction: ltr;
}
.wt-spec span {
  color: #6b7280;
}

.wt-spec strong {
  color: #111827;
}

.wt-gift strong {
  color: #059669;
}

.wt-price-box {
  margin-top: auto;
  border-top: 1px dashed #e5e7eb;
  padding-top: 12px;
}

.wt-old-price {
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 5px;
}

.wt-old-price s {
  color: #9ca3af;
}

.wt-discount {
  display: inline-block;
  margin-right: 6px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.wt-price {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
}

/* =========================================
   دکمه‌های اقدام (Actions)
   ========================================= */
.wt-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
}

.wt-details-btn,
.wt-buy-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wt-details-btn {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
}

.wt-details-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #111827;
}

.wt-buy-btn {
  border: 2px solid #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.wt-buy-btn:hover {
  background: #fff;
  color: #111827;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* =========================================
   مودال (Modal)
   ========================================= */
.wt-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wt-modal {
  position: relative;
  background: #fff;
  width: min(700px, 100%);
  max-height: 85vh;
  overflow: auto;
  border-radius: 18px;
  padding: 50px 30px 30px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

.wt-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #f9fafb;
  color: #6b7280;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wt-modal-close:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.wt-modal-body {
  color: #1f2937;
  line-height: 1.9;
  margin-top: 5px;
}

.wt-modal-body a {
  color: #2563eb;
}

.wt-modal-body img {
  max-width: 100%;
  height: auto;
}

/* =========================================
   اسکرول افقی تب‌ها (Webkit)
   ========================================= */
.wt-tabs::-webkit-scrollbar {
  height: 8px;
}

.wt-tabs::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 999px;
}

.wt-tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.wt-tabs::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =========================================
   ریسپانسیو
   ========================================= */
@media (max-width: 767px) {
  .wt-tabs {
    gap: 6px;
    padding-bottom: 10px;
  }

  .wt-tab-btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 13px;
  }
}

@media (max-width: 575px) {
  .wt-cards {
    grid-template-columns: 1fr;
  }

  .wt-actions {
    flex-direction: row;
    gap: 8px;
  }

  .wt-details-btn,
  .wt-buy-btn {
    font-size: 13px;
    padding: 10px 8px;
  }
}
