/* Base Styles */
:root {
  --primary-color: #ffbf00;
  --text-color: #2c2c2c;
  --bg-color: #fff9f5;
  --container-width: 768px; /* Max width for tablet view */
}

/* Base styles - Mobile First */
body {
  color: var(--text-color);
  background-color: var(--color-background-dark);
  font-size: 16px;
  font-family: "Rubik", sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  /* padding: 0.5rem; */
  z-index: 10000;
  width: 100%;
}

main {
  background-color: #e8c4ac;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto; /* This makes main take up all available space */
}

footer {
  padding-top: 20px;
  background: #e8c4ac;
  width: 100%;
  flex-shrink: 0; /* Prevents the footer from shrinking */
}

/* Tablet and larger screens (Desktop will have same layout as tablet with empty space) */
@media (min-width: 768px) {
  header,
  main,
  footer {
    /* max-width: var(--container-width); */
    /* margin-left: auto;
    margin-right: auto; */
  }

  main {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
  }

  footer {
    padding: 0;
    padding-top: 20px;
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

.display-4 {
  font-size: 1rem;
}

.display-5 {
  font-size: 2rem;
  font-weight: 400;
}

.display-h4 {
  font-size: 1.2rem;
}

.lead {
  font-size: 1.2rem;
}

/****************************/
/* Button Styles            */
/****************************/

.btn {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
}

.btn-primary {
  background-color: #d89735;
  color: #fff;
  border-color: #d89735;
  width: 100%;
}

.btn-outline-disabled {
  border-color: #ddd;
  width: 100%;
}

.btn-small {
  padding: 4px 6px;
  font-size: 12px;
  color: #666;
  border: none;
  background: white;
  box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.3);
}

.shadow-ft {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/****************************/
/* Header Styles            */
/****************************/

.header-container {
  padding: 12px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #d897351a;
}

.logo-image {
  height: 24px;
  width: auto;
}

.logo {
  height: 40px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  color: var(--primary-color);
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  /* left: 0; */
  right: 0;
  background: white;
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  align-items: stretch;
  font-size: 1rem;
  width: 100%;
}

.main-nav.active {
  display: flex;
}

.main-nav-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
  border-top: 1px solid #ddd;
}

.main-nav-menu-item:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

@media (min-width: 768px) {
  .main-nav {
    width: 50%;
  }
}
/****************************/
/* Feature Header Container */
/****************************/
.feature-header-nav {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin-bottom: 2rem;
}

.back-button {
  color: var(--text-color, #333);
  margin-right: 1rem;
  transition: background-color 0.2s;
  margin-top: -60px;
}

.back-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.arrow {
  font-size: 2rem;
  transform: rotate(180deg);
  font-weight: 300;
  margin-right: 2rem;
  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);
}

.image-container img {
  width: 100px;
  height: 100px;
  border-radius: 5px;
  object-fit: cover;
}

.text-content {
  margin-left: 15px;
}

.text-content h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text-color);
}

.text-content p {
  text-transform: uppercase;
  font-size: 1rem;
  color: #999;
  margin-bottom: 0.25rem;
}

.add-feature-content-button {
  margin: 2rem 0;
}

/* END Feature Header Container */

/* Footer Styles */

