html, body {
  height: 100%;
  margin: 0;
  background-color: #f4f4f9;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  margin-top: 4px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  padding: 15px 30px 30px 30px;
  opacity: 0.9;
  flex: 1;
}

h1 {
  color: #343a40;
  font-weight: bold;
}

.btn-coda {
  background-color: #343a40;
  color: white;
  font-size: 1.2rem;
}

.btn-coda:hover {
  background-color: #23272b;
  color: white;
}

.pax-bar-row {
  text-align: left;
  overflow: hidden;
}

.pax-bar-row .pax-bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.pax-bar-row .pax-bar-label label {
  font-weight: 500;
}

.pax-bar-row .br-theme-bars-square .br-widget {
  height: auto;
}

.pax-bar-row .br-theme-bars-square .br-widget a {
  width: 36px;
  height: 36px;
  line-height: 2.4;
  font-size: 15px;
  border-radius: 4px;
  border-color: #343a40;
  color: #343a40;
}

.pax-bar-row .br-theme-bars-square .br-widget a.br-active,
.pax-bar-row .br-theme-bars-square .br-widget a.br-selected {
  border-color: #343a40;
  background-color: #343a40;
  color: white;
}

.flags-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 10px 0;
}

.flag-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  transition: border-color 0.2s, background-color 0.2s;
}

.flag-item:hover {
  border-color: #6c757d;
}

.flag-item.flag-active {
  border-color: #343a40;
  background-color: #f8f9fa;
}

.flag-label {
  font-size: 0.85rem;
  margin-top: 5px;
  color: #6c757d;
}

#codaForm .iti {
  display: block !important;
  max-width: 300px;
}

/* Header row: logo left, language dropdown right */
.coda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.coda-title {
  flex: 1;
  text-align: center;
  font-size: 1.3rem;
  margin: 0;
}

.coda-header .logo-small {
  height: 48px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 4px;
}

.lang-select-wrapper {
  position: relative;
  display: inline-block;
}

.lang-select-wrapper .select2-container {
  width: 50px !important;
}

.lang-select-wrapper .select2-container--default .select2-selection--single {
  border: none;
  background-color: transparent;
  height: 36px;
}

.lang-select-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px;
  padding: 0;
}

.lang-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

.lang-flag-icon {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
  border: 1px solid #ddd;
}

/* Dropdown lingua: solo bandiere, allineato in alto a destra */
.lang-select-wrapper .select2-container--open .select2-dropdown {
  min-width: 46px;
  width: auto !important;
  left: auto !important;
  right: 0;
  top: 0 !important;
}

.select2-results {
  max-height: none !important;
  overflow-y: visible !important;
}

.select2-results__options {
  max-height: none !important;
  overflow-y: visible !important;
}

.select2-results__option {
  padding: 4px 8px;
  text-align: center;
}

.select2-results__option .lang-flag-icon {
  width: 26px;
  height: 26px;
  margin-right: 0;
}

.langToolbar {
  display: none;
}

.langIco {
  display: none;
}

.form-check-input {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  border: 2px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  margin-right: 0.6rem !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 65% 65%;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-check-input:checked {
  background-color: #001f3f;
  border-color: #001f3f;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3e%3cpath d='M12.97 4.97a.75.75 0 010 1.06L7.477 11.53a.75.75 0 01-1.06 0L3.03 8.142a.75.75 0 111.06-1.06L6.948 9.94l4.963-4.97a.75.75 0 011.06 0z' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input:hover {
  border-color: #888;
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.25);
}

.form-check-input:disabled {
  cursor: not-allowed;
  background-color: #f2f2f2;
  border-color: #e0e0e0;
}

.form-check-input-lg {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
}
