#b2b-register-form,
#b2b-login-form {
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
}

#b2b-register-form h2,
#b2b-login-form h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

#b2b-register-form p,
#b2b-login-form p {
  margin-bottom: 15px;
}

#b2b-register-form label,
#b2b-login-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

#b2b-register-form input[type="text"],
#b2b-register-form input[type="email"],
#b2b-register-form input[type="password"],
#b2b-login-form input[type="email"],
#b2b-login-form input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
  font-size: 14px;
}

#b2b-register-form input[type="text"]:focus,
#b2b-register-form input[type="email"]:focus,
#b2b-register-form input[type="password"]:focus,
#b2b-login-form input[type="email"]:focus,
#b2b-login-form input[type="password"]:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

#b2b-register-form input[type="submit"],
#b2b-login-form input[type="submit"] {
  width: 100%;
  padding: 12px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#b2b-register-form input[type="submit"]:hover,
#b2b-login-form input[type="submit"]:hover {
  background: #005a87;
}

#b2b-register-message,
#b2b-login-message {
  margin-top: 15px;
  text-align: center;
}

#b2b-register-message p,
#b2b-login-message p {
  padding: 10px;
  border-radius: 3px;
  margin: 0;
}

#b2b-register-message .success,
#b2b-login-message .success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#b2b-register-message .error,
#b2b-login-message .error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

#b2b-register-message .loading,
#b2b-login-message .loading {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

@media (max-width: 480px) {
  #b2b-register-form,
  #b2b-login-form {
    margin: 10px;
    padding: 15px;
  }
}

#edit-user-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#edit-user-modal .modal-content {
  background: white;
  padding: 30px;
  border-radius: 5px;
  min-width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#edit-user-modal h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
}

#edit-user-modal label {
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
}

#edit-user-modal input[type="radio"] {
  margin-right: 8px;
}

#edit-user-modal .button-primary {
  background: #0073aa;
  border-color: #0073aa;
  color: white;
  margin-right: 10px;
}

#edit-user-modal .button-primary:hover {
  background: #005a87;
  border-color: #005a87;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#edit-user-modal {
  animation: fadeIn 0.3s ease-out;
}

#edit-user-modal .modal-content {
  animation: fadeIn 0.3s ease-out;
  transform: translateY(-20px);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* registration page */

#company_search {
  box-sizing: border-box;
  max-width: 100%;
}
.b2b-registration-section {
  margin: 20px 0;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.b2b-registration-section.active {
  border-color: #0073aa;
  box-shadow: 0 4px 20px rgba(0, 115, 170, 0.1);
}

.b2b-registration-section .form-row-wide {
  width: 100% !important;
}

.b2b-checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.b2b-checkbox-wrapper input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.2);
  accent-color: #0073aa;
}

.b2b-checkbox-wrapper label {
  font-weight: 600;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.b2b-company-search {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.b2b-company-search h4 {
  margin: 0 0 15px 0;
  color: #0073aa;
  font-size: 16px;
  font-weight: 600;
}

.search-container {
  position: relative;
  margin-bottom: 15px;
}

.search-container input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #ffffff;
}

.search-container input[type="text"]:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
  outline: none;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #0073aa;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8f9fa;
}

.search-result-item.no-results {
  text-align: center;
  color: #666;
  cursor: default;
}

.company-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.company-details {
  font-size: 13px;
  color: #666;
}

.selected-company {
  margin-top: 15px;
  padding: 16px;
  background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
  border: 2px solid #4caf50;
  border-radius: 8px;
  position: relative;
}

.selected-company h5 {
  margin: 0 0 12px 0;
  color: #2e7d32;
  font-size: 14px;
  font-weight: 600;
}

.company-info-item {
  margin: 8px 0;
  display: flex;
  align-items: center;
}

.company-info-item label {
  font-weight: 600;
  margin-right: 12px;
  min-width: 140px;
  color: #333;
}

.company-info-item span {
  color: #555;
}

.change-company-btn {
  background: #fff;
  border: 1px solid #0073aa;
  color: #0073aa;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.change-company-btn:hover {
  background: #0073aa;
  color: #fff;
}

.loading-spinner {
  text-align: center;
  padding: 20px;
  color: #666;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 12px;
}

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

.b2b-message {
  background: #e3f2fd;
  border: 1px solid #2196f3;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 15px;
  color: #1565c0;
  font-size: 13px;
  line-height: 1.4;
}

.b2b-message p {
  margin: 0;
}

.woocommerce-form-register button[type="submit"]:disabled {
  background: #ccc !important;
  border-color: #ccc !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.company-selection-required {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

/* B2B Company Fields */
.b2b-company-fields {
  display: none;
  margin-top: 20px;
}

.b2b-company-fields h4 {
  margin: 20px 0 15px 0;
  color: #0073aa;
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.b2b-company-fields .form-row {
  margin-bottom: 15px;
}

.b2b-company-fields .form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.b2b-company-fields .form-row label .required {
  color: #d32f2f;
  font-weight: bold;
}

.b2b-company-fields .form-row select,
.b2b-company-fields .form-row input[type="text"],
.b2b-company-fields .form-row input[type="tel"],
.b2b-company-fields .form-row input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.b2b-company-fields .form-row select:focus,
.b2b-company-fields .form-row input[type="text"]:focus,
.b2b-company-fields .form-row input[type="tel"]:focus,
.b2b-company-fields .form-row input[type="email"]:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
  outline: none;
}

.b2b-company-fields .form-row input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.b2b-company-fields .form-row-first,
.b2b-company-fields .form-row-last {
  width: 48%;
  float: left;
}

.b2b-company-fields .form-row-last {
  float: right;
}

.b2b-company-fields .clear {
  clear: both;
}

/* Contact Fields */
.b2b-contact-fields {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

/* Delivery Address Toggle */
#b2b_delivery_same_as_billing {
  margin-right: 8px;
  transform: scale(1.1);
}

#b2b-delivery-address-fields {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  .b2b-registration-section {
    padding: 15px;
  }

  .company-info-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .company-info-item label {
    min-width: auto;
    margin-bottom: 4px;
  }
  
  .b2b-company-fields .form-row-first,
  .b2b-company-fields .form-row-last {
    width: 100%;
    float: none;
    margin-bottom: 15px;
  }
}


#acfw-checkout-ui-block {
  padding: 0px !important;
}

.acfw-accordions .acfw-accordion {
  background-color: #f9f9f9;
}

.acfw-accordion-title {
  line-height: 150%;
}

.acfw-accordion-content {
  background-color: #f9f9f9;
}