﻿/* Transizioni per il cambio tema */
body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Disabilita temporaneamente le transizioni al caricamento */
.no-transition, .no-transition * {
  transition: none !important;
}

/* Stili base */
body {
  padding-top: 70px;
}

.main-title {
  text-align: center;
  font-size: 70px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.sub-title {
  text-align: center;
  font-size: 30px;
  margin-bottom: 20px;
}

.logo-digisoft {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 60px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.5s ease;
}

.note-legali {
  display: block;
  margin-top: 60px;
  font-size: 20px;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.note-legali:hover {
  color: inherit;
  text-decoration: none;
}

/* Ombreggiatura specifica per la modalità dark */
.dark-mode .logo-digisoft {
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* Navbar deve restare scura in entrambe le modalità */
.navbar.bg-dark {
  background-color: #212529 !important;
  border-color: rgba(255, 255, 255, 0.1);
}

  .navbar.bg-dark .navbar-brand,
  .navbar.bg-dark .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
  }

    .navbar.bg-dark .nav-link:hover {
      color: #ffffff !important;
      transition: none !important; /* Disabilita la transizione per l'hover del menu */
    }

/* Selettore tema nella navbar - sempre visibile */
.theme-selector .form-check-label {
  color: rgba(255, 255, 255, 0.85) !important;
  transition: color 0.5s ease;
}

/* Stili per margine superiore navbar */
.below-navbar-margin {
  margin-top: 70px;
}

/* Stili generali modalità dark */
.dark-mode {
  --bs-body-bg: #343a40;
  --bs-body-color: #ffffff;
  background-color: #343a40;
  color: #ffffff;
  transition: background-color 0.5s ease, color 0.5s ease;
}

  /* Form controls in modalità dark */
  .dark-mode .form-control {
    color: #ffffff;
    background-color: #495057;
    border-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
  }

    .dark-mode .form-control::placeholder {
      color: rgba(255, 255, 255, 0.5);
      transition: color 0.5s ease;
    }

  .dark-mode .form-select {
    color: #ffffff;
    background-color: #495057;
    border-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
  }

  /* Alert in modalità dark */
  .dark-mode .alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ffffff;
    border-color: rgba(220, 53, 69, 0.6);
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
  }

  /* Bottoni in modalità dark */
  .dark-mode .btn-outline-dark {
    color: #ffffff;
    border-color: #ffffff;
    transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease;
  }

    .dark-mode .btn-outline-dark:hover {
      color: #343a40;
      background-color: #ffffff;
      border-color: #ffffff;
    }

/* Bottoni in modalità light - migliora contrasto */
.btn-outline-dark {
  color: #212529;
  border-color: #212529;
  transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease;
}

  .btn-outline-dark:hover {
    color: #ffffff;
    background-color: #212529;
    border-color: #212529;
  }

/* Stili label in entrambe le modalità */
label {
  font-weight: 700;
}

.form-label {
  margin-bottom: 0.5rem;
}

/* Stili per icone tema */
.theme-selector .fa-sun {
  color: #ffcc00;
  transition: color 0.5s ease;
}

.theme-selector .fa-moon {
  color: #aabbff;
  transition: color 0.5s ease;
}

.theme-selector .form-check-input {
  cursor: pointer;
}

.theme-selector label {
  cursor: pointer;
}
