/* Static CSS file: static/css/style.css */

/* Account for the fixed top navbar */
body {
  padding-top: 70px;
  /* Adjust if your navbar height changes */
  padding-bottom: 20px;
  /* Add some space at the bottom */
  background-color: #f8f9fa;
  /* Light grey background */
}

/* --- START: Guest Upload Page Overrides --- */
/* Reduce top padding/margin only on the guest upload page */
body.guest-upload-page {
  padding-top: 2.6rem !important;
  /* Adjust value as needed */
}

body.guest-upload-page main.container {
  margin-top: 0 !important;
}

/* --- END: Guest Upload Page Overrides --- */


/* QR Code Styling */
.qr-code svg {
  display: block;
  /* Prevent extra space below */
  max-width: 250px;
  /* Limit max size */
  height: auto;
  /* Maintain aspect ratio */
  border: 1px solid #dee2e6;
  /* Light border */
  padding: 10px;
  /* Spacing inside border */
  background-color: white;
  /* Ensure white background for readability */
  margin-bottom: 1rem;
  /* Spacing below QR code */
}

.qr-code img {
  max-width: 250px;
  height: auto;
  border: 1px solid #dee2e6;
  /* Use Bootstrap's border color */
  padding: 10px;
  background-color: white;
  display: inline-block;
  /* Or block */
}


/* Styling for thumbnails within cards */
.thumbnail-container .card .card-img-top,
.thumbnail-container .card video {
  height: 180px;
  /* Slightly larger fixed height for thumbnails */
  object-fit: cover;
  /* Scale the image/video nicely */
  background-color: #e9ecef;
  /* Placeholder color while loading */
}

/* Style for placeholder when image/video fails to load */
.card-img-top-error {
  height: 180px;
  /* Match thumbnail height */
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc3545;
  /* Danger color */
  font-size: 0.9rem;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
}

/* Adjust line height for card text */
.card-text small {
  line-height: 1.4;
}

/* Ensure code blocks are selectable */
code.user-select-all {
  user-select: all;
}

/* Footer styling */
footer {
  font-size: 0.9em;
}

/* Add some visual separation for forms */
form {
  margin-top: 1rem;
}

/* Center align form pages */
.form-signin,
.form-register,
.form-create-event,
.form-guest-upload,
.form-edit-event {
  max-width: 400px;
  /* Limit width on larger screens */
  padding: 1rem;
  margin: auto;
  /* Center horizontally */
}

/* Optional: Style required field indicators */
/* Example: Add a class 'required' to the label in your form macro */
/*
label.required::after {
  content: " *";
  color: red;
}
*/

/* --- Custom Yellow Button Style --- */
.btn-custom-yellow {
  background-color: #EFBF04;
  border-color: #EFBF04;
  /* Choose text color for contrast - dark usually works well on yellow */
  color: #212529;
}

/* Style for hover, focus, and active states */
.btn-custom-yellow:hover,
.btn-custom-yellow:focus,
.btn-custom-yellow.focus,
/* Bootstrap 5 focus class */
.btn-custom-yellow:active,
.btn-custom-yellow.active {
  /* Bootstrap 5 active class */
  background-color: #d9ab04;
  /* Slightly darker yellow */
  border-color: #c89d03;
  /* Slightly darker border */
  color: #212529;
  /* Keep text color dark */
  /* Optional: Add a subtle focus ring with the custom color */
  box-shadow: 0 0 0 0.25rem rgba(239, 191, 4, 0.5);
}

/* --- End Custom Yellow Button Style --- */

/* --- Custom Link Styling --- */
.footer-link,
.footer-link:visited {
  /* Apply to normal and visited links */
  color: inherit;
  /* Make link color same as surrounding text */
  text-decoration: none;
  /* Remove underline */
  transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
  /* Smooth transition for hover */
}

.footer-link:hover,
.footer-link:focus {
  text-decoration: underline;
  /* Add underline when hovering or focusing */
}

/* --- End Custom Link Styling --- */

/* --- START: Upload Progress Bar Styles --- */
#upload-progress-container {
  margin-top: 1rem;
  margin-bottom: 1rem;
  height: 25px;
  /* Make bar slightly taller */
}

#upload-progress-bar {
  /* Ensure text color is readable on yellow/green/red */
  color: #212529;
  /* Dark text color */
  font-weight: 500;
  /* Slightly bolder text */
  font-size: 0.9rem;
  line-height: 25px;
  /* Vertically center text */
  /* Add transition for smoother width changes */
  transition: width 0.2s ease-out;
}

/* --- END: Upload Progress Bar Styles --- */

.btn-toolbar .btn,
.btn-toolbar form .btn {
  min-width: 120px;
  height: 38px;
  padding: 0.375rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Remove form's default margins that might affect alignment */
.btn-toolbar form,
.btn-toolbar .btn-group {
  margin: 0;
  padding: 0;
}

/* Make form display properly in button groups */
.btn-toolbar form.d-inline-block {
  display: inline-flex !important;
  align-items: stretch;
}

/* --- Language Switcher --- */
.language-switcher {
  position: absolute; /* Position relative to nearest positioned ancestor (body or a wrapper) */
  top: 10px;          /* Adjust as needed */
  right: 15px;         /* Adjust as needed */
  z-index: 1050;       /* Ensure it's above most content */
  display: flex;
  gap: 8px;          /* Space between flags */
}

.language-switcher img {
  width: 28px;         /* Adjust size */
  height: auto;
  cursor: pointer;
  border-radius: 3px;  /* Slightly rounded corners */
  border: 1px solid transparent; /* Placeholder for active border */
  opacity: 0.7;        /* Dim inactive flags slightly */
  transition: opacity 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.language-switcher img:hover {
  opacity: 1;
}

.language-switcher img.active-lang {
  opacity: 1;
  border: 1px solid #d9ab04; /* Bootstrap secondary color */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}
/* --- End Language Switcher --- */

/* Ensure body has relative positioning if needed for absolute switcher */
body.guest-upload-page,
body.album-closed-page { /* Added album-closed-page identifier */
  position: relative; /* Make body the positioning context */
  padding-top: 50px; /* Add more top padding to avoid overlap */
}