/* Reset some default styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
}

header {
  background-color: #4CAF50;
  display: flex;
  color: #fff;
  padding: 1rem;
  align-items: center;
  justify-content: space-between;
}

nav {
  display: flex;
  align-items: center;
}

.header-text {
  font-size: 2rem;
  color: #fff;
  margin: 0 auto;
  background-color: #4CAF50;
  width: fit-content;
}

nav {
  display: flex;
  align-items: center;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.credit-card-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.credit-card-field label {
  flex-basis: 100%;
  font-weight: bold;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.credit-card-field input {
  flex-basis: 45%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.credit-card-field .add-field {
  flex-basis: 10%;
  padding: 0.5rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
}

.result-container {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.add-card-btn,
.save-btn {
  flex-basis: 48%;
  padding: 0.5rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  width: 30px;
}

.bar {
  width: 100%;
  height: 3px;
  background-color: #fff;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.dropdown-menu li {
  padding: 12px 16px;
}

.dropdown-menu li a {
  color: #333;
  text-decoration: none;
}

.dropdown-menu li:hover {
  background-color: #ddd;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.input-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.input-row label {
  width: 200px;
  text-align: left;
  margin-right: 10px;
}

.input-row input {
  flex: 1;
}

.city-state-label {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.help-icon {
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 15px;
  border: 1px solid #888;
  width: 60%;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.help-icon {
  cursor: pointer;
  margin-left: 5px;
  color: #888;
}

.spinner {
  display: none;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
  margin-top: 16px;
}

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

.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
