/* Redesigned CSS to Match JÃ¤rfÃ¤lla Municipality's Branding and Improve Usability */

.hemtjanst-wrapper {
  --primary-color: #006400; /* JÃ¤rfÃ¤lla Green */
  --secondary-color: #008000; /* Darker Green for Accents */
  --background-color: #ffffff; /* White Background */
  --text-color: #333333; /* Dark Gray */
  --border-color: #ccc; /* Light Gray for Borders */
  --font-size-base: 16px;
  --border-radius: 5px;
  --info-text-color: #707070;
}

/* Layout */
.hemtjanst-wrapper .container {
  /* max-width: 750px; */
  /* margin: 30px auto; */
  /* padding: 25px; */
  /* background-color: #ffffff; */
  /* border: 1px solid var(--border-color); */
  /* border-radius: var(--border-radius); */
  /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
}

/* Header Styling */
.hemtjanst-wrapper header {
  background-color: var(--secondary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 25px 40px;
  justify-content: space-between; /* Ensures spacing between logo and title */
  flex-wrap: wrap; /* Allows content to wrap on smaller screens */
}

.hemtjanst-wrapper header img {
  max-height: 50px;
  margin-right: 20px;
  flex-shrink: 0; /* Prevents the logo from shrinking */
}

.hemtjanst-wrapper header h1 {
  margin: 0;
  font-size: 2rem;
  text-align: center;
  flex: 1; /* Ensures the title takes up available space */
  margin-left: -15rem;
  font-weight: bolder;
}

/* Form Styling */
.hemtjanst-wrapper form {
  /* margin-top: 20px; */
  /* max-width: 700px; */
  /* margin: 20px auto; */
  /* padding: 0 20px; */
}

.hemtjanst-wrapper fieldset {
  border: 0;
  border-bottom: 1px solid #d7d7d7;
  /* border-radius: var(--border-radius); */
  padding: 0 0 25px;
  margin-bottom: 25px;
}

.hemtjanst-wrapper fieldset:last-child {
  border: 0;
}

.hemtjanst-wrapper #resultDiv {
  margin-top: 20px;
  max-width: 700px;
  margin: 25px;
  padding: 0 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.hemtjanst-wrapper legend {
  font-size: 1.4rem;
  color: var(--env-font-color);
  font-weight: bold;
  /* padding: 0 10px; */
}

.hemtjanst-wrapper label,
.hemtjanst-wrapper .label {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-color);
  line-height: 1;
  margin-top: 20px;
}

.hemtjanst-wrapper label input {
  margin-right: 10px;
}

.hemtjanst-wrapper input[type="radio"],
.hemtjanst-wrapper input[type="checkbox"] {
  display: inline-block;
  width: auto;
  accent-color: var(--secondary-color);
}

.hemtjanst-wrapper input[type="radio"]:focus,
.hemtjanst-wrapper input[type="checkbox"]:focus {
  outline: none;
  box-shadow: none;
}

.hemtjanst-wrapper input,
.hemtjanst-wrapper select,
.hemtjanst-wrapper textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  box-sizing: border-box;
}

.hemtjanst-wrapper input:focus,
.hemtjanst-wrapper select:focus,
.hemtjanst-wrapper textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 6px rgba(0, 128, 0, 0.5);
}

/* Tooltip styles */
.hemtjanst-wrapper .info-text {
  display: block;
  color: var(--info-text-color);
  font-size: 16px;
  font-style: italic;
}


.hemtjanst-wrapper #savePdfButton {
  width: auto;
  border-radius: var(--border-radius);
  color: #ffffff;
  background-color: var(--secondary-color);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hemtjanst-wrapper #printButton {
  width: auto;
  border-radius: var(--border-radius);
  color: #ffffff;
  background-color: var(--primary-color);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hemtjanst-wrapper #backButton {
  width: auto;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  color: #006400;
  background-color: white;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hemtjanst-wrapper .resultButtons {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem;
}

.hemtjanst-wrapper button {
  width: 100%;
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius);
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.3s;
  display: inline-block;
  justify-content: center;
}

.hemtjanst-wrapper button:hover {
  background-color: var(--primary-color);
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .hemtjanst-wrapper .container {
    padding: 15px;
  }

  .hemtjanst-wrapper h1 {
    font-size: 1.8rem;
  }

  .hemtjanst-wrapper h2 {
    font-size: 1.4rem;
  }

  .hemtjanst-wrapper button {
    width: 100%;
    text-align: center;
    padding: 20px;
  }

  .hemtjanst-wrapper input,
  .hemtjanst-wrapper select,
  .hemtjanst-wrapper textarea {
    font-size: 14px;
    padding: 10px;
  }

  .hemtjanst-wrapper header {
    padding: 20px;
    flex-direction: column; /* Stacks the content vertically on smaller screens */
  }

  .hemtjanst-wrapper header img {
    max-height: 40px;
    margin: 0 auto 10px; /* Centers the logo with space below */
  }

  .hemtjanst-wrapper header h1 {
    font-size: 1.7rem;
    text-align: center;
    margin-left: 0 !important;
  }
}

@media screen and (max-width: 480px) {
  .hemtjanst-wrapper h1 {
    font-size: 1.4rem;
  }

  .hemtjanst-wrapper input,
  .hemtjanst-wrapper select,
  .hemtjanst-wrapper textarea {
    font-size: 14px;
    padding: 8px;
  }

  .hemtjanst-wrapper button {
    font-size: 14px;
    padding: 12px;
  }

  .hemtjanst-wrapper header img {
    max-height: 40px;
    margin-bottom: 10px;
  }
}

.hemtjanst-wrapper button:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.hemtjanst-wrapper input:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.hemtjanst-wrapper label[for] {
  cursor: pointer;
}

@media print {
  .hemtjanst-wrapper header {
    display: none; /* Completely hide the header in print */
  }

  .hemtjanst-wrapper .resultButtons {
    display: none;
  }

  .hemtjanst-wrapper .container {
    margin-top: 0; /* Adjust content to fill the space */
  }
}