.footer-container {
  /* max-width: 900px; */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-section {
  margin-bottom: 12px;
  padding-left: 20px;
  height: 30px;
}

.footer-logo {
  margin-bottom: 8px;
  padding-left: 20px;
}

.footer-links {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  list-style: none;
  padding-block: 6px;
  padding-inline: 0;
  margin: 0;
}

.footer-link {
  color: #4f3828;
  font-size: 14px;
  line-height: 100%;
  font-weight: 500;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.ft-link {
  color: #4f3828;
  font-size: 14px;
  line-height: 100%;
  font-weight: 500;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  background-color: #00000010;
}

.footer-bottom p {
  font-size: 12px;
  line-height: 100%;
  font-weight: 400;
  color: #4f3828;
  margin-bottom: 0;
}

.footer-bottom-links {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  list-style: none;
  padding-inline: 0;
  margin: 0;
  height: 12px;
}

.footer-bottom-link {
  color: #4f3828;
  font-size: 12px;
  line-height: 100%;
  font-weight: 400;
  text-decoration: none;
}

.footer-bottom-link:hover {
  text-decoration: underline;
}

/* end Footer Styles */

/* Main Content */

.checkbox-group {
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.form-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-checkbox:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-group .help-text {
  margin-left: 1.75rem;
  margin-top: 0.25rem;
}

/**********************/
/* Dashboard Styles   */
/**********************/
/* Tribute Card Container */

.dashboard-opening-quote {
  font-family: "Rubik", serif;
  font-size: 1rem;
  font-style: italic;
  color: #333;
  text-align: center;
  margin-left: 1rem;
  margin-right: 1rem;
}

.dashboard-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin: 0 1rem;
}
.dashboard-container a {
  text-decoration: none;
  color: var(--text-color);
}

/* Individual Tribute Card */
.tribute-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tribute-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tribute-card-image {
  position: relative;
}

.tribute-card-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.placeholder-image {
  width: 100%;
  height: 300px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-image::before {
  content: "📷";
  font-size: 2rem;
  margin-right: 8px;
}

.placeholder-text {
  color: #999;
  font-size: 0.9rem;
}

.tribute-card:hover .tribute-card-image img {
  transform: scale(1.05);
}

/* Tribute Information */
.tribute-card-info {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.tribute-card-name {
  margin: 0 0 8px 0;
  font-size: 2rem;
}

.tribute-card-name a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tribute-card-name a:hover {
  color: #4f46e5;
}

.tribute-card-dates {
  color: #6b7280;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Optional Badge for Status */
.tribute-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
}

.status-private {
  background-color: rgba(239, 68, 68, 0.9);
  color: white;
}

.private-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(229, 0, 0, 0.5);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 6;
}

.private-badge i {
  font-size: 0.8rem;
}

/* Optional Tribute Meta Information */
.tribute-card-meta {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #6b7280;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-item i {
  font-size: 1rem;
}

.tribute-card {
  margin-top: 1rem;
  animation: fadeIn 0.3s ease-out;
  animation-fill-mode: both;
}

/* Stagger the animation for multiple cards */
.tribute-card:nth-child(1) {
  animation-delay: 0.1s;
}
.tribute-card:nth-child(2) {
  animation-delay: 0.2s;
}
.tribute-card:nth-child(3) {
  animation-delay: 0.3s;
}
.tribute-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* End Dashboard Styles */
/**********************/

/**********************/
/* FIXME Tribute Detail Navigation */
/**********************/

.tribute-detail-navigation {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 0;
  margin: 2rem 0;
}

.tribute-detail-navigation .tribute-detail-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tribute-detail-navigation .tribute-detail-nav-item i {
  font-size: 1rem;
}

/* FIXME */
img.tribute-memory-image {
  width: 100%;
  object-fit: contain;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .tribute-detail-navigation {
    gap: 1rem;
    padding: 1rem 0;
  }

  .tribute-detail-navigation .tribute-detail-nav-item {
    flex-direction: row;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
  }

  .tribute-detail-navigation .tribute-detail-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
  }
}

.card-title {
  font-size: 1.2rem;
  font-weight: 400;
}

.btn-add,
.btn-more {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-color);
}

.help-icon {
  font-size: 1rem;
  color: #344dc7;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.help-icon:hover {
  color: #fd0d7d;
}

.tribute-section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #f6e7dd;
}

.modal-header {
  justify-content: space-between;
  padding: 0.5rem 1rem;
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}
.modal-body {
  font-size: 1rem;
  line-height: 1.5;
}

/* Dropdown Styles */
.dropdown-toggle::after {
  display: none; /* Hide the default caret */
}

.dropdown-menu {
  min-width: 120px;
  padding: 0.5rem 0;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background-color: var(--bg-color);
}

.dropdown-item.text-danger:hover {
  background-color: #fff5f5;
}

.delete-confirmation-section {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.delete-confirmation-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #f3efe4;
  padding-bottom: 0.5rem;
}

.delete-confirmation-section p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.delete-confirmation-section h4 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Profile Styles */
.profile-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-image-container {
  position: relative;
  display: inline-block;
}

.profile-image-preview img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* End Profile Styles */

.tribute-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  background-color: #f0f0f0;
}

