/* Стили для карточки провайдера */
/* Адаптировано из WordPress: tarif-provider.css */

/* ✅ ОПТИМИЗАЦИЯ: @import удален! Montserrat загружается через next/font/google в layout.tsx */

:root {
  --bg: #f6f7fa;
  --white: #fff;
  --gray: #666;
  --light: #e5e7eb;
  --primary: #6366f1;
  --primary-h: #4f46e5;
  --shadow: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, .10);
}

.provider-tariff-card {
  background: #050505;
  position: relative;
  overflow: hidden;
  color: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: clamp(300px, 22vw, 360px);
  aspect-ratio: 4 / 5;
  transition: .15s all;
  width: 100%;
  max-width: 100%;
  isolation: isolate;
}

.provider-tariff-card:not(.has-image) {
  background: linear-gradient(135deg, #050505 0%, #0f0919 15%, #0d1423 30%, #0a2540 45%, #152d70 60%, #1f1f5a 75%, #2f1560 90%, #3d1458 100%);
}

.provider-tariff-card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.provider-tariff-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.78) saturate(1.05);
}

.provider-tariff-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #050505 0%, #0f0919 15%, #0d1423 30%, #0a2540 45%, #152d70 60%, #1f1f5a 75%, #2f1560 90%, #3d1458 100%);
  z-index: 0;
}

.provider-tariff-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.36) 0%, rgba(0, 0, 0, 0.1) 36%, rgba(0, 0, 0, 0.88) 100%),
    linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.25));
  z-index: 1;
  pointer-events: none;
  transition: .15s all;
}

.provider-tariff-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.provider-tariff-card:hover::after {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.06) 30%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}

.provider-tariff-card > * {
  position: relative;
  z-index: 2;
}

.provider-tariff-card > .provider-tariff-card-media {
  position: absolute;
  z-index: 0;
}

.provider-tariff-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: auto;
}

.provider-tariff-brand {
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.provider-tariff-type-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.provider-tariff-type-badge .iconify {
  font-size: 16px;
}

.provider-tariff-card-content {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider-tariff-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.provider-tariff-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
}

.provider-tariff-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.provider-tariff-date {
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.provider-tariff-price-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s all;
  backdrop-filter: blur(10px);
}

.provider-tariff-price-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.provider-tariff-price-btn:focus {
  outline: none;
}

/* Overlay с ценами */
.provider-tariff-price-overlay {
  position: absolute;
  inset: 0;
  padding: 0;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: none;
  flex-direction: column;
  z-index: 2;
  min-height: 320px;
}

.provider-tariff-card.open {
  padding: 0;
}

.provider-tariff-card.open .provider-tariff-price-overlay {
  display: flex;
}

.provider-tariff-card.open .provider-tariff-card-header,
.provider-tariff-card.open .provider-tariff-card-content {
  display: none;
}

.provider-tariff-close-btn {
  position: absolute;
  top: 18px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  padding: 6px;
  transition: .15s all;
  text-shadow: 0 0 10px rgba(0, 0, 0, 1), 0 2px 4px rgba(0, 0, 0, 1);
  z-index: 10;
}

.provider-tariff-close-btn:hover {
  transform: scale(1.2);
}

.provider-tariff-close-btn:focus {
  outline: none;
}

.provider-tariff-overlay-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 18px 30px 0 16px;
  line-height: 1.2;
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 1), 0 2px 4px rgba(0, 0, 0, 1);
}

.provider-tariff-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 4px;
  margin: 0 16px 12px 16px;
  width: fit-content;
  backdrop-filter: blur(10px);
}

.provider-tariff-switcher button {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: .2s all;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  min-width: 70px;
}

.provider-tariff-switcher button.active {
  background: var(--primary);
  color: white;
  text-shadow: none;
  font-weight: 700;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.provider-tariff-switcher button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.provider-tariff-switcher button.active:hover {
  background: var(--primary-h);
  transform: translateY(-1px);
}

.provider-tariff-switcher button:focus {
  outline: none;
}

.provider-tariff-price-table {
  flex-grow: 1;
  background: transparent;
  padding: 0 16px 24px 16px;
  max-height: none;
  overflow-y: auto;
}

.provider-tariff-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: white;
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  transition: .15s all;
  backdrop-filter: blur(5px);
}

.provider-tariff-row:last-child {
  margin-bottom: 0;
}

.provider-tariff-row:hover {
  background: rgba(255, 255, 255, 0.15);
}

.provider-tariff-row span:first-child {
  font-size: 12px;
  opacity: 0.95;
  text-shadow: 0 0 8px rgba(0, 0, 0, 1), 0 1px 3px rgba(0, 0, 0, 1);
}

.provider-tariff-row span:last-child {
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 1), 0 2px 4px rgba(0, 0, 0, 1);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .provider-tariff-card {
    min-height: 320px;
    padding: 16px 14px 18px;
    gap: 8px;
  }

  .provider-tariff-card-header {
    margin-bottom: 0;
  }

  .provider-tariff-card-content {
    margin-top: auto;
    gap: 6px;
  }

  .provider-tariff-title {
    font-size: 15px;
    line-height: 1.3;
  }

  .provider-tariff-description {
    font-size: 12px;
    line-height: 1.4;
  }

  .provider-tariff-info-row {
    margin-top: 4px;
  }

  .provider-tariff-card.open {
    padding: 0;
  }

  .provider-tariff-price-overlay {
    padding: 0;
    min-height: 320px;
    background: rgba(0, 0, 0, 0.6);
  }

  .provider-tariff-overlay-title {
    font-size: 13px;
    margin-bottom: 8px;
    padding: 18px 28px 0 16px;
  }

  .provider-tariff-switcher {
    margin: 0 16px 10px 16px;
  }

  .provider-tariff-price-table {
    padding: 0 16px 24px 16px;
  }

  .provider-tariff-close-btn {
    top: 18px;
    right: 16px;
  }

  .provider-tariff-switcher button {
    padding: 6px 10px;
    font-size: 11px;
  }

  .provider-tariff-row {
    padding: 6px 10px;
    margin-bottom: 5px;
    font-size: 12px;
  }

  .provider-tariff-row span:first-child {
    font-size: 11px;
  }

  .provider-tariff-row span:last-child {
    font-size: 12px;
  }
}



