/* Uniform dimension management */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Basic styles */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* Be sure to include the Roboto font in the head */
  font-size: 14px;
  background-color: #fff;
  color: #212121;
}

body {
  min-height: 100vh;
}

/* Main container */
#bug_report {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;
  padding: 1rem;
}

/* ToolBar */
#toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #00155a;  /* Dark blue */
  color: #fff;
  margin-bottom: 1rem; /* Space below toolbar */
}

.toolbar_link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.toolbar_link:hover {
  color: #ff981a; /* Orange on hover */
}

/* Main title */
#bug_report h2 {
  margin: 1rem auto;
  font-size: 1.5rem;
  color: #00155a;
  text-align: center;
}

/* Form container */
#bug_form {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 2rem;
  margin: 1rem auto;
  max-width: 800px;
  width: 100%;
}

/* Form sections */
.box {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  width: 100%;
  margin-bottom: 1rem; /* Space between sections */
}

.box:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Subsection */
.subbox {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border-left: 4px solid #00155a;
  background-color: #fafafa;
  display: block;
}

/* Labels for required fields */
.require > label {
  color: #000000;
  min-width: 7em;
  display: inline-block;
  font-weight: 500;
}

/* Styles for locked and static fields */
.locked {
  background-color: #e0e0e0;
  pointer-events: none;
  opacity: 0.8;
}

.static {
  background-color: #e3f2fd;
}

/* "Link" button */
.linkbutton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 60px;
  background-color: #FF9800;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
}

.linkbutton:hover {
  background-color: #e68900;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Logo */
#logo {
  height: 60px;
  width: auto;
}

/* Image in link button */
.linkbuttonimage {
  height: 3vh;
  width: auto;
  margin-right: 0.5rem;
}

/* Text in link button */
.linkbuttontext {
  margin: 0;
  padding: 0;
}

/* Form element styles */
form label, legend {
  font-weight: 500;
  color: #212121;
  display: block;
  margin-bottom: 0.5rem;
}

form textarea {
  width: 100%;
  max-width: 100%;
  height: 120px;
  padding: 0.75rem;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 1rem;
}

form textarea:focus {
  border-color: #2196F3;
  box-shadow: 0 0 4px rgba(33,150,243,0.2);
  outline: none;
}

form input,
form select {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

form select {
	cursor: pointer;
}

form input:focus,
form select:focus {
  border-color: #2196F3;
  box-shadow: 0 0 4px rgba(33,150,243,0.2);
  outline: none;
}

/* Form buttons */
form button {
  background-color: #00155a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 15px 4px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  font-size: 1rem;
  width: 100%;
  display: block;
  margin-bottom: 1rem;
}

form button:hover {
  background-color: #00208a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Action button container (in-line display with buttons of equal width) */
#action_buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

#action_buttons button {
  flex: 1;
}

/* For inputs within a fieldset */
fieldset input {
  width: auto;
}

/* Specific send button */
#send {
  background-color: #FF9800;
  color: #fff;
}

/* List without bullets */
#files_info {
  list-style: none;
  margin: 0;
  padding: 0;
}

#files_info > * {
  margin: 0.5rem 0;
}

#files_info div {
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#files_info div * {
  margin: 0;
}

/* file list style */
#files_info ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Style for each list item */
#files_info li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

#files_info li:last-child {
  border-bottom: none;
}

/* Display of total file size in “card” type components */
#files_size {
  padding: 0.75rem;
  text-align: center;
  font-weight: bold;
  max-width: 400px;
  margin: 0 auto; /* Centered horizontally */
}

/* Improved delete button */
.deleteFile {
  background-color: transparent;
  border: none;
  border-radius: 4px;
  font-size: 1.2rem; /* Enlarged for easier clicking */
  color: #f44336;
  cursor: pointer;
  padding: 0.5rem;   /* Larger click zone */
  margin: 1rem;
  transition: background-color 0.3s, color 0.3s;
}

.deleteFile:hover,
.deleteFile:focus {
  background-color: #f44336;
  color: #fff;
  border-radius: 4px;
}

/* Adaptations for smaller screens */
@media (max-width: 600px) {
  form input,
  form select,
  form textarea {
    width: 100%;
  }

  #action_buttons {
    flex-direction: column;
  }

  .linkbutton {
    width: 100%;
    height: 50px;
  }
}

.custom-fieldset {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1.5rem 1rem 1rem;
  margin: 1rem 0;
  background-color: #fff;  
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.custom-fieldset legend {
  font-size: 1.1rem;
  font-weight: 500;
  color: #212121;
  padding: 0 0.5rem;
}

.version-info {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem;
  margin: 1rem auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
}

.version-info .version-field {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.version-info label {
  font-weight: 500;
  color: #212121;
  flex: 0 0 150px;
}

.version-info input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.version-info input:focus {
  border-color: #2196F3;
  box-shadow: 0 0 4px rgba(33,150,243,0.2);
  outline: none;
}

/* General container limiting width and centered */
.file-container {
  max-width: 50%;
  margin: 1rem auto;
  padding: 0 1rem;
}

#attachments {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: #fff;
}

#attachments:focus {
  border-color: #2196F3;
  box-shadow: 0 0 4px rgba(33, 150, 243, 0.2);
  outline: none;
}

.file-list-container {
  background-color: #fafafa;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
  max-height: 150px;
  overflow-y: auto; /* Vertical scrolling if required */
}

/* Unified style for all buttons */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  background-color: #00155a; /* Dark Blue */
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 15px 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  min-width: 120px;
}

/* Hover effect for all buttons */
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background-color: #00208a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Focus on improving accessibility */
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus {
  outline: none;
  border-color: #00155a;
  box-shadow: 0 0 4px rgba(33, 150, 243, 0.2);
}

.custom-file-input {
  display: inline-block;
  background-color: #00155a;  /* Dark Blue */
  color: #fff;
  padding: 15px 4px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  min-width: 120px;
  text-align: center;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
}

.custom-file-input:hover {
  background-color: #00208a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-file-input:focus {
  outline: none;
  border: 1px solid #00155a;
  box-shadow: 0 0 4px rgba(33, 150, 243, 0.2);
}

/* Hide native checkbox style */
.custom-checkbox input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  background-color: #fff;
  border: 2px solid #bdbdbd;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

/* Checked state */
.custom-checkbox input[type="checkbox"]:checked {
  background-color: #00155a;
  border-color: #00155a;
}

/* Check icon adapted to checkbox size */
.custom-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 35%;   /* Adjust these percentages to center and resize the check mark */
  top: 15%;
  width: 35%;
  height: 55%;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* set input apparence like a text */
#cf_version_du_logiciel_mysurvey {
	border: none;
	background-color: transparent;
	width: 20em;
}