/**
 * Deep Link Tester Tool Styles
 * ChottuLink - Free Tools Suite
 */

/* ===============================
   Score Card
   =============================== */
.score-card {
  padding: 2rem;
  max-width: 600px;
  margin: 2rem auto;
  position: relative;
  z-index: 1;
  border: 0;
  box-shadow: none;
}

.score-circle-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
}

.score-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: var(--border-subtle, #e5e7eb);
  stroke-width: 8;
}

.score-progress {
  fill: none;
  stroke: #22c55e;
  stroke-width: 8;
  stroke-linecap: round;
  transition:
    stroke-dashoffset 1s ease-out,
    stroke 0.3s ease;
}

.score-value {
  position: absolute;
  height: 82%;
  width: 82%;
  background: var(--app-bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 700;
  color: var(--app-text-primary, #1f2937);
}

.score-label {
  margin-top: 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--app-text-primary, #1f2937);
  margin-bottom: 0.5rem;
}

.score-summary {
  font-size: 0.95rem;
  color: var(--text-secondary, #6b7280);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

.score-summary img {
  height: 0.95rem;
  width: 0.95rem;
}

.score-card-cta {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  /*border-top: 1px solid var(--border-subtle);*/
}

.score-card-cta p {
  color: var(--app-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.score-card-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.score-card-actions .btn-gradient {
  width: max-content;
  padding: 0 1rem;
}

/* ===============================
   Report Grid
   =============================== */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  /*gap: 1.5rem;*/
  margin-top: 1rem;
}

.report-card {
  margin: auto;
  height: 100%;
}

@media (max-width: 768px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}

.report-card {
  padding: 1.5rem;
}

.report-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}

.report-icon {
  font-size: 1.5rem;
}

.report-icon img {
  height: 1.5rem;
  width: 1.5rem;
}

html[data-theme="dark"] #ios-card .report-icon {
  filter: invert(1);
}

.report-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--app-text-primary, #1f2937);
  margin: 0;
}

.report-status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-success {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* ===============================
   Check Items
   =============================== */
.report-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--card-bg-secondary, #f9fafb);
}

.check-item.skeleton {
  height: 3rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.check-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.check-icon img {
  height: 1rem;
  width: 1rem;
  margin-top: 0.1rem;
}

.check-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.check-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--app-text-primary, #1f2937);
}

.check-message {
  font-size: 0.8rem;
  color: var(--text-secondary, #6b7280);
  word-break: break-word;
}

.check-link {
  color: var(--primary-color, #256fc3);
  text-decoration: none;
  font-weight: 500;
}

.check-link:hover {
  text-decoration: underline;
}

.check-success {
  background: rgba(34, 197, 94, 0.08);
}

.check-warning {
  background: rgba(245, 158, 11, 0.08);
}

.check-error {
  background: rgba(239, 68, 68, 0.08);
}

.check-info {
  background: rgba(59, 130, 246, 0.08);
}

/* ===============================
   Behavior Section
   =============================== */
.behavior-section {
  padding: 2rem;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--app-text-primary, #1f2937);
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.section-title img {
  height: 1.25rem;
  width: 1.25rem;
}

.behavior-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem;
  border-radius: 999px;
}

.behavior-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.behavior-tab:hover {
  background: rgba(148, 163, 184, 0.2);
}

.behavior-tab.active {
  background: #0f172a;
  color: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.behavior-tab .tab-icon {
  width: 18px;
  height: 18px;
}

.behavior-tab.active .tab-icon {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .behavior-tab .tab-icon {
  filter: brightness(0) invert(1);
}
html[data-theme="dark"] .behavior-tab.active img[src*="apple.svg"] {
  filter: invert(0);
}

html[data-theme="dark"] #ios-behavior img[src*="apple.svg"] {
  filter: invert(1);
}

html[data-theme="dark"] .behavior-tab.active .tab-icon {
  filter: brightness(0) invert(0);
}

html[data-theme="dark"] .behavior-tab.active {
  background: #ffffff;
  color: #0f172a;
}

.behavior-tabs-dark {
  background: var(--card-bg-secondary);
}

.behavior-tabs-dark .behavior-tab {
  color: var(--text-secondary);
}

.behavior-tabs-dark .behavior-tab .tab-icon {
  filter: brightness(0) invert(1);
}

.behavior-tabs-dark .behavior-tab.active {
  background: var(--app-text-primary);
  color: var(--app-bg-primary);
  box-shadow: var(--shadow-md);
}

.behavior-tabs-dark .behavior-tab.active .tab-icon {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .behavior-tabs-dark {
  background: var(--card-bg-primary);
}

html[data-theme="dark"] .behavior-tabs-dark .behavior-tab.active {
  background: var(--app-bg-primary);
  color: var(--app-text-primary);
}

html[data-theme="dark"] .behavior-tabs-dark .behavior-tab.active .tab-icon {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .behavior-preview-shell {
  background: var(--card-bg-primary);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .behavior-preview-shell h3 {
  color: var(--app-text-primary);
}

html[data-theme="dark"] .behavior-preview-shell .behavior-panel {
  background: var(--card-bg-secondary);
  border-color: var(--border-subtle);
}

html[data-theme="dark"] .behavior-preview-shell .scenario-grid > div {
  background: var(--card-bg-primary);
  border-color: var(--border-subtle);
  box-shadow: none;
}

html[data-theme="dark"] .behavior-preview-shell h4 {
  color: var(--app-text-primary);
}

html[data-theme="dark"] .behavior-preview-shell p {
  color: var(--text-secondary);
}

.behavior-panel {
  display: none;
}

.behavior-panel.active {
  display: flex;
}

.behavior-preview-shell p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.scenario-grid {
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.scenario-grid.single {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: baseline;
  }
}

.scenario-card {
  padding: 1.5rem;
  text-align: center;
  border-radius: 0.75rem;
  background: var(--card-bg-secondary, #f9fafb);
  border: 1px solid var(--border-subtle, #e5e7eb);
}

.scenario-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.scenario-icon.installed {
  color: #22c55e;
}

.scenario-icon.not-installed {
  color: #6b7280;
}

.scenario-icon.web {
  color: #3b82f6;
}

.scenario-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--app-text-primary, #1f2937);
  margin: 0 0 0.5rem;
}

.scenario-card p {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===============================
   PDF Download Section
   =============================== */

/* PDF Email Modal */
.pdf-email-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pdf-email-modal.show {
  opacity: 1;
  visibility: visible;
}

.pdf-modal-content {
  background: var(--card-bg-primary);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.pdf-email-modal.show .pdf-modal-content {
  transform: translateY(0);
}

.pdf-modal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--app-text-primary);
  margin-bottom: 0.5rem;
}

.pdf-modal-content p {
  color: var(--app-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.pdf-modal-content .email-input {
  width: 100%;
  margin-bottom: 1rem;
}

.pdf-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.pdf-modal-content .btn-gradient:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-pdf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.email-input-row {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .email-input-row {
    flex-direction: column;
  }
}

.email-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  background: var(--card-bg-primary);
  color: var(--app-text-primary);
  font-size: 0.9rem;
}

.email-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* ===============================
   Upsell Section
   =============================== */
.upsell-section {
  padding: 2rem;
  background: linear-gradient(
    135deg,
    rgba(37, 111, 195, 0.05) 0%,
    rgba(37, 111, 195, 0.1) 100%
  );
  border: 1px solid rgba(37, 111, 195, 0.2);
  box-sizing: border-box;
  overflow: hidden;
}

.upsell-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.upsell-details {
  flex: 1;
  min-width: 0;
}

.upsell-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color, #256fc3);
  margin: 0 0 0.75rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}

.upsell-header h3 img {
  height: 1.25rem;
  width: 1.25rem;
}

.competitor-alert {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  /*margin-bottom: 1.5rem;*/
}

.competitor-alert strong {
  display: block;
  color: #d97706;
  margin-bottom: 0.25rem;
}

.competitor-alert p {
  margin: 0;
  color: var(--app-text-primary, #1f2937);
  font-size: 0.9rem;
}

.upsell-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 2rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.benefit-item img {
  height: 0.9rem;
  width: 0.9rem;
}

@media (max-width: 640px) {
  .upsell-header h3 {
    align-items: flex-start;
  }

  .upsell-header h3 img {
    margin-top: 0.5rem;
  }

  .score-summary {
    align-items: flex-start;
  }

  .score-summary img {
    margin-top: 0.2rem;
  }

  .upsell-benefits {
    grid-template-columns: 1fr;
  }
}

.benefit-item {
  font-size: 0.9rem;
  color: var(--app-text-primary, #1f2937);
}

.upsell-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-left: auto;
}

.upsell-cta .btn-gradient {
  min-width: 10.5rem;
}

.upsell-cta .btn-gradient.btn-signup span {
  border: 1px solid rgba(31, 41, 55, 0.2);
}

@media (max-width: 900px) {
  .upsell-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .upsell-cta {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.75rem;
    margin-left: 0;
  }
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary-color, #256fc3);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--primary-color, #256fc3);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  /* background: var(--primary-color, #256fc3); */
  /* color: var(--app-text-primary); */
}

/* ===============================
   Loading State
   =============================== */
.loading-container {
  margin-top: 2rem;
}

.loading-card {
  padding: 3rem 2rem;
  max-width: 400px;
  margin: 0 auto;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.spinner.large {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.spinner.btn-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  margin: 0;
}

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

.loading-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--app-text-primary, #1f2937);
  margin: 1.5rem 0 0.5rem;
}

.loading-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

/* ===============================
   Email Gate Modal
   =============================== */
.email-gate-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
  z-index: 140;
  padding: 1.5rem;
}

.email-gate-panel {
  position: relative;
  width: min(420px, 100%);
  background: var(--card-bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .email-gate-panel {
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.email-gate-panel h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.email-gate-panel p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.email-gate-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.email-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-gate-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.email-gate-input {
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-medium);
  background: var(--input-bg, var(--card-bg-primary));
  color: var(--text-primary);
}

.email-gate-input:focus {
  outline: none;
  border-color: var(--app-primary, #256fc3);
  box-shadow: 0 0 0 3px rgba(37, 111, 195, 0.15);
}

.email-gate-error {
  color: #dc2626;
  font-size: 0.85rem;
}

[data-theme="dark"] .email-gate-error {
  color: #fca5a5;
}

.email-gate-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ===============================
   Results Container
   =============================== */
.results-container {
  /*max-width: 900px;*/
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
}

/* ===============================
   Tool Input (reuse from social-preview)
   =============================== */
.tool-input-panel {
  padding: 1.5rem 2rem;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--app-text-primary, #1f2937);
}

.input-row {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .input-row {
    flex-direction: column;
  }
}

.url-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-subtle, #e5e7eb);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: var(--input-bg, white);
  color: var(--app-text-primary, #1f2937);
  transition: border-color 0.2s ease;
}

.url-input:focus {
  outline: none;
  border-color: var(--primary-color, #256fc3);
}

.url-input::placeholder {
  color: var(--text-placeholder, #9ca3af);
}

.preview-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  white-space: nowrap;
}

.preview-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ===============================
   Dark Theme Overrides
   =============================== */
[data-theme="dark"] .score-bg {
  stroke: #374151;
}

[data-theme="dark"] .check-item {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .scenario-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .upsell-section {
  background: linear-gradient(
    135deg,
    rgba(37, 111, 195, 0.1) 0%,
    rgba(37, 111, 195, 0.15) 100%
  );
}

[data-theme="dark"] .url-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .report-card, [data-theme="dark"] .suggestion-panel {
  border-color: #333;
}

[data-theme="dark"] .benefit-card,
[data-theme="dark"] .cta-card,
[data-theme="dark"] .faq-card,
[data-theme="dark"] .input-card {
  border-color: #333;
}

/* Firebase Shutdown Critical Alert */
.firebase-shutdown-alert {
  margin: 2rem auto 0 auto;
  max-width: 600px;
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.1) 0%,
    rgba(220, 38, 38, 0.15) 100%
  );
  border: 2px solid rgba(220, 38, 38, 0.4);
  animation: pulse-alert 2s infinite;
}

@keyframes pulse-alert {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
}

.firebase-shutdown-alert .alert-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.firebase-shutdown-alert .alert-content {
  flex: 1;
}

.firebase-shutdown-alert .alert-content strong {
  display: block;
  font-size: 1.1rem;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.firebase-shutdown-alert .alert-content p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--app-text-primary, #1f2937);
}

.firebase-shutdown-alert .alert-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.firebase-shutdown-alert .btn-gradient {
  max-width: 12rem;
  font-size: 0.9rem;
}

/* Competitor Top Alert (non-Firebase) */
.competitor-top-alert {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-top: 1rem;
}

.competitor-top-alert strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #d97706;
}

.competitor-top-alert p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--app-text-primary, #1f2937);
}

/* Severity-based alert styling */
.competitor-top-alert.severity-critical,
.competitor-alert.severity-critical {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
}

.competitor-top-alert.severity-critical strong,
.competitor-alert.severity-critical strong {
  color: #dc2626;
}

.competitor-top-alert.severity-warning,
.competitor-alert.severity-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.competitor-top-alert.severity-warning strong,
.competitor-alert.severity-warning strong {
  color: #d97706;
}

.competitor-top-alert.severity-info,
.competitor-alert.severity-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.competitor-top-alert.severity-info strong,
.competitor-alert.severity-info strong {
  color: #3b82f6;
}

/* ===============================
   Deferred Deep Link Note
   =============================== */
.deferred-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary-color, #256fc3);
  font-style: italic;
}

.deferred-note img {
  height: 0.75rem;
  width: 0.75rem;
}

/* ===============================
   Enhanced Mobile Responsiveness
   =============================== */
@media (max-width: 768px) {
  /* Score card mobile */
  .score-card {
    padding: 1.5rem;
  }

  .score-circle-wrapper {
    width: 130px;
    height: 130px;
  }

  .score-value {
    font-size: 2.5rem;
  }

  /* Behavior tabs mobile */
  .behavior-tabs {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .behavior-tab {
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    gap: 0.35rem;
  }

  .behavior-tab .tab-icon {
    width: 14px;
    height: 14px;
  }

  /* Firebase alert mobile */
  .firebase-shutdown-alert {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  .firebase-shutdown-alert .alert-actions {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  /* Upsell section mobile */
  .upsell-section {
    padding: 1.5rem;
  }

  .upsell-cta {
    flex-direction: column;
  }

  .upsell-cta .btn-gradient {
    width: 100%;
  }

  .firebase-shutdown-alert .btn-gradient,
  .firebase-shutdown-alert .btn-signup {
    width: 100% !important;
    max-width: 100%;
  }

  .upsell-cta .btn-nav.btn-signup {
    width: 100% !important;
    height: auto !important;
  }

  /* Report cards mobile */
  .report-card {
    padding: 1.25rem;
    max-width: 100%;
  }

  .report-title {
    font-size: 0.9rem;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  .firebase-shutdown-alert .btn-gradient,
  .firebase-shutdown-alert .btn-call {
    width: 12rem !important;
  }
}

@media (max-width: 480px) {
  /* Very small screens */
  .score-circle-wrapper {
    width: 110px;
    height: 110px;
  }

  .score-value {
    font-size: 2rem;
  }

  .score-label {
    font-size: 1rem;
  }

  .behavior-section {
    padding: 1.5rem 1rem;
  }

  .scenario-card {
    padding: 1rem;
  }

  .scenario-icon {
    font-size: 2rem;
  }

  .tool-input-panel {
    padding: 1rem;
  }

  .preview-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===============================
   Dark Theme Additions
   =============================== */
[data-theme="dark"] .firebase-shutdown-alert {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.15) 0%,
    rgba(220, 38, 38, 0.2) 100%
  );
}

[data-theme="dark"] .competitor-top-alert {
  background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .competitor-top-alert.severity-info {
  background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .upsell-card {
  background: #0f172a;
  border-color: #333;
}

[data-theme="dark"] .upsell-glow {
  background: rgba(59, 130, 246, 0.25);
  opacity: 0.6;
}

[data-theme="dark"] .upsell-eyebrow {
  color: #93c5fd;
}

[data-theme="dark"] .upsell-feature {
  color: #cbd5f5;
}

[data-theme="dark"] .upsell-secondary {
  background: #0b1220;
  border-color: #333;
  color: #e5e7eb;
}

[data-theme="dark"] .upsell-secondary:hover {
  border-color: #60a5fa;
  color: #93c5fd;
}

[data-theme="dark"] .deferred-note {
  color: #60a5fa;
}

/* ===============================
   Inline Messages
   =============================== */
.input-error {
  color: #dc2626;
  font-size: 0.85rem;
}

.input-success {
  color: #16a34a;
  font-size: 0.85rem;
}

[data-theme="dark"] .input-error {
  color: #fca5a5;
}

[data-theme="dark"] .input-success {
  color: #86efac;
}

.btn-cancel {
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  color: var(--app-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  border-color: var(--app-text-secondary);
}

@media (max-width: 640px) {
  .pdf-download-section {
    flex-direction: column;
    text-align: center;
  }

  .upsell-cta {
    flex-direction: column;
  }

  .upsell-cta .btn-gradient,
  .upsell-cta .btn-nav.btn-signup {
    width: 100% !important;
  }

  .upsell-benefits {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(1, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .upsell-header h3 {
    align-items: flex-start;
    text-align: start;
    justify-content: center;
  }

  .upsell-header h3 img {
    margin-top: 0.2rem;
  }
}
.tool-controls button:disabled,
#test-btn:disabled {
  pointer-events: none;
}
