/* Shared Styles for Tools Pages */
/* These styles extend the main goglobal.css */

.tool-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem;
  min-height: calc(100vh - 400px);
}

.tool-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.tool-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tool-description {
  color: #4a5568;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.tool-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.tool-section {
  margin-bottom: 2rem;
}

.tool-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

.tool-input-group {
  margin-bottom: 1.5rem;
}

.tool-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.tool-input,
.tool-select,
.tool-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  color: #1a202c;
  background: white;
  transition: all 0.2s ease;
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tool-input::placeholder {
  color: #9ca3af;
}

.tool-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.tool-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.tool-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.tool-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.tool-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.tool-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.05));
  border: 2px solid rgba(16, 185, 129, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 2rem;
}

.tool-result-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

.tool-result-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.tool-result-description {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.6;
}

.tool-info {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #1e40af;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tool-info strong {
  font-weight: 600;
}

.tool-warning {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tool-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-stat-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.tool-stat-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.tool-stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.tool-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
}

.tool-cta {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}

.tool-cta-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tool-cta-description {
  color: #cbd5e1;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.tool-cta .btn-primary {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* CPM Table/Cards Responsive */
@media (min-width: 769px) {
  .cpm-cards-mobile {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .cpm-table-desktop {
    display: none !important;
  }
  
  .cpm-cards-mobile {
    display: block !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .tool-container {
    padding: 1rem 1rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .tool-result-value {
    font-size: 2rem;
  }

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

  .tool-cta {
    padding: 2rem 1.5rem;
  }
}

/* Loading State */
.tool-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tooltip */
.tool-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  color: #3b82f6;
  margin-left: 0.25rem;
}

.tool-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #1a202c;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.tool-tooltip:hover::after {
  opacity: 1;
}

/* Details/Summary Accordion */
details summary::-webkit-details-marker {
  display: none;
}

details[open] summary svg {
  transform: rotate(180deg);
}

details summary svg {
  transition: transform 0.3s ease;
}

/* Improved Slider with gradient track */
.tool-slider {
  background: linear-gradient(to right, #10b981 0%, #10b981 50%, #e5e7eb 50%, #e5e7eb 100%);
  background-size: 200% 100%;
  background-position: right;
}

.tool-slider::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.tool-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.tool-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.tool-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}
