/* ========================================
   Premium Tools — Shared Styles
   ======================================== */

/* Hero for tool pages */
.tool-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1f14 100%);
  padding: 50px 40px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 108, 46, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.tool-hero__icon {
  width: 64px;
  height: 64px;
  background: rgba(232, 108, 46, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
  color: #e86c2e;
  position: relative;
  z-index: 1;
}

.tool-hero__title {
  font-family: 'Poiret One', cursive;
  font-size: 2.2rem;
  font-weight: 400;
  color: #fff;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}

.tool-hero__subtitle {
  font-family: 'Mulish', sans-serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* Sections */
.tool-section {
  padding: 50px 40px;
}

.tool-section--alt {
  background: #f7f4f0;
}

.tool-section__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 24px;
}

/* Cards */
.tool-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Tabs / Pills */
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #e0dbd4;
  border-radius: 50px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-tab:hover {
  border-color: #e86c2e;
  color: #e86c2e;
}

.tool-tab.active {
  background: #e86c2e;
  border-color: #e86c2e;
  color: #fff;
}

.tool-tab i {
  font-size: 0.9rem;
}

/* Input groups */
.tool-input-group {
  margin-bottom: 20px;
}

.tool-input-group label {
  display: block;
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.tool-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e0dbd4;
  border-radius: 12px;
  font-family: 'Mulish', sans-serif;
  font-size: 1rem;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.tool-input:focus {
  outline: none;
  border-color: #e86c2e;
  box-shadow: 0 0 0 3px rgba(232, 108, 46, 0.1);
}

.tool-input--large {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  padding: 20px;
}

.tool-select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e0dbd4;
  border-radius: 12px;
  font-family: 'Mulish', sans-serif;
  font-size: 1rem;
  color: #333;
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* Result display */
.tool-result {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1f14 100%);
  border-radius: 16px;
  padding: 30px;
  color: #fff;
}

.tool-result__label {
  font-family: 'Mulish', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #e86c2e;
  margin-bottom: 8px;
}

.tool-result__value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tool-result__note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Breakdown table */
.tool-breakdown {
  width: 100%;
  border-collapse: collapse;
}

.tool-breakdown th,
.tool-breakdown td {
  padding: 12px 0;
  font-family: 'Mulish', sans-serif;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0ece7;
  text-align: left;
}

.tool-breakdown th {
  font-weight: 600;
  color: #999;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tool-breakdown td:last-child {
  text-align: right;
  font-weight: 600;
  color: #2a2a2a;
}

.tool-breakdown tr:last-child td {
  border-bottom: none;
}

.tool-breakdown .row-highlight td {
  color: #e86c2e;
  font-weight: 700;
  font-size: 1rem;
}

/* Bar chart (CSS only) */
.tool-bar {
  display: flex;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
}

.tool-bar__segment {
  height: 100%;
  transition: width 0.4s ease;
}

.tool-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

.tool-bar__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  color: #777;
}

.tool-bar__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Progress bar */
.tool-progress {
  background: #f0ece7;
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
  margin: 12px 0;
}

.tool-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #e86c2e, #f0a060);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.tool-progress__text {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  color: #777;
  margin-top: 6px;
}

/* Checklist items */
.tool-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-checklist__item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #f0ece7;
  align-items: flex-start;
}

.tool-checklist__item:last-child {
  border-bottom: none;
}

.tool-checklist__check {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: transparent;
  font-size: 0.85rem;
  margin-top: 2px;
}

.tool-checklist__check:hover {
  border-color: #e86c2e;
}

.tool-checklist__check.checked {
  background: #e86c2e;
  border-color: #e86c2e;
  color: #fff;
}

.tool-checklist__content {
  flex: 1;
}

.tool-checklist__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-bottom: 4px;
}

.tool-checklist__item.completed .tool-checklist__title {
  text-decoration: line-through;
  color: #aaa;
}

.tool-checklist__desc {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
}

.tool-checklist__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  color: #e86c2e;
  text-decoration: none;
  margin-top: 6px;
  font-weight: 600;
}

.tool-checklist__link:hover {
  text-decoration: underline;
}

.tool-checklist__day {
  font-family: 'Mulish', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #e86c2e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Template cards */
.tool-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-template-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  border: 1px solid #f0ece7;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-template-card:hover {
  border-color: #e86c2e;
  box-shadow: 0 4px 16px rgba(232, 108, 46, 0.1);
}

