/*
 * 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.
 */

/* Custom primary color for ClockMind branding */
:root {
  --pico-primary: #0F22F6 !important;
  --pico-primary-hover: #0B1ACC !important;
  --pico-primary-focus: rgba(15, 34, 246, 0.125) !important;
  --pico-primary-inverse: #FFF !important;
}

[data-theme="light"],
:root:not([data-theme="dark"]) {
  --pico-primary: #0F22F6 !important;
  --pico-primary-hover: #0B1ACC !important;
  --pico-primary-focus: rgba(15, 34, 246, 0.125) !important;
  --pico-primary-inverse: #FFF !important;
}

/* Force primary color on submit buttons and primary buttons (exclude button_to forms) */
input[type="submit"]:not(.button_to button),
button[type="submit"]:not(.button_to button),
button.primary,
[role="button"].primary {
  background-color: #0F22F6 !important;
  border-color: #0F22F6 !important;
}

input[type="submit"]:not(.button_to button):hover,
button[type="submit"]:not(.button_to button):hover,
button.primary:hover,
[role="button"].primary:hover {
  background-color: #0B1ACC !important;
  border-color: #0B1ACC !important;
}

input[type="submit"]:not(.button_to button):focus,
button[type="submit"]:not(.button_to button):focus,
button.primary:focus,
[role="button"].primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(15, 34, 246, 0.25) !important;
}

/* Flash messages styles */
.notice {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.error {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.warning {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.info {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Error details block */
.error-details {
  background-color: #fee;
  border: 2px solid #c33;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.error-details h4 {
  color: #c33;
  margin-top: 0;
  margin-bottom: 1rem;
}

.error-message {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.error-message strong {
  color: #c33;
}

.error-backtrace {
  margin-top: 1rem;
}

.error-backtrace summary {
  cursor: pointer;
  color: #666;
  font-size: 0.9rem;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
}

.error-backtrace summary:hover {
  background: #f5f5f5;
}

.error-backtrace pre {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 0.5rem;
}

/* Footer styles */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--pico-muted-border-color);
  text-align: center;
}

footer section p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: var(--pico-muted-color);
}

footer a {
  color: var(--pico-muted-color);
  text-decoration: none;
}

footer a:hover {
  color: var(--pico-primary);
  text-decoration: underline;
}

footer .logo {
  height: 50px;
  width: auto;
  margin-bottom: 0.5rem;
}

button.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Time entries list styles */
.time-entries-list {
  margin-top: 2rem;
}

.date-group {
  margin-bottom: 2rem;
}

.date-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pico-primary);
}

.entries-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.entry-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 6px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.entry-row:hover {
  background: var(--pico-card-sectioning-background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.entry-time {
  font-family: monospace;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--pico-color);
}

.entry-content {
  flex: 1;
  color: var(--pico-color);
}

.entry-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  font-size: 1.2rem;
}

