.select-wrapper {
  position: relative;
  margin: 20px 0;
  width: 100%;
}

.select-wrapper select {
 width: 100%;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    appearance: none;
    font-weight: 500;
}

.select-wrapper .floating-label {
    position: absolute;
    top: -10px;
    left: 40%;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    color: #014769;
    background-color: white;
    pointer-events: none;
    z-index: 2;
}

.select-wrapper select:focus + .floating-label,
.select-wrapper select:not(:placeholder-shown) + .floating-label {
  color: #007bff;
}



.responsive-form-wrapper {
  max-width: 500px;
  margin: 30px auto;
  text-align: center;
}

/* Flex container for the buttons */
.form-flex {
  display: flex;
  justify-content: space-between;   /* pushes buttons to left/right edges */
  align-items: center;
  gap: 10px;                       /* space between buttons */
  flex-wrap: nowrap;               /* never allow wrapping or stacking */
  margin-bottom: 10px;
  width: 100%;                     /* full width of form */
}

/* Shared styling for both buttons */
#bank-search-form button {
  flex: 1 1 45%;                   /* each button ~45% width */
  min-width: 45%;                  /* ensures side-by-side */
  max-width: 48%;
  padding: 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  text-align: center;
  transition: background-color 0.3s, opacity 0.3s;
}

/* Search button green */
#bank-search-form #search-button {
  background-color: #28a745;
}
#bank-search-form #search-button:hover {
  background-color: #218838;
}

/* Clear button red */
#bank-search-form #clear-button {
  background-color: #dc3545;
}
#bank-search-form #clear-button:hover {
  background-color: #c82333;
}

/* Search input styling */
#bank-input {
  padding: 10px;
  font-size: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: auto;
  line-height: normal;
  flex: none;
  resize: none;
}


/* On mobile screens, shrink form and buttons */
@media (max-width: 600px) {
  .responsive-form-wrapper {
    max-width: 300px;       /* smaller form width on mobile */
  }

  #bank-input {
    font-size: 12px;
    padding: 11px;
  }

  #bank-search-form button {
    font-size: 12px;
    padding: 8px;
  }


  .bank-hint {
    font-size: 10px;        /* smaller hint text */
  }

  #state-filter-wrapper label {
    font-size: 10px;        /* smaller filter label text */
  }
}



/* Bank hint text */
.bank-hint {
  font-size: 10px;
  color: #666;
  margin-top: 8px;
  text-align: center;
}

/* Filter dropdown wrapper */
#state-filter-wrapper {
  display: none;
  margin: 20px 0;
  font-size: 8px;
}

/* Loader spinner */
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Message when no results are found */
.no-result {
  text-align: center;
  color: red;
  font-weight: 500;
}

/* Table styling for search results */
.search-result table {
  width: 100%;
  max-width:700px;
  border-collapse: collapse;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

.search-result table td {
  padding: 12px;
    border: 1px solid #777;
  word-break: break-word;
}

.search-result tr:nth-child(even) {
  background-color: #f7fbff; /* light blue for even rows */
}

.search-result tr:nth-child(odd) {
  background-color: #ffffff; /* white for odd rows */
}

.search-result td:first-child {
  background-color: #e6f0ff; /* subtle blue-gray for labels */
  color: #333;
  width: 40%;
  font-weight: 600;
}

.search-result td:last-child {
 color: #222;
    background-color: #d6deeb;
}

/* Force buttons side-by-side on ALL screen sizes */
@media (max-width: 600px) {
  .form-flex {
    flex-direction: row;        /* keep horizontal layout even on mobile */
    flex-wrap: nowrap;          /* don't allow stacking */
  }
  #bank-search-form button {
    flex: 1 1 45%;
    min-width: 45%;
    max-width: 48%;
  }
}
