/**
 * TylkoMy Pricing Cards
 * Modern card-based package display
 * 
 * @version 2.2.0
 */

/* ==========================================
   Base Styles
   ========================================== */
.tm-pricing {
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 15px 60px;
  color: #333;
}

.tm-pricing * {
  box-sizing: border-box;
}

.tm-pricing h1, 
.tm-pricing h2, 
.tm-pricing h3 {
  margin: 0;
}

/* ==========================================
   Hero Section
   ========================================== */
.tm-hero {
  text-align: center;
  margin-bottom: 40px;
}

.tm-hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tm-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #222;
  margin-bottom: 10px;
}

.tm-hero-sub {
  font-size: 15px;
  color: #666;
  max-width: 580px;
  margin: 0 auto;
}

/* ==========================================
   Card Grid
   ========================================== */
.tm-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .tm-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tm-card-grid {
    grid-template-columns: 1fr;
  }
  
  .tm-hero-title {
    font-size: 26px;
  }
}

/* ==========================================
   Card Base
   ========================================== */
.tm-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px 18px 20px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.04);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

/* Popular Tag */
.tm-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* ==========================================
   Card Content
   ========================================== */
.tm-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 2px;
}

.tm-sub {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

.tm-price {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0;
}

.tm-price-period {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

.tm-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin: 6px 0;
}

/* ==========================================
   Features List
   ========================================== */
.tm-pricing .tm-features,
.tm-card .tm-features,
ul.tm-features {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  padding-left: 0 !important;
  margin: 12px 0 0 !important;
  display: block !important;
  font-size: 13px;
  flex-grow: 1;
}

.tm-pricing .tm-features li,
.tm-card .tm-features li,
ul.tm-features li {
  display: block !important;
  float: none !important;
  width: 100% !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
  list-style: none !important;
  list-style-type: none !important;
}

.tm-pricing .tm-features li::before,
.tm-card .tm-features li::before,
ul.tm-features li::before {
  content: "✓ " !important;
  color: inherit;
  font-weight: 700;
  margin-right: 6px;
}

/* ==========================================
   Buttons
   ========================================== */
.tm-btn {
  margin-top: 15px;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.tm-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.tm-btn-disabled {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}

/* ==========================================
   Active Package State
   ========================================== */
.tm-card.tm-active {
  opacity: 0.85;
}

.tm-card.tm-active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  pointer-events: none;
}

/* ==========================================
   VENDOR THEME (Teal)
   ========================================== */
.tm-pricing--vendor .tm-hero-badge {
  background: #e3f5f5;
  color: #00aeaf;
}

.tm-pricing--vendor .tm-card {
  border: 1px solid #eef5f5;
}

.tm-pricing--vendor .tm-card.tm-popular {
  border: 1px solid #00aeaf;
  box-shadow: 0 18px 35px rgba(0, 174, 175, 0.18);
}

.tm-pricing--vendor .tm-tag {
  background: linear-gradient(135deg, #00aeaf, #53d5d5);
}

.tm-pricing--vendor .tm-price {
  color: #00aeaf;
}

.tm-pricing--vendor .tm-pill {
  background: #e3f5f5;
  color: #00aeaf;
}

.tm-pricing--vendor .tm-features li::before {
  color: #00aeaf;
}

.tm-pricing--vendor .tm-btn-primary {
  background: linear-gradient(135deg, #00aeaf, #53d5d5);
  color: #fff;
}

.tm-pricing--vendor .tm-btn-primary:hover {
  background: linear-gradient(135deg, #009a9b, #45c9c9);
  color: #fff;
}

.tm-pricing--vendor .tm-btn-outline {
  background: #fff;
  color: #00aeaf;
  border: 1px solid #b8ecec;
}

.tm-pricing--vendor .tm-btn-outline:hover {
  background: #e3f5f5;
  color: #00aeaf;
}

.tm-pricing--vendor .tm-card.tm-active {
  border-color: #00aeaf;
}

.tm-pricing--vendor .tm-card.tm-active::after {
  border: 2px solid #00aeaf;
}

/* ==========================================
   COUPLE THEME (Pink/Salmon)
   ========================================== */
.tm-pricing--couple .tm-hero-badge {
  background: #fef4e6;
  color: #ff4b7c;
}

.tm-pricing--couple .tm-card {
  border: 1px solid #f5e6f0;
}

.tm-pricing--couple .tm-card.tm-popular {
  border: 1px solid #ff4b7c;
  box-shadow: 0 18px 40px rgba(255, 75, 124, 0.18);
}

.tm-pricing--couple .tm-tag {
  background: linear-gradient(135deg, #ff4b7c, #ff7fa3);
}

.tm-pricing--couple .tm-price {
  color: #ff4b7c;
}

.tm-pricing--couple .tm-pill {
  background: #fef4e6;
  color: #b45b27;
}

.tm-pricing--couple .tm-features li::before {
  color: #00aeaf;
}

.tm-pricing--couple .tm-btn-primary {
  background: linear-gradient(135deg, #ff4b7c, #ff7fa3);
  color: #fff;
}

.tm-pricing--couple .tm-btn-primary:hover {
  background: linear-gradient(135deg, #e53d6a, #ff6b93);
  color: #fff;
}

.tm-pricing--couple .tm-btn-outline {
  background: #fff;
  color: #ff4b7c;
  border: 1px solid #ffd0df;
}

.tm-pricing--couple .tm-btn-outline:hover {
  background: #fff5f8;
  color: #ff4b7c;
}

.tm-pricing--couple .tm-card.tm-active {
  border-color: #ff4b7c;
}

.tm-pricing--couple .tm-card.tm-active::after {
  border: 2px solid #ff4b7c;
}

/* ==========================================
   No Packages Message
   ========================================== */
.tm-no-packages {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 15px;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
  .tm-pricing {
    padding: 20px 0;
  }
  
  .tm-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .tm-btn {
    display: none;
  }
}

/* ==========================================
   Button Loading State
   ========================================== */
.tm-btn.tm-btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.tm-btn.tm-btn-loading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: tm-spin 0.8s linear infinite;
}

@keyframes tm-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.tm-btn-disabled {
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
}
