/* -------------------------------------------------------------
 * Words to Pages Converter Styles
 * ------------------------------------------------------------- */

.leaf-w2p-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.w2p-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.w2p-option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.w2p-input-container {
  margin-bottom: 2rem;
}

.w2p-input-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.w2p-slider-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.w2p-input-with-slider {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.w2p-main-num {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding: 12px 16px !important;
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.w2p-main-num:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  outline: none !important;
}

/* Custom Range Slider */
.w2p-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s ease;
}

.w2p-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #059669;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.w2p-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #047857;
}

.w2p-range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #059669;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Presets */
.w2p-presets-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.w2p-preset-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 4px;
}

.w2p-presets-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.w2p-preset-btn,
.w2p-page-preset-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 5px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.w2p-preset-btn:hover,
.w2p-page-preset-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.w2p-preset-btn.active,
.w2p-page-preset-btn.active {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
}

/* Result Card */
.w2p-result-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 60%, #f8fafc 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 32px -8px rgba(16, 185, 129, 0.12);
}

.w2p-result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 1.5rem;
}

.w2p-result-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #047857;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.w2p-result-number {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.w2p-result-subtitle {
  font-size: 0.95rem;
  color: #475569;
  margin-top: 6px;
}

.w2p-sheet-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.w2p-sheet-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.w2p-sheet-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

/* Secondary Metrics */
.w2p-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.w2p-metric-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
}

.w2p-metric-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.w2p-metric-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.w2p-metric-lbl {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

/* Action Row */
.w2p-action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.w2p-action-row a.leaf-btn-primary,
.w2p-action-row .leaf-btn-primary {
  border: none !important;
  text-decoration: none !important;
}

/* Reference Table Card */
.w2p-info-card {
  margin-top: 2.5rem;
}

.w2p-info-title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 0.5rem 0 !important;
}

.w2p-info-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.w2p-table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.w2p-chart-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.w2p-chart-table th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #0f172a;
}

.w2p-chart-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.w2p-chart-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.w2p-badge-highlight {
  display: inline-block;
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 6px;
}

/* FAQ */
.w2p-faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.w2p-faq-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1.25rem;
}

.w2p-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.w2p-faq-item h4 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 0 0 0.35rem 0 !important;
}

.w2p-faq-item p {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}
