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

/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f8f9fa;
  color: #333;
}

.today-app {
  max-width: 1000px;
  margin: 0 auto;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 30px;
}

.app-header h1 {
  color: #2c3e50;
  margin-bottom: 5px;
  font-style: italic;
  text-transform: uppercase;

  a {
    color: blue;
    /* text-decoration: none; */
  }
}

.subtitle {
  color: #7f8c8d;
  margin: 0;
}

/* Main form section */
.main-form {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.date-selector {
  margin-bottom: 20px;
  text-align: center;
}

.date-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.date-selector input[type="date"] {
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  font-size: 14px;
}

.day-form {
  position: relative;
}

.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.form-group textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  resize: none;
  box-sizing: border-box;
  overflow: hidden;
}

.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

/* Save status */
.save-status {
  position: absolute;
  top: -30px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.save-status.saving {
  background-color: #f39c12;
  color: white;
}

.save-status.success {
  background-color: #27ae60;
  color: white;
}

.save-status.error {
  background-color: #e74c3c;
  color: white;
}

/* Date loading status */
.date-loading-status {
  position: absolute;
  top: -30px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: none;
}

.date-loading-status.loading {
  background-color: #3498db;
  color: white;
}

.date-loading-status.error {
  background-color: #e74c3c;
  color: white;
}

/* Recent days section */
.recent-days h2 {
  color: #2c3e50;
  margin-bottom: 20px;
}

.days-list {
  display: grid;
  gap: 20px;
}

.day-entry {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);

  .done-section {
    color: darkgreen;
  }
  .up-next-section {
    color: #555;
  }
}

.day-entry.today {
  border-left: 4px solid #3498db;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #ecf0f1;
  padding-bottom: 10px;
}

.day-header h3 {
  margin: 0;
  color: blue;

  a {
    color: inherit;
    /* text-decoration: none; */
  }
}

.day-label {
  background-color: #ecf0f1;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #7f8c8d;
}

.day-content-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.done-section, .up-next-section {
  margin-bottom: 15px;
}

.done-section h4, .up-next-section h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.done-section p, .up-next-section p {
  margin: 0;
  line-height: 1.5;
}

.empty-day {
  color: #bdc3c7;
  font-style: italic;
  margin: 0;
}

.empty-section {
  color: #bdc3c7;
  font-style: italic;
  margin: 0;
  font-size: 14px;
}

header {
  text-align: center;
  margin-bottom: 10px;

  a.logo img {
    width: 60px;
  }
}

/* Responsive design */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .main-form {
    padding: 15px;
  }

  .day-entry {
    padding: 15px;
  }

  .day-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .form-columns {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .day-content-columns {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Login form styles */
.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 25px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-container h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 25px;
  font-style: italic;
  text-transform: uppercase;
}

.login-container .field {
  margin-bottom: 20px;
}

.login-container .field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.login-container .field input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.login-container .field input:focus {
  outline: none;
  border-color: #3498db;
}

.login-container .actions {
  text-align: center;
  margin-top: 25px;
}

.login-container .actions input[type="submit"] {
  background-color: #3498db;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-container .actions input[type="submit"]:hover {
  background-color: #2980b9;
}

.login-container .alert {
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 14px;
}

.login-container .alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
