/* Mobile Salary Range Form Optimization */

/* Base styles for salary range */
.salary-range-container {
  position: relative;
}

.salary-range-container .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #495057;
}

/* Default styles for all screen sizes */
.salary-label {
  font-size: 12px;
  min-width: 40px;
  padding: 0.375rem 0.5rem;
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
  font-weight: 500;
}

.salary-input {
  font-size: 14px;
  padding: 0.375rem 0.5rem;
  text-align: center;
  font-weight: 500;
  border-color: #dee2e6 !important;
}

.salary-input:focus {
  border-color: #80bdff !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.salary-unit {
  font-size: 11px;
  padding: 0.375rem 0.5rem;
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
  font-weight: 500;
}

.salary-unit-mobile {
  text-align: center;
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
  margin-top: 0.5rem;
  padding: 0.25rem;
  background-color: #f8f9fa;
  border-radius: 0.25rem;
}

/* Tablet styles */
@media (max-width: 768px) {
  .salary-range-container .row {
    --bs-gutter-x: 1rem;
  }
  
  .salary-range-container .col-sm-6 {
    margin-bottom: 0.75rem;
  }
  
  .salary-range-container .col-sm-6:last-child {
    margin-bottom: 0;
  }
}

/* Mobile styles */
@media (max-width: 576px) {
  .salary-range-container .row {
    --bs-gutter-x: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .salary-range-container .col-12 {
    margin-bottom: 0.75rem;
  }
  
  .salary-range-container .col-12:last-child {
    margin-bottom: 0;
  }
  
  .salary-label {
    min-width: 35px;
    font-size: 11px;
    padding: 0.4rem 0.4rem;
  }
  
  .salary-input {
    font-size: 13px;
    padding: 0.4rem 0.5rem;
    text-align: center;
  }
  
  .salary-unit-mobile {
    font-size: 11px;
    margin-top: 0.4rem;
  }
  
  /* Improve input group styling on mobile */
  .salary-range-container .input-group {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
  }
  
  .salary-range-container .input-group .form-control {
    border-left: 0;
    border-right: 0;
  }
  
  .salary-range-container .input-group .input-group-text:first-child {
    border-right: 0;
  }
  
  .salary-range-container .input-group .input-group-text:last-child {
    border-left: 0;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .salary-range-container .input-group {
    font-size: 12px;
  }
  
  .salary-label {
    min-width: 30px;
    font-size: 10px;
    padding: 0.35rem 0.3rem;
  }
  
  .salary-input {
    font-size: 12px;
    padding: 0.35rem 0.4rem;
  }
  
  .salary-unit-mobile {
    font-size: 10px;
    margin-top: 0.3rem;
    padding: 0.2rem;
  }
  
  /* Adjust form spacing for very small screens */
  .form-group label {
    font-size: 14px;
    margin-bottom: 0.4rem;
  }
  
  .salary-range-container .col-12 {
    margin-bottom: 0.5rem;
  }
}

/* Landscape orientation on mobile */
@media screen and (max-width: 667px) and (orientation: landscape) {
  .salary-range-container .row {
    --bs-gutter-x: 0.75rem;
  }
  
  .salary-range-container .col-12 {
    margin-bottom: 0.5rem;
  }
}

/* iPhone specific optimizations */
@media screen and (max-width: 414px) {
  .salary-input {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
  }
  
  .salary-input::-webkit-outer-spin-button,
  .salary-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

/* Focus states for better accessibility */
.salary-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Animation for smooth transitions */
.salary-range-container .input-group {
  transition: all 0.2s ease-in-out;
}

.salary-range-container .input-group:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}