/* static/css/styles.css */
body {
  font-family: "Roboto", sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
  height: 100vh;
}

h1 {
  color: #333;
  text-align: center;
  margin: 0;
  margin-bottom: 15px;
  padding: 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  padding: 10px 20px;
  color: white;
  min-height: 40px;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
}

.logo a {
  text-decoration: none;
  color: white;
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.hamburger-menu .bar {
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
}

/* Sidebar styles */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  background-color: #333;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidebar a {
  padding: 10px 15px;
  text-decoration: none;
  font-size: 25px;
  color: white;
  display: block;
  transition: 0.3s;
}

.sidebar a:hover {
  background-color: #575757;
}

.sidebar .closebtn {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 36px;
}

.sidebar .info {
  padding: 10px 15px;
  font-size: 16px;
  color: white;
  display: block;
}

#main {
  transition: margin-left 0.5s;
  padding: 20px;
  max-width: 1278px;
  margin: 25px auto;
  box-sizing: border-box;
}

/* Filters styles */
.filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.filters input {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 200px;
}

/* Image gallery styles */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.image-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 200px;
  text-align: center;
  position: relative;
}

.image-card img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: cover;
}

.image-info {
  padding: 15px;
}

.image-info h2 {
  margin: 0;
  font-size: 1.2em;
  color: #333;
}

.image-info h2 a {
  text-decoration: underline;
  font-size: 1.2em;
  color: navy;
  font-weight: normal;
}

.image-info p {
  margin: 5px 0;
  color: #666;
}

.delete-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px;
  font-size: 22px;
  color: darkblue;
  cursor: pointer;
  background-color: azure;
  border-radius: 50%;
  text-align: center;
  width: 25px;
  height: 25px;
  border: 1px solid grey;
}
.delete-icon:hover {
  color: red;
}

/* Pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.pagination-button {
  padding: 10px 20px;
  font-size: 16px;
  color: white;
  background-color: #6200ea;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin: 0 5px;
  transition: background-color 0.3s ease;
}

.pagination-button:hover {
  background-color: #3700b3;
}

.pagination-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.upload-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-container {
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 300px;
  width: 100%;
  margin: auto;
  margin-top: 10%;
}

.login-form {
  display: flex;
  flex-direction: column;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: #6200ea;
  outline: none;
}

.file-label {
  display: inline-block;
  padding: 13px 20px;
  font-size: 16px;
  color: #fff !important;
  background-color: #6200ea;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
  width: 100px;
}

.file-label:hover {
  background-color: #3700b3;
}

.file-name {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  color: #fff;
  background-color: #6200ea;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  background-color: #3700b3;
}

#snackbar {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #3700b3;
  color: #fff;
  text-align: center;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  font-size: 17px;
}

#snackbar.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}

/* Loader CSS */
.loader {
  border: 8px solid rgba(0, 0, 0, 0.1);
  border-left-color: #6200ea;
  border-radius: 50%;
  width: 140px;
  height: 140px;
  animation: spin 1s linear infinite;
  position: fixed;
  top: 50%;
  left: calc(50% - 70px);
  transform: translate(-50%, -50%);
  display: none;
  z-index: 1000;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Footer */
#footer {
  background-color: #333;
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

#footer p {
  margin: 0;
  font-size: 14px;
}

#footer p a {
  color: white;
  text-decoration: none;
  font-weight: bolder;
}

/* Stili per il blocco dei filtri */
.filters {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 10px;
}

.filters input {
  width: 28%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

.filters input:focus {
  border-color: #6200ea;
  outline: none;
}


/* Stile per il contenitore del menu a tendina */
.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select select {
    appearance: none; /* Rimuove lo stile predefinito del browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    color: #333;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Aggiunge un'ombra e cambia il colore del bordo al passaggio del mouse */
.custom-select select:hover {
    border-color: #6200ea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cambia il colore del bordo quando il menu è attivo */
.custom-select select:focus {
    outline: none;
    border-color: #6200ea;
    box-shadow: 0 2px 6px rgba(98, 0, 234, 0.3);
}

/* Aggiunge una freccia personalizzata */
.custom-select::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #333;
    font-size: 12px;
}


/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  .filters {
    flex-direction: column;
  }

  .filters input {
    width: 100%;
    margin-bottom: 10px;
  }

  #main {
    padding: 15px;
  }

  .navbar {
    padding: 10px;
  }

  #footer {
    padding: 15px;
  }

  #footer p {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .filters input {
    font-size: 14px;
    padding: 8px;
  }

  #main {
    padding: 10px;
  }

  .navbar {
    padding: 8px;
  }

  #footer {
    padding: 10px;
  }

  #footer p {
    font-size: 10px;
  }
}
