/**
 * Market Sentinel - Tier System Styles
 * Estilos para componentes de tiers: BASIC, PREMIUM, PRO, B2B
 */

/* Tier Badges */
.tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-badge.tier-basic {
  background-color: #3b82f6;
  color: white;
}

.tier-badge.tier-premium {
  background-color: #9333ea;
  color: white;
}

.tier-badge.tier-pro {
  background-color: #f97316;
  color: white;
}

.tier-badge.tier-b2b {
  background-color: #10b981;
  color: white;
}

/* Tier Selector Page */
.tier-selector-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.tier-selector-page .page-header {
  text-align: center;
  margin-bottom: 40px;
}

.tier-selector-page .page-header h1 {
  font-size: 36px;
  margin-bottom: 12px;
  color: #1f2937;
}

.tier-selector-page .page-header p {
  font-size: 18px;
  color: #6b7280;
}

/* Tier Cards Grid */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.tier-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.tier-card.current {
  border: 2px solid #3b82f6;
}

.tier-card.tier-basic {
  border-top: 4px solid #3b82f6;
}

.tier-card.tier-premium {
  border-top: 4px solid #9333ea;
}

.tier-card.tier-pro {
  border-top: 4px solid #f97316;
}

.tier-card.tier-b2b {
  border-top: 4px solid #10b981;
}

.tier-card .card-header {
  margin-bottom: 20px;
}

.tier-card .card-header h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #1f2937;
}

.badge-current {
  display: inline-block;
  padding: 4px 12px;
  background: #3b82f6;
  color: white;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.badge-recommended {
  display: inline-block;
  padding: 4px 12px;
  background: #fbbf24;
  color: #92400e;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.card-pricing {
  margin-bottom: 16px;
}

.card-pricing .price {
  font-size: 48px;
  font-weight: 700;
  color: #1f2937;
}

.card-pricing .period {
  font-size: 16px;
  color: #6b7280;
  margin-left: 4px;
}

.card-description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.6;
}

.card-features ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.card-features li {
  padding: 8px 0;
  font-size: 14px;
  color: #4b5563;
  border-bottom: 1px solid #e5e7eb;
}

.card-features li:last-child {
  border-bottom: none;
}

.tier-select-btn {
  width: 100%;
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.tier-select-btn:hover:not(.disabled) {
  background: #2563eb;
}

.tier-select-btn.disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Country Selector - BASIC */
.country-selector-basic {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.current-country {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #dbeafe;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  margin-bottom: 20px;
}

.country-flag {
  font-size: 32px;
  margin-right: 16px;
}

.country-info {
  flex: 1;
}

.country-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.country-label {
  font-size: 14px;
  color: #6b7280;
}

.lock-icon {
  font-size: 20px;
}

.upgrade-prompt {
  background: #f3e8ff;
  border: 2px solid #9333ea;
  border-radius: 8px;
  padding: 20px;
}

.upgrade-prompt h4 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #581c87;
}

.upgrade-prompt p {
  font-size: 14px;
  color: #6b21a8;
  margin-bottom: 16px;
  line-height: 1.6;
}

.upgrade-btn {
  width: 100%;
  padding: 12px 24px;
  background: #9333ea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.upgrade-btn:hover {
  background: #7e22ce;
}

/* Country Selector - PREMIUM+ */
.country-selector-premium {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #9333ea;
}

.selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.selector-header h3 {
  font-size: 20px;
  color: #1f2937;
  margin: 0;
}

.selector-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
  background: #f3f4f6;
  border-radius: 8px;
  margin-bottom: 20px;
}

.stat {
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #9333ea;
}

.country-list {
  display: grid;
  gap: 8px;
}

.country-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.country-item:hover:not(.disabled) {
  border-color: #9333ea;
  background: #faf5ff;
}

.country-item.selected {
  background: #f3e8ff;
  border-color: #9333ea;
}

.country-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.country-item input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.country-item .country-flag {
  font-size: 24px;
  margin-right: 12px;
}

.country-item .country-info {
  flex: 1;
}

.country-item .country-name {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.badge-user-country {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Upgrade Modal */
.tier-upgrade-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: #6b7280;
}

.upgrade-header {
  text-align: center;
  margin-bottom: 24px;
}

.upgrade-header h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #1f2937;
}

.upgrade-price {
  font-size: 36px;
  font-weight: 700;
  color: #9333ea;
}

.upgrade-body h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1f2937;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.feature-list li {
  padding: 10px 0;
  font-size: 16px;
  color: #4b5563;
  border-bottom: 1px solid #e5e7eb;
}

.feature-list li:last-child {
  border-bottom: none;
}

.upgrade-confirm-btn {
  width: 100%;
  padding: 14px 24px;
  background: #9333ea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.upgrade-confirm-btn:hover {
  background: #7e22ce;
}

/* Premium Feature Locked State */
.tier-locked {
  position: relative;
  opacity: 0.6;
  cursor: not-allowed !important;
}

.tier-locked::after {
  content: '🔒';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 16px;
}

.tier-unlocked {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .tier-cards {
    grid-template-columns: 1fr;
  }

  .selector-stats {
    grid-template-columns: 1fr;
  }

  .card-pricing .price {
    font-size: 36px;
  }
}
