/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body.app-theme {
  --color-primary: #2c3e50;
  --color-secondary: #34495e;
  --color-accent: #3498db;
  --color-bg: #ddedf8;
  --color-text: #333333;
  --color-highlight: #ffc568;
  --color-citation: #27ae60;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: linear-gradient(135deg, #87adfa 0%, #2d70db 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Landing page */
body.app-theme #landing-page {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
  text-align: center;
  color: #ffffff;
}

body.app-theme #landing-page header {
  margin-bottom: 2rem;
}

body.app-theme #landing-page h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
}

body.app-theme #features {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
}

body.app-theme .feature {
  max-width: 250px;
  padding: 1rem;
}

body.app-theme .feature i {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

body.app-theme .cta-button {
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

body.app-theme .cta-button:hover {
  background-color: #2980b9;
}

/* Modal */
body.app-theme .modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

body.app-theme .modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 5px;
  width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
}

body.app-theme .close {
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-size: 1.5rem;
  cursor: pointer;
}

body.app-theme #auth-tabs {
  display: flex;
  margin-bottom: 1rem;
}

body.app-theme .auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
}

body.app-theme .auth-tab.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

body.app-theme .auth-form {
  display: none;
}

body.app-theme .auth-form.active {
  display: block;
}

body.app-theme .auth-form input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #dddddd;
  border-radius: 3px;
}

body.app-theme .auth-form button {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

body.app-theme .auth-form button:hover {
  background-color: #2980b9;
}

body.app-theme .login-card {
  width: min(420px, 90vw);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 28px 28px 22px 28px;
  box-shadow: var(--shadow-lg);
  color: #2f3b49;
  text-align: left;
}

body.app-theme .login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

body.app-theme .login-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

body.app-theme .login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  text-align: center;
}

body.app-theme .login-subtitle {
  text-align: center;
  color: #5a6773;
  margin: 4px 0 16px 0;
}

body.app-theme .login-card label {
  display: block;
  font-weight: 600;
  color: #4b5662;
  margin-bottom: 6px;
}

body.app-theme .login-card input[type="email"],
body.app-theme .login-card input[type="password"],
body.app-theme .login-card input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd6dd;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 16px;
  background: #ffffff;
  box-sizing: border-box;
}

body.app-theme .login-actions {
  margin-top: 4px;
}

body.app-theme .login-actions .cta-button {
  width: 100%;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  text-align: center;
  color: #ffffff;
}

body.app-theme .login-footer {
  text-align: center;
  margin-top: 12px;
  color: #6f7a86;
  font-size: 0.9rem;
}

body.app-theme .login-footer a {
  color: var(--color-accent);
  text-decoration: none;
}

body.app-theme .login-footer-secondary {
  text-align: center;
  margin-top: 4px;
  color: #8a95a1;
  font-size: 0.8rem;
}

body.app-theme .terms-disclosure {
  text-align: center;
  font-size: 0.8rem;
  color: #8a95a1;
  margin-top: 8px;
  margin-bottom: 0;
  line-height: 1.4;
}

body.app-theme .terms-disclosure a {
  color: var(--color-accent);
  text-decoration: none;
}

body.app-theme .terms-disclosure a:hover {
  text-decoration: underline;
}

body.app-theme .login-version {
  text-align: center;
  margin-top: 8px;
  color: #9aa4af;
  font-size: 0.8rem;
}

body.app-theme .flash {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.95rem;
  z-index: 1200;
  box-shadow: var(--shadow-md);
  max-width: 90vw;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.app-theme .flash-alert,
body.app-theme .flash-error {
  background: rgba(198, 40, 40, 0.9);
}

body.app-theme .flash-notice {
  background: rgba(25, 118, 210, 0.9);
}

body.app-theme .flash.is-hidden {
  opacity: 0;
  transform: translate(-50%, -10px);
}

/* Main app container */
body.app-theme #app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
}

body.app-theme .container {
  max-width: 1100px;
  width: 100%;
}

/* Page Header */
body.app-theme .page-header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

body.app-theme .logo {
  max-width: 160px;
  margin-bottom: 15px;
  border-radius: 10px;
}

