.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.lehrstellen-finder-title,
.lehrstellen-finder-description {
  text-align: center;
}

#form-title {
  margin-top: 0;
}

.lehrstellen-finder-title {
  font-family: "Poppins", Sans-serif;
  font-weight: 400;
  letter-spacing: 0em;
  text-transform: none;
  color: #004680;
}


@media screen and (max-width: 768px) {
  .lehrstellen-finder-title {
    font-size: 33px;
  }
}

.toggle-fieldset {
    margin-bottom: 2rem;
}

.toggle-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toggle-button {
    font-size: 24px !important;
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    background: #f2f4f6;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

.grid {
  display: grid;
  gap: 24px;
  margin: 20px 0;
}

#bauberufe-legend {
  margin-top: 30px;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 0;
}

.grid input {
  width: 100%;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.toggle-button:hover {
    background: #004680;
    color: white;
}

.toggle-button.active {
    background: #004680;
    color: white;
    border: 1px solid #004680;
}

.toggle-button:focus {
    outline: 2px solid #004680;
    outline-offset: 2px;
    z-index: 1;
}

.toggle-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-icon {
    font-size: 1.2em;
}

.toggle-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid currentColor;
}

.toggle-button.active .toggle-indicator {
    background: currentColor;
}

.toggle-info {
    margin-top: 0.5rem;
    font-style: italic;
}

.form-help {
  font-size: 14px;
  font-style: inherit;
  line-height: normal;
  font-style: italic;
}

/* Custom profession list */
.profession-list-container {
    border: 2px solid #ddd;
    border-radius: 0px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.profession-list {
    max-height: 300px;
    overflow-y: auto;
    background: white;
}

.profession-list:focus {
    outline: none;
}

.profession-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    color: #3F4E68;
    font-weight: 500;
}

.profession-item:last-child {
    border-bottom: none;
}

.profession-item:hover {
    background: #e9ecef;
}

.profession-item.focused {
    background: #e3f2fd;
    outline: 2px solid #004680;
    outline-offset: -2px;
}

.profession-item.selected {
    background: #004680;
    color: white;
}

.profession-item.selected:hover {
    background: #004680;
}

.profession-check {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profession-item.selected .profession-check {
    opacity: 1;
}

.profession-text {
    flex: 1;
}

/* Form error styling */
.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-error {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
    display: none;
}

.required-indicator {
    color: #dc3545;
    font-weight: bold;
}

.optional-indicator {
    color: #3F4E68;
    font-weight: normal;
    font-size: 14px;
    font-style: italic;
}

.form-submit {
  max-width: 380px;
  width: auto;
  background-color: #153a65;
  font-size: 24px;
  font-family: "martel-local",sans-serif;
}

#submit-help p {
  text-align: center;
  font-size: 16px;
  margin-top: 20px;
  font-style: normal;
  line-height: 1.45em;
}

.submit-text {
  position: relative;
  top: 4px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-input:focus,
.form-submit:focus {
    outline: 2px solid #004680;
    outline-offset: 2px;
}

.profession-list::-webkit-scrollbar {
    width: 8px;
}

.profession-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.profession-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 0px;
}

.profession-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (prefers-contrast: high) {
    .form-input.error {
        border-width: 2px;
    }
    
    .profession-item.selected {
        border: 2px solid #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 968px) {
    .lehrstellen-finder-wrapper {
      padding: 0 16px;  
    }

    .toggle-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .toggle-button {
        padding: 0.75rem;
    }
    
    .profession-list {
        max-height: 250px;
    }
    
    .profession-item {
        padding: 0.75rem;
    }
}

@media screen and (max-width: 676px) {
  .grid-cols-3 {
    grid-template-columns: repeat(1, 1fr);
  }
}