.tribute-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #aaa;
}

/* Loading Overlay Styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(205, 155, 74, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color, #cd9b4a);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

.spinner-container p {
  color: #333;
  font-weight: 500;
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal Styles */
.modal {
  background: rgba(0, 0, 0, 0.7);
}
.modal.show .modal-dialog {
  transform: none;
  margin: auto;
}
.modal-dialog {
  max-width: 90vw;
  margin: 0.5rem;
}

.modal-body {
  padding: 0;
  text-align: center;
}

.modal-body img {
  max-height: 80vh;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .modal-dialog {
    margin: 1.75rem auto;
  }
}
/* End Modal Styles */

/* Pending Notifications */
.pending-notifications {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 1000;
}

.comment-notifications {
  bottom: 20px;
}

.activity-notifications {
  bottom: 70px;
}

.notification-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #007bff;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.notification-link:hover {
  transform: scale(1.1);
}

.badge-ft {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
}

@media (min-width: 768px) {
  .pending-notifications {
    bottom: 20px;
    right: 20px;
  }

  .activity-notifications {
    bottom: 80px;
  }
}

.empty-state {
  text-align: center;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}
.empty-state .empty-icon {
  font-size: 4rem;
  color: #6c757d;
}
.empty-state h3 {
  margin-top: 1rem;
}

/****************************
TOAST
****************************/
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  animation: slideIn 0.3s ease-out forwards;
  justify-content: space-between;
  max-width: 300px;
}

.toast.success {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  color: #155724;
}

.toast.error {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.toast.info {
  background-color: #d1ecf1;
  border-left: 4px solid #17a2b8;
  color: #0c5460;
}

.toast-close {
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
  color: #aaa;
}

.toast-content {
  flex: 1;
}

/* Animation Classes */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
/* Optional Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shared styles for image grids used in Memories, Timeline, etc. */
.shared-image-grid {
  display: grid;
  gap: 5px; /* Adjust gap as needed */
  margin-top: 10px;
  justify-content: center; /* Center items if fewer than columns */
  align-items: center; /* Vertically align items */
}

/* Default to single column for grid-1 or unspecified */
.shared-image-grid.grid-1,
.shared-image-grid:not([class*=" grid-"]) {
  grid-template-columns: 1fr;
  max-width: 50%; /* Limit width for single images */
  /* margin-left: auto;
    margin-right: auto; */
}

.shared-image-grid.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.shared-image-grid.grid-3 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  max-height: 200px;
}

/* First image spans 2 rows in grid-3 */
.shared-image-grid.grid-3 > *:first-child {
  grid-row: span 2;
  max-height: 200px;
}

.shared-image-grid.grid-3 > *:first-child .grid-image {
  height: 200px;
}

/* Images in grid-3 should fit within the 150px max-height */
.shared-image-grid.grid-3 .grid-image {
  height: 100px;
}

.shared-image-grid.grid-4 {
  grid-template-columns: repeat(2, 1fr); /* 4 images in a 2x2 grid */
}

.grid-image {
  width: 100%;
  /* Maintain aspect ratio, fit within container */
  height: 150px; /* Adjust fixed height or use aspect-ratio */
  object-fit: cover; /* Cover ensures the box is filled, Contain shows whole image */
  border-radius: 4px; /* Optional rounding */
  cursor: pointer;
  transition: opacity 0.2s;
  display: block; /* Prevent extra space below image */
}

.grid-image:hover {
  opacity: 0.9;
}

/* Style for the link wrapping the image (optional, can inherit) */
.shared-image-grid a {
  display: block; /* Ensures link takes up grid cell space */
  line-height: 0; /* Removes potential extra space under image */
}

.flex-auto-height {
  flex: 1;
}

.container {
  background-color: #fff3eb;
  padding: 20px;
  border-radius: 16px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding-top: 40px;
  margin: 0;
}

.heading {
  font-family: "Fjalla One", sans-serif;
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
}

.paragraph {
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: #413a30;
  text-align: center;
}

.about-us-section {
  margin-bottom: 24px;
  margin-top: 24px;
}

.about-us-title {
  font-family: "Fjalla One", sans-serif;
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
}

.about-us-description {
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: #413a30;
  text-align: center;
}