.entry-actions a,
.entry-actions button {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.entry-actions a:hover,
.entry-actions button:hover {
  opacity: 1;
}

/* Fix for button_to forms in entry-actions */
.entry-actions form.button_to {
  display: inline;
  margin: 0;
  padding: 0;
}

.entry-actions form.button_to button {
  all: unset;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.entry-actions form.button_to button:hover {
  opacity: 1;
}

nav .logo {
  height: 40px;
  width: auto;
}

nav:has(.logo-center) {
  display: flex;
  justify-content: center;
  align-items: center;
}

nav .logo-center {
  height: 60px;
  width: auto;
}

/* Voice recognition button */
button[data-voice-recognition-target="button"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: inherit;
}

button[data-voice-recognition-target="button"] i {
  display: inline-block;
  font-style: normal;
}

/* Import button small */
.import-button-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Actions section */
.actions-section {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-card {
  margin-bottom: 0;
  border: 2px solid var(--pico-muted-border-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.action-card:hover {
  border-color: var(--pico-primary);
}

.ai-dictation-card {
  background: linear-gradient(135deg, var(--pico-card-background-color) 0%, var(--pico-card-sectioning-background-color) 100%);
  border-color: var(--pico-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-dictation-card header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.ai-dictation-card header h3 {
  margin-bottom: 0.25rem;
  color: var(--pico-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pico-muted-color);
}

.manual-entry-card {
  padding: 1rem;
}

.manual-entry-card details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--pico-color);
  transition: color 0.2s ease;
  margin: 0;
}

.manual-entry-card details summary::-webkit-details-marker {
  display: none;
}

.manual-entry-card details summary::before {
  content: "▶";
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.7rem;
  color: var(--pico-primary);
}

.manual-entry-card details[open] summary::before {
  transform: rotate(90deg);
}

.manual-entry-card details summary:hover {
  color: var(--pico-primary);
}

.manual-entry-card details[open] {
  margin-top: 0;
}

/* Manual entry form compact styling */
.manual-entry-card form fieldset.grid {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.manual-entry-card form input[type="datetime-local"] {
  width: auto;
  min-width: 180px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.manual-entry-card form input[type="text"] {
  flex: 1;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.manual-entry-card form input[type="submit"] {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  margin: 0;
  margin-top: -20px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .manual-entry-card form fieldset.grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .manual-entry-card form input[type="datetime-local"] {
    width: 100%;
    min-width: auto;
  }
}

/* ========================================
   LANDING PAGE STYLES
   ======================================== */

/* Containers */
.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Hero Section */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #0F22F6 0%, #5B63FF 100%);
  color: white;
  padding: 4rem 1rem;
  margin: -2rem -1rem 0;
}

.hero-content {
  max-width: 800px;
}

.hero-logo {
  height: 80px;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: white;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.6;
  color: white;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-primary-large,
.btn-secondary-large,
.btn-cta-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary-large {
  background: white;
  color: #0F22F6;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary-large {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-secondary-large:hover {
  background: white;
  color: #0F22F6;
}

.btn-cta-large {
  background: white;
  color: #0F22F6;
  font-size: 1.2rem;
  padding: 1.2rem 3rem;
}

.btn-cta-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-note {
  font-size: 0.95rem;
  opacity: 0.9;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  color: white;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--pico-color);
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--pico-muted-color);
  margin-bottom: 3rem;
}

/* Problems Section */
.problems-section {
  padding: 5rem 0;
  background: var(--pico-card-sectioning-background-color);
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.problem-card {
  padding: 2.5rem 2rem;
  background: var(--pico-card-background-color);
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.problem-card:hover {
  border-color: #0F22F6;
  box-shadow: 0 8px 20px rgba(15, 34, 246, 0.1);
  transform: translateY(-5px);
}

.problem-icon {
  font-size: 3rem;
  color: #0F22F6;
  margin-bottom: 1rem;
}

.problem-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--pico-color);
}

.problem-card p {
  color: var(--pico-muted-color);
  line-height: 1.6;
}

/* Solution Section */
.solution-section {
  padding: 5rem 0;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.solution-card {
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, #0F22F6 0%, #5B63FF 100%);
  color: white;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(15, 34, 246, 0.2);
}

.solution-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(15, 34, 246, 0.3);
}

.solution-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.solution-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: white;
  font-weight: 600;
}

.solution-card p {
  color: white;
  opacity: 0.9;
  line-height: 1.7;
  margin: 0;
}

/* Features Section */
.features-section {
  padding: 5rem 0;
  background: var(--pico-card-sectioning-background-color);
}

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
  padding: 3rem;
  background: var(--pico-card-background-color);
  border-radius: 16px;
  border: 1px solid var(--pico-muted-border-color);
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--pico-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-description {
  font-size: 1.1rem;
  color: var(--pico-muted-color);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  color: var(--pico-muted-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-list li::before {
  content: "✓";
  color: #0F22F6;
  font-weight: bold;
  font-size: 1.2rem;
}

/* How Section */
.how-section {
  padding: 5rem 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.step-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--pico-card-background-color);
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.step-card:hover {
  border-color: #0F22F6;
  transform: translateY(-5px);
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0F22F6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0 auto 1.5rem;
}

.step-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--pico-color);
}

.step-card p {
  color: var(--pico-muted-color);
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  padding: 5rem 1rem;
  background: linear-gradient(135deg, #0F22F6 0%, #5B63FF 100%);
  color: white;
  text-align: center;
  margin: 0 -1rem;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.cta-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  color: white;
}

.cta-note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
  color: white;
}

/* Trust Section */
.trust-section {
  padding: 4rem 0;
}

.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-item {
  padding: 1.5rem;
}

.trust-icon {
  font-size: 2.5rem;
  color: #0F22F6;
  margin-bottom: 1rem;
}

.trust-item strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--pico-color);
}

.trust-item p {
  color: var(--pico-muted-color);
  font-size: 0.9rem;
  margin: 0;
}

/* Landing Footer */
.landing-footer {
  background: var(--pico-card-sectioning-background-color);
  padding: 3rem 0 2rem;
  margin: 0 -1rem -2rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

.footer-content {
  text-align: center;
}

.footer-logo {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 1.1rem;
  color: var(--pico-muted-color);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #0F22F6;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.footer-links span {
  color: var(--pico-muted-color);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  line-height: 1.6;
  margin: 0;
}

.footer-copyright a {
  color: var(--pico-muted-color);
  text-decoration: none;
}

.footer-copyright a:hover {
  color: #0F22F6;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Time entries responsive layout */
  .entry-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    align-items: flex-start;
  }

  .entry-time {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
    order: 1;
  }

  .entry-content {
    font-size: 1rem;
    line-height: 1.5;
    order: 2;
    word-wrap: break-word;
    width: 100%;
  }

  .entry-actions {
    order: 3;
    justify-content: flex-end;
    align-self: flex-end;
    margin-top: 0.5rem;
    gap: 0.75rem;
  }

  .entry-actions a,
  .entry-actions button,
  .entry-actions form.button_to button {
    font-size: 1.4rem !important;
    padding: 0.5rem !important;
  }

  /* Landing page responsive */
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary-large,
  .btn-secondary-large {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .feature-block {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
    gap: 2rem;
  }

  .feature-right {
    grid-template-areas: "content" "image";
  }

  .feature-right .feature-content {
    grid-area: content;
  }

  .feature-right .feature-image {
    grid-area: image;
  }

  .problems-grid,
  .solution-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .cta-title {
    font-size: 1.8rem;
  }

  .cta-subtitle {
    font-size: 1rem;
  }
}