/* Base */
:root {
  --color-start: #ff1307;
  --color-end: #ff9500;
  --gradient: linear-gradient(45deg, var(--color-start), var(--color-end));
  --text-muted: #6c757d;
  --mobile-bottom-nav-height: 70px;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.page-header {
  margin-top: 1rem;
}

.mobile-header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.mobile-header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.mobile-bottom-nav {
  display: none;
}

/* Form controls */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Elements */
.default-journal-symbol {
  color: #FFE100
}

/* Hover reveal actions */
.hover-container .hover-reveal {
  visibility: hidden;
}
.hover-container:hover .hover-reveal {
  visibility: visible;
}

/* Footer */
footer.footer {
  line-height: normal !important;
}

footer.footer a:hover {
  text-decoration: underline !important;
}

/* Tag input (shared component) */
.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background-color: #fff;
  cursor: text;
  min-height: calc(1.5em + 0.75rem + 2px);
}

.tag-input-wrapper:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, .25);
  outline: 0;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.875rem;
  line-height: 1;
  border: 2px solid;
  background-color: #f8f9fa;
  color: #212529;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tag-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tag-item .remove-tag {
  margin-left: 4px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.5;
  font-weight: bold;
}

.tag-item.no-hover:hover {
  transform: none;
  box-shadow: none;
}

.tag-item .remove-tag:hover {
  transform: translateY(-1px);
  opacity: 0.7;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

@media (max-width: 767px) {
  .hover-container .hover-reveal {
    visibility: visible;
  }

  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom-nav-height);
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1030;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
  }

  .mobile-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
  }

  .mobile-nav-item.active {
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }

  .mobile-nav-item.dropdown .dropdown-toggle {
    text-decoration: none;
    background: none;
    color: var(--text-muted);
    display: flex;
    gap: 2px;
  }
  .mobile-nav-item.dropdown .dropdown-toggle::after {
    display: none;
  }
  .mobile-nav-item.dropdown .dropdown-menu {
    bottom: 100%;
    top: auto;
    margin-bottom: 8px;
  }
  .mobile-nav-item.dropdown.active .dropdown-toggle {
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }

  body:not(.no-mobile-nav) {
    padding-bottom: var(--mobile-bottom-nav-height);
    margin-bottom: 0;
  }

  footer.footer:not(.no-mobile-nav) {
    margin-bottom: calc(var(--mobile-bottom-nav-height) + 10px);
  }
}