body.app-theme .welcome-text {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  color: white;
}

/* Workflow Section */
body.app-theme .workflow-section {
  margin-bottom: 30px;
}

body.app-theme .workflow-cards {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 15px;
}

body.app-theme .workflow-card {
  background: white;
  border-radius: 16px;
  padding: 25px 20px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  flex: 1;
  max-width: 280px;
  text-align: center;
  position: relative;
}

body.app-theme .workflow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.app-theme .workflow-card .step-number {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #27ae60;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
}

body.app-theme .workflow-card .card-icon {
  font-size: 2.5rem;
  color: #0C4DCF;
  margin-bottom: 15px;
  margin-top: 10px;
}

body.app-theme .workflow-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #01245B;
  border-bottom: none;
  padding-bottom: 0;
}

body.app-theme .workflow-card p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

body.app-theme .start-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #0C4DCF;
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

body.app-theme .start-btn:hover {
  background: #01245B;
}

body.app-theme .billing-hint {
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

body.app-theme .cta-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

body.app-theme .cta-divider .line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

body.app-theme .cta-divider .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

body.app-theme .purchase-btn {
  background: #16a34a;
  padding: 12px 18px;
  min-width: 160px;
}

body.app-theme .purchase-btn:hover {
  background: #15803d;
}

body.app-theme .purchase-btn .title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

body.app-theme .purchase-btn .price {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Trial modal */
body.app-theme .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

body.app-theme .modal-content {
  background: #ffffff;
  border-radius: 14px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body.app-theme .modal-content p {
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

body.app-theme .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body.app-theme .modal-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

body.app-theme .modal-btn-secondary {
  background: #e2e8f0;
  color: #475569;
}

body.app-theme .modal-btn-secondary:hover {
  background: #cbd5e1;
}

body.app-theme .modal-btn-primary {
  background: #0C4DCF;
  color: #ffffff;
}

body.app-theme .modal-btn-primary:hover {
  background: #01245B;
}

/* Arrow connectors */
body.app-theme .workflow-arrow {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  padding: 0 5px;
}

/* Utilities Section */
body.app-theme .utilities-section {
  background: rgba(28, 3, 3, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

body.app-theme .utilities-header {
  color: white;
  font-size: 0.9rem;
  margin-bottom: 15px;
  opacity: 0.8;
  text-align: center;
}

body.app-theme .utilities-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

body.app-theme .utility-card {
  background: rgba(23, 10, 10, 0.15);
  border-radius: 10px;
  padding: 15px 25px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
}

body.app-theme .utility-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

body.app-theme .utility-card i {
  font-size: 1.1rem;
  opacity: 0.9;
}

body.app-theme .utility-card-btn {
  font-family: inherit;
}

/* Footer */
body.app-theme .footer {
  text-align: center;
  margin-top: auto;
  padding-top: 20px;
}

body.app-theme .footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

body.app-theme .footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

body.app-theme .footer-links a:hover {
  color: white;
}

/* Download buttons in workflow card */
body.app-theme .download-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

body.app-theme .download-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #0C4DCF;
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.3s ease;
  text-decoration: none;
}

body.app-theme .download-btn:hover {
  background: #01245B;
}

/* Download columns layout */
body.app-theme .download-columns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

body.app-theme .download-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.app-theme .download-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

body.app-theme .download-buttons-vertical .download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 100px;
  text-align: center;
}

body.app-theme .download-buttons-vertical .download-btn i {
  font-size: 1rem;
}

body.app-theme .download-plus {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.app-theme .download-plus span {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0C4DCF;
}

body.app-theme .extension-btn {
  background: #27ae60;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.app-theme .extension-btn:hover {
  background: #1e8449;
}

/* Locked workflow card state */
body.app-theme .workflow-card.locked {
  background: #d5d9de;
  pointer-events: none;
  user-select: none;
  position: relative;
}

body.app-theme .workflow-card.locked:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

body.app-theme .workflow-card.locked .card-icon,
body.app-theme .workflow-card.locked h3,
body.app-theme .workflow-card.locked p,
body.app-theme .workflow-card.locked .download-btn,
body.app-theme .workflow-card.locked .download-plus span,
body.app-theme .workflow-card.locked .start-btn {
  opacity: 0.45;
}

body.app-theme .workflow-card.locked .download-btn,
body.app-theme .workflow-card.locked .start-btn {
  background: #8896a7;
  cursor: default;
}

body.app-theme .workflow-card.locked .extension-btn {
  background: #8896a7;
}

body.app-theme .workflow-card.locked .step-number {
  background: #8896a7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.app-theme .workflow-card .lock-badge {
  display: none;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #5a6773;
  font-weight: 500;
}

body.app-theme .workflow-card .lock-badge i {
  margin-right: 4px;
}

body.app-theme .workflow-card.locked .lock-badge {
  display: block;
}

/* Responsive */
@media screen and (max-width: 900px) {
  body.app-theme .workflow-cards {
    flex-direction: column;
    align-items: center;
  }

  body.app-theme .workflow-card {
    max-width: 100%;
    width: 100%;
  }

  body.app-theme .workflow-arrow {
    transform: rotate(90deg);
    padding: 10px 0;
  }
}

@media screen and (max-width: 500px) {
  body.app-theme .utilities-grid {
    flex-direction: column;
  }

  body.app-theme .utility-card {
    justify-content: center;
  }

  body.app-theme .download-columns {
    flex-direction: column;
    gap: 10px;
  }

  body.app-theme .download-plus {
    padding: 5px 0;
  }

  body.app-theme .download-plus span {
    font-size: 1.5rem;
  }
}

body.app-theme textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
  resize: vertical;
}

body.app-theme button {
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

body.app-theme button:hover {
  background-color: #2980b9;
}

body.app-theme #results,
body.app-theme #highlightedAbstract,
body.app-theme #timeline {
  margin-top: 20px;
  background-color: #ffffff;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.app-theme h2 {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 10px;
}

body.app-theme .highlight {
  background-color: var(--color-highlight);
  padding: 2px 0;
}

body.app-theme .citation {
  background-color: var(--color-citation);
  color: #ffffff;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: bold;
}

body.app-theme .timeline {
  max-width: 100%;
}

body.app-theme .timeline::after {
  left: 20px;
}

body.app-theme .timeline-item {
  width: 92%;
  padding-left: 50px;
  padding-right: 0;
}

body.app-theme .timeline-item::after {
  left: 12px;
}

body.app-theme .timeline-item:nth-child(even) {
  left: 0;
}

body.app-theme .timeline-item:nth-child(even)::after {
  left: 12px;
}

@media screen and (max-width: 768px) {
  body.app-theme .toggle-container {
    flex-direction: column;
  }

  body.app-theme .toggled-container {
    flex-direction: column;
  }

  body.app-theme .toggle-section {
    width: 100%;
    margin-bottom: 20px;
  }
}

body.app-theme .timeline-content {
  padding: 20px 30px;
  background-color: #ffffff;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.app-theme .ranking {
  font-weight: bold;
  color: var(--color-accent);
  margin-right: 5px;
}

body.app-theme p {
  margin-bottom: 10px;
}

body.app-theme .acronym {
  color: var(--color-accent);
  cursor: pointer;
}

body.app-theme #sidePanel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 300px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

body.app-theme #sidePanel.open {
  right: 0;
}

body.app-theme #closePanelBtn {
  color: var(--color-primary);
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

body.app-theme .quote-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

body.app-theme .quote-container p {
  margin: 0;
  flex-grow: 1;
}

body.app-theme .copy-btn {
  background-color: var(--color-accent);
  color: #f7f9f9;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

body.app-theme .copy-btn:hover {
  background-color: #2980b9;
}

body.app-theme .toggle-container {
  display: none;
  justify-content: space-between;
  margin-top: 20px;
}

body.app-theme .toggled-container {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

body.app-theme .toggle-section {
  width: 48%;
}

body.app-theme .toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--color-accent);
}

body.app-theme .launch-fallback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 0.9rem;
}

body.app-theme .launch-fallback a {
  color: var(--color-accent);
  font-weight: 600;
}

body.app-theme .download-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
