/* Survey-specific styles. Color palette and fonts live in /css/common.css. */

.green-hue {
  filter: hue-rotate(120deg); /* Changes red to green */
}

a {
  color: #c44100;
  text-decoration: underline;
}

a:hover {
  color: #c44100;
  text-decoration: underline;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
h2 { 
    font-size: 1.75rem; 
    font-weight: 700; 
}
h5 { font-size: 1.125rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

.btn:disabled {
    border-color: unset;
    background-color: unset;
    color: unset;
}

.btn:selected:disabled {
  color: var(--selected-color);  
  background-color: var(--selected-color);
  border-color: var(--selected-color);
}

/* Override Bootstrap primary color system */
.btn,
.btn-primary {
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 12px 24px;
    transition: var(--transition);
    box-shadow: none;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: white;
    border-color: var(--primary-hover);
    color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.btn-primary:active {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(0);
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 12px 24px;
    transition: var(--transition);
    box-shadow: none;
}

.btn-secondary:hover, .btn-primary:focus {
    background-color: white;
    border-color: var(--primary-hover);
    color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.btn-secondary:active {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(0);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    background: white;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: white;
    border-color: var(--primary-hover);
    color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

input
{
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 8px 8px;
    box-shadow: none;
}

select,
select option
{
  background-color: var(--background-color);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 8px 8px;
  box-shadow: none;
}

/*
  Style multi-select drop-downs to reverse primary colors when selected.
  The last item - background-image - is what overrides system behavior to
  highlight selected items when the control has the focus.
*/
select[multiple] option {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  padding: 8px;
}

select[multiple] option:checked {
  background-color: var(--primary-color) !important;
  color: var(--background-color) !important;
  /*border-color: var(--primary-color) !important;*/
  border-color: var(--background-color) !important;
  background-image: linear-gradient(0deg, var(--primary-color) 0%, var(--primary-color) 100%);
}

/*
.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 30px;
    margin-top: auto;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    background-color: white;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}
*/

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.checkbox-item input[type="checkbox"] {
    margin-left: 10px;
    margin-right: 10px;
    transform: scale(1.8);
}

.checkbox-item input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-item label {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Style invalid inputs */
input:invalid,
select:invalid,
textarea:invalid {
  border: 2px solid #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Style valid inputs (optional) */
input:valid,
select:valid,
textarea:valid {
  border: 1px solid #28a745;
}

/* Leaflet layer control — larger touch targets for mobile */
.leaflet-control-layers-toggle {
    width: 44px !important;
    height: 44px !important;
}

.leaflet-control-layers-expanded {
    padding: 6px 10px 6px 6px;
    font-size: 16px;
}

.leaflet-control-layers label {
    font-size: 16px;
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaflet-control-layers input[type="radio"],
.leaflet-control-layers input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.leaflet-control-layers-group-label {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0 2px;
}

/* Style the validation message bubble - Webkit browsers */
::-webkit-validation-bubble-message {
  font-size: 16px !important;
  font-weight: normal;
}

/* Large touch-friendly number inputs with bigger spinner buttons */
input[type="number"] {
    font-size: 18px;
    padding: 10px 12px;
    min-height: 48px;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    width: 30px;
    height: 100%;
    cursor: pointer;
}

/* For Firefox */
:-moz-ui-invalid {
  border: 2px solid #dc3545 !important;
}

/* Any title that opens a help overlay (contains the ? help-icon) gets a
   comfortably tall tap target on mobile. Specific layouts (e.g. the GPS
   options row on the start page) override these via their own selectors. */
label:has(> .help-icon) {
    display: inline-block;
    padding-top: 8px;
    padding-bottom: 8px;
    cursor: pointer;
}