/* --- Styles for Input Validation & Character Counters (add these if not already present) --- */
.input-wrapper { /* You'll need to add this div around your inputs in the HTML */
  margin-bottom: 15px; /* Or your preferred spacing */
  position: relative;
}

form input[type="text"] {
  /* Your existing input styles */
  width: 100%; /* Ensure it takes full width of wrapper */
  box-sizing: border-box; /* Important for padding and border */
}

.input-wrapper.invalid input[type="text"] {
  border-color: #d93025; /* Error red */
}
.input-wrapper.invalid input[type="text"]:focus { /* Optional: focus style for invalid input */
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.2);
}

.char-counter { /* You'll need to add this div for counters in the HTML */
  font-size: 12px;
  color: #5f6368;
  text-align: right;
  margin-top: 4px;
}
.input-wrapper.invalid .char-counter {
  color: #d93025;
}

/* --- Styles for Button Spinner (add these) --- */
form button[type="submit"] {
  position: relative; /* Needed if spinner is absolutely positioned inside */
  display: flex; /* To align text and spinner */
  justify-content: center;
  align-items: center;
  /* Your existing button styles */
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3); /* Light border for the track */
  border-top-color: #ffffff; /* Color of the spinning part */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
  display: none; /* Hidden by default */
}
/* If your button text is dark, adjust spinner colors */
/* e.g., for a dark button text on light background:
.spinner {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: #333;
}
*/


form button[type="submit"].loading .spinner {
  display: inline-block;
}
form button[type="submit"].loading .button-text {
  /* You might want to hide text or just let spinner be next to it */
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* --- Styles for the #results Div --- */
#results {
  margin-top: 5px;
  /* padding-top: 20px; */
}

#resultsVerify, .message ,#resultsBank {
  padding-left: 2.2vh;
  padding-right: 2.2vh;
  margin-top: -15px;
}

#results {
    padding-left: 2.2vh;
  padding-right: 2.2vh;
}
/* General Message Styling (for errors or info) */
.message {
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid transparent;
}
.message.error {
  background-color: #fdeaed; /* Light red */
  color: #b91c3b; /* Darker red for text */
  border-color: #f8c6cf; /* Reddish border */
}
.message.info {
  background-color: #e8f0fe; /* Light blue */
  color: #174ea6; /* Darker blue for text */
  border-color: #c5d8fb; /* Bluish border */
}

/* Section Styling for Results */
.section {
  background-color: #f8f9fa; /* Light grey background for section */
  border: 1px solid #dadce0; /* Standard border color */
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden; /* For smooth open/close if you add transitions */
}

.section-header {
  padding: 12px 15px;
  font-weight: 600; /* Make header text bolder */
  background-color: #e9ecef; /* Slightly darker grey for header */
  color: #3c4043; /* Dark grey text */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}
.section-header:hover {
  background-color: #dfe1e5; /* Darken on hover */
}

.section-header::after {
  content: '+'; /* Collapsed state icon */
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease-out;
}
.section.open .section-header::after {
  content: '−'; /* Expanded state icon */
  /* transform: rotate(180deg); /* No rotation needed for +/-, just content change */
}

.section-body {
  padding: 15px;
  display: none; /* Hidden by default */
  border-top: 1px solid #dadce0; /* Separator line */
  background-color: #ffffff; /* White background for content body */
}
.section.open .section-body {
  display: block;
}

.field {
  display: flex; /* Use flex for better alignment */
  justify-content: space-between;
  align-items: flex-start; /* Align items at the top if text wraps */
  padding: 8px 0;
  border-bottom: 1px dashed #e0e0e0; /* Dashed separator for fields */
  font-size: 14px;
  line-height: 1.4;
}
.field:last-child {
  border-bottom: none; /* No border for the last field */
}

.field label { /* Styles for the label part of the field */
  font-weight: 500; /* Slightly bolder than value */
  color: #5f6368; /* Grey color for label */
  margin-right: 10px; /* Space between label and value */
  text-transform: capitalize; /* Capitalize labels like "id number" -> "Id number" */
  flex-shrink: 0; /* Prevent label from shrinking if value is long */
}

.field .value { /* Styles for the value part of the field */
  color: #202124; /* Darker color for value */
  text-align: right;
  word-break: break-word; /* Break long values to prevent overflow */
}

/* Add this to your existing CSS */
#results.results-hidden {
  display: none;
}