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

/* property stuff */
/* -------------------------------- */
* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  padding: 0 12px;
  min-height: 100vh;
}

a {
  color: #b92e2e;
}

main {
  max-width: max-content;
  margin: 0 auto;
}

.filters-form {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 8px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-field.stretch {
  flex: 1;
  padding-right: 6px;
}

.filter-field.stretch > .filter-input {
  width: 100%;
}

.filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
}

.filter-input,
.filter-select {
  padding: 2px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  color: #212529;
}

.filter-input {
  width: 100px;
}

.filter-input.thin {
  width: 60px;
}

.filter-actions {
  display: flex;
  gap: 4px;
  place-items: end;
  
  button, a {
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    min-width: 60px;
  }
}

.filter-submit {
  background: #fd250d;
  color: #fff;
}

.filter-submit:hover {
  background: #d71f0b;
}

.filter-clear {
  color: #6c757d;
  background: #ced4da;
}

.filter-clear:hover {
  background: #adb5bd;
}

.listings-table {
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.listings-table th {
  background: #f8f9fa;
  padding: 12px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.listings-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #f1f3f4;
  color: #212529;
  font-size: 14px;
}

.listings-table tbody tr:hover {
  background-color: #f8f9fa;
  transition: background-color 0.2s ease;
}

.listings-table tbody tr:last-child td {
  border-bottom: none;
}

.listings-table td.hoverable {
  text-decoration: underline;
  cursor: pointer;
  color: #000;
  font-weight: 600;
}

.listings-table td.favorite,
.listings-table td.hidden,
.listings-table td.notes {
  text-align: center;
  font-size: 18px;

  
  a {
    text-decoration: none;
    color: #212529;

    &:hover {
      filter: brightness(1.2);
      color: #727a84;
    }
  }
}

@media (min-width: 1536px) {
  .listings-table td.favorite,
  .listings-table td.hidden,
  .listings-table td.notes {
    font-size: 24px;
  }
}

.listings-table td.favorite.selected,
.listings-table td.hidden.selected,
.listings-table td.notes.selected {
  font-size: 14px;
}

.listings-table td.emphasized {
  font-weight: 600;
  color: #450404;
}

.listings-table td.deemphasized {
  text-decoration: line-through;
  color: #6c757d;
}

.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-outer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 8px;
  padding: 16px;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.modal-close:hover {
  cursor: pointer;
  background: #d4dbde;
}

.modal-close-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.modal-close-icon {
  width: 24px;
}

.modal-close .sr-only {
  display: none;
}

.notes-content {
  margin-bottom: 8px;
}

.notes-content textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.notes-button input {
  background: #fd250d;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.notes-button input:hover {
  background: #d71f0b;
}
/* -------------------------------- */

/* health tracking stuff */
/* -------------------------------- */
.tracking-title {
  a {
    text-decoration: none;
    color: #1e82d3;
  }

  a:hover {
    text-decoration: underline;
    color: #3c9be8;
  }
}

.tracking-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
  max-width: 800px;
}

.tracking-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 24px 32px;
  background: #1e82d3;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tracking-button:hover {
  background: #3c9be8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tracking-button:active {
  transform: translateY(0);
}

.button-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.button-label {
  flex: 1;
  padding-left: 24px;
}

.tracking-item {
  text-decoration: none;
  color: #000;
  font-size: 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #c4d9e4;

  .tracked-at {
    font-weight: 600;
    min-width: 100px;
  }
}

.tracking-actions {
  display: flex;
  gap: 6px;
  font-size: 18px;
  margin-top: 24px;
}

.tracking-actions .spacer {
  flex: 1;
}

.tracking-actions a {
  text-decoration: none;
  color: #1e82d3;
}

.tracking-actions a:hover {
  text-decoration: underline;
  color: #3c9be8;
}

.tracking-item-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 18px;

  .tracked-at, .field {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;

    label {
      min-width: 120px;
    }

    input, select {
      flex: 1;
      padding: 6px 12px;
      font-size: 18px;
    }

    &:has(select) input[type="number"] {
      flex: 0 0 auto;
      width: 100px;
    }
  }
  
  .tracked-at input {
    width: 100%;
  }

  .submit{
    margin: 12px 0;
    
    input {
      width: 100%;
      font-size: 18px;
      text-align: center;
      padding: 18px 24px;
      background-color: #1e82d3;
      color: #fff;
      border: none;

    }
  }
}

.tracking-notification {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  cursor: pointer;
  
  summary {
    margin: 0;
    background-color: #f4faff;
    color: #1e82d3;
    text-align: center;
    padding: 18px 4px;
    font-weight: 600;
    font-size: 18px;
    list-style: none;
  }

  summary::-webkit-details-marker {
    display: none;
  }
}

.tracking-notification[open] {
  display: block;
}

.tracking-notification:not([open]) {
  display: none;
}

/* carousel */
/* -------------------------------- */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.3s ease-in-out;
  width: 200%;
}

.carousel-container.show-form .carousel-wrapper {
  transform: translateX(0);
}

.carousel-container.show-chart .carousel-wrapper {
  transform: translateX(-50%);
}

.carousel-slide {
  width: 50%;
  flex-shrink: 0;
}

.carousel-toggle {
  margin-top: 12px;
  color: #1e82d3;
  cursor: pointer;
  font-size: 18px;
  border: none;
  background: none;
}

.carousel-toggle:hover {
  text-decoration: underline;
  color: #3c9be8;
}

.cuteness {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 100px);
  font-size: 48px;
  font-weight: 600;
  color: #1e82d3;
}

/* -------------------------------- */
