/* 2026 Tax Law Changes — Widget Styles */
/* Prefix: tl- */

.tl-widget,
.tl-widget *,
.tl-widget *::before,
.tl-widget *::after,
.tl-provision,
.tl-provision *,
.tl-provision *::before,
.tl-provision *::after,
.tl-section,
.tl-section * {
  box-sizing: border-box;
}

/* ========== Status Chips ========== */

.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  font-family: inherit;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.4s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tl-chip.tl-visible { opacity: 1; }

.tl-chip::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  content: '';
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Loop icon — Permanent */
.tl-chip-permanent::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 13.66-5.66L20 9'/%3E%3Cpath d='M20 3v6h-6'/%3E%3Cpath d='M20 12a8 8 0 0 1-13.66 5.66L4 15'/%3E%3Cpath d='M4 21v-6h6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 13.66-5.66L20 9'/%3E%3Cpath d='M20 3v6h-6'/%3E%3Cpath d='M20 12a8 8 0 0 1-13.66 5.66L4 15'/%3E%3Cpath d='M4 21v-6h6'/%3E%3C/svg%3E");
}

/* Clock icon — Temporary */
.tl-chip-temporary::before {
  width: 13px;
  height: 13px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

/* Star icon — Effective */
.tl-chip-effective::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.9-4.8 4.6 1.2 6.5L12 17.8 6.1 20.6l1.2-6.5L2.5 9.5l6.6-.9L12 2.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.9-4.8 4.6 1.2 6.5L12 17.8 6.1 20.6l1.2-6.5L2.5 9.5l6.6-.9L12 2.5z'/%3E%3C/svg%3E");
}

/* Calendar icon — Expires */
.tl-chip-expires::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M8 3v4'/%3E%3Cpath d='M16 3v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M8 3v4'/%3E%3Cpath d='M16 3v4'/%3E%3C/svg%3E");
}

.tl-chip-permanent  { color: #1e6b40; background: #eaf5ee; border: 1px solid #b8dfc4; }
.tl-chip-temporary  { color: #4a3a8a; background: #eeebf8; border: 1px solid #c9c0ed; }
.tl-chip-effective  { color: #1a4070; background: #e8f0f8; border: 1px solid #b4cce8; }
.tl-chip-expires    { color: #6b5530; background: #f5f0e8; border: 1px solid #ddd0b8; }

/* ========== Key widget — legend (same img + label pattern as .tl-section) ========== */

.tl-key-widget {
  margin: 28px 0;
}

.tl-key-chips {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px 28px;
}

.tl-key-item {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
}

.tl-key-swatch {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  object-fit: contain;
  flex: 0 0 22px !important;
  margin: 0 !important;
  float: none !important;
  position: static !important;
}

.tl-key-label {
  flex: 0 1 auto;
  text-align: left;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
}

/* ========== Provisions — spacing only ========== */

.tl-provision {
  margin: 0 0 24px;
  padding: 0;
  border: none;
  background: transparent;
}

.tl-provision > :first-child {
  margin-top: 0;
}

.tl-provision > .tl-chip {
  display: inline-flex;
  margin: 0;
}

.tl-provision > :not(.tl-chip) {
  margin-bottom: 6px;
}

.tl-provision > :not(.tl-chip):last-of-type {
  margin-bottom: 4px;
}

/* ========== Section headings ========== */

.tl-section {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px;
  width: auto;
  max-width: 100%;
  margin-top: 40px;
  margin-bottom: 12px;
  scroll-margin-top: 24px;
}

/* First section (right after nav) — less top space */
.tl-nav-widget + .tl-section {
  margin-top: 28px;
}

.tl-section-icon {
  display: block !important;
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  object-fit: contain;
  flex: 0 0 36px !important;
  margin: 0 !important;
  float: none !important;
  position: static !important;
}

.tl-section-label {
  flex: 0 1 auto;
  text-align: left;
  margin: 0;
}

/* ========== Quick-Scan Nav Widget ========== */

.tl-nav-widget {
  margin: 32px 0;
}

.tl-nav-row-3 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.tl-nav-row-2 {
  display: none;
}

.tl-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 5px 14px 16px;
  background: linear-gradient(160deg, rgba(212, 255, 216, 0.30) 0%, rgba(212, 255, 216, 0) 55%), #ffffff;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
  opacity: 0;
  transform: translateY(10px);
}

.tl-nav-card.tl-visible {
  opacity: 1;
  transform: translateY(0);
}

.tl-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

.tl-nav-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  display: block;
}

.tl-nav-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

/* ========== Responsive ========== */

@media (max-width: 780px) {
  .tl-nav-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 500px) {
  .tl-nav-row-3 {
    grid-template-columns: 1fr 1fr;
  }

  .tl-section-icon {
    width: 30px;
    height: 30px;
  }

  .tl-provision {
    margin-bottom: 22px;
  }

  .tl-section {
    margin-top: 36px;
  }
}

/* ========== Reduced motion ========== */

@media (prefers-reduced-motion: reduce) {
  .tl-chip {
    transition: none;
  }

  .tl-provision {
    transition: none;
  }

  .tl-nav-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tl-nav-card:hover {
    transform: none;
  }
}