.tool-template-card__icon {
  width: 44px;
  height: 44px;
  background: rgba(232, 108, 46, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #e86c2e;
  margin-bottom: 16px;
}

.tool-template-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2a2a2a;
  margin-bottom: 8px;
}

.tool-template-card__desc {
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  color: #777;
  line-height: 1.5;
}

/* Template modal / expanded view */
.tool-template-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tool-template-modal__content {
  background: #fff;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
}

.tool-template-modal__close {
  float: right;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
  padding: 4px 8px;
}

.tool-template-preview {
  background: #faf8f5;
  border: 1px solid #e0dbd4;
  border-radius: 12px;
  padding: 30px;
  font-family: 'Times New Roman', serif;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #333;
  margin: 20px 0;
  white-space: pre-wrap;
}

.tool-template-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Phrasebook */
.tool-phrase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-phrase-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #f0ece7;
}

.tool-phrase-card__sk {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-bottom: 4px;
}

.tool-phrase-card__pronunciation {
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  color: #b5704d;
  font-style: italic;
  margin-bottom: 8px;
}

.tool-phrase-card__translation {
  font-family: 'Mulish', sans-serif;
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 12px;
}

.tool-phrase-card__play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 108, 46, 0.1);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e86c2e;
  cursor: pointer;
  transition: background 0.2s;
}

.tool-phrase-card__play:hover {
  background: rgba(232, 108, 46, 0.2);
}

/* Category grid */
.tool-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.tool-category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid #f0ece7;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.tool-category-btn:hover {
  border-color: #e86c2e;
  transform: translateY(-2px);
}

.tool-category-btn.active {
  background: #e86c2e;
  border-color: #e86c2e;
  color: #fff;
}

.tool-category-btn__icon {
  font-size: 1.6rem;
}

.tool-category-btn__label {
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Dashboard widgets */
.tool-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tool-widget {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  border: 1px solid #f0ece7;
}

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

.tool-widget__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2a2a2a;
}

.tool-widget__icon {
  width: 36px;
  height: 36px;
  background: rgba(232, 108, 46, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e86c2e;
  font-size: 0.9rem;
}

/* Reminder items */
.tool-reminder {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0ece7;
  align-items: center;
}

.tool-reminder:last-child {
  border-bottom: none;
}

.tool-reminder__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  min-width: 10px;
}

.tool-reminder__dot--urgent {
  background: #e74c3c;
}

.tool-reminder__dot--warning {
  background: #f39c12;
}

.tool-reminder__dot--ok {
  background: #27ae60;
}

.tool-reminder__info {
  flex: 1;
}

.tool-reminder__title {
  font-family: 'Mulish', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2a2a2a;
}

.tool-reminder__date {
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  color: #999;
}

.tool-reminder__delete {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
}

.tool-reminder__delete:hover {
  color: #e74c3c;
}

/* Buttons */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'Mulish', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.tool-btn--primary {
  background: #e86c2e;
  color: #fff;
}

.tool-btn--primary:hover {
  background: #d05c20;
}

.tool-btn--outline {
  background: transparent;
  color: #e86c2e;
  border: 1px solid #e86c2e;
}

.tool-btn--outline:hover {
  background: rgba(232, 108, 46, 0.08);
}

.tool-btn--small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* Quick links grid */
.tool-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.tool-quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #f0ece7;
  border-radius: 14px;
  text-decoration: none;
  color: #2a2a2a;
  transition: all 0.2s;
}

.tool-quick-link:hover {
  border-color: #e86c2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.tool-quick-link__icon {
  width: 40px;
  height: 40px;
  background: rgba(232, 108, 46, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e86c2e;
  font-size: 1rem;
}

.tool-quick-link__text {
  font-family: 'Mulish', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .tool-hero {
    padding: 40px 24px 30px;
  }

  .tool-hero__title {
    font-size: 1.8rem;
  }

  .tool-section {
    padding: 36px 20px;
  }

  .tool-templates-grid,
  .tool-phrase-grid {
    grid-template-columns: 1fr;
  }

  .tool-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .tool-quick-links {
    grid-template-columns: 1fr;
  }

  .tool-result__value {
    font-size: 1.8rem;
  }

  .tool-template-modal__content {
    padding: 24px;
  }

  .tool-template-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .tool-hero__title {
    font-size: 1.5rem;
  }

  .tool-category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tool-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tool-tabs::-webkit-scrollbar {
    display: none;
  }

  .tool-tab {
    white-space: nowrap;
  }
}
