.woob2b-quote-form-wrapper {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; */
  float: left;
  width: 100%;
}

.woob2b-quote-form-wrapper.widget-quote-form {
  margin: 10px 0;
  padding: 15px;
}

.woob2b-quote-title {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: center;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.woob2b-quote-messages {
  padding: 12px 16px;
  border-radius: 4px;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

.woob2b-quote-messages.success {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.woob2b-quote-messages.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.woob2b-quote-form {
  display: grid;
  gap: 20px;
}

.woob2b-quote-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.woob2b-quote-field label {
  display: block;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  margin-bottom: 5px;
}

.woob2b-quote-field.required label::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

.woob2b-quote-field input,
.woob2b-quote-field textarea,
.woob2b-quote-field select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
  box-sizing: border-box;
  background-color: #fff;
}

.woob2b-quote-field input:focus,
.woob2b-quote-field textarea:focus,
.woob2b-quote-field select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  background-color: #fff;
}

.woob2b-quote-field input:hover,
.woob2b-quote-field textarea:hover,
.woob2b-quote-field select:hover {
  border-color: #adb5bd;
}

.woob2b-quote-field textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.woob2b-quote-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
}

/* Radio button styling */
.woob2b-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.woob2b-radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-color: #fff;
}

.woob2b-radio-option:hover {
  border-color: #0073aa;
  background-color: #f8f9fa;
}

.woob2b-radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #0073aa;
}

.woob2b-radio-option label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  flex: 1;
}

/* Checkbox styling */
.woob2b-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-color: #fff;
  margin-top: 8px;
}

.woob2b-checkbox-label:hover {
  border-color: #0073aa;
  background-color: #f8f9fa;
}

.woob2b-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #0073aa;
}

.woob2b-checkbox-label span {
  cursor: pointer;
  font-weight: 500;
  flex: 1;
}

/* File input styling */
.woob2b-quote-field input[type="file"] {
  padding: 8px 12px;
  border: 2px dashed #e9ecef;
  background-color: #f8f9fa;
  cursor: pointer;
}

.woob2b-quote-field input[type="file"]:hover {
  border-color: #0073aa;
  background-color: #f0f8ff;
}

/* Submit button */
.woob2b-quote-submit-wrapper {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.woob2b-quote-submit {
  background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.woob2b-quote-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
  box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
  transform: translateY(-2px);
}

.woob2b-quote-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 115, 170, 0.3);
}

.woob2b-quote-submit:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.woob2b-quote-submit .submit-loading {
  display: none;
}

.woob2b-quote-submit.loading .submit-text {
  display: none;
}

.woob2b-quote-submit.loading .submit-loading {
  display: inline;
}

.woob2b-quote-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error states */
.woob2b-quote-field.error input,
.woob2b-quote-field.error textarea,
.woob2b-quote-field.error select {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
  background-color: #fff5f5;
}

.woob2b-quote-field .field-error {
  color: #dc3545;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.woob2b-quote-field .field-error::before {
  content: "⚠";
  font-size: 14px;
}

/* Success states */
.woob2b-quote-field.success input,
.woob2b-quote-field.success textarea,
.woob2b-quote-field.success select {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Grid layouts for multiple columns */
.woob2b-quote-columns {
  display: grid;
  gap: 20px;
  margin-top: 10px;
}

.woob2b-quote-columns.columns-1 {
  grid-template-columns: 1fr;
}

.woob2b-quote-columns.columns-2 {
  grid-template-columns: 1fr 1fr;
}

.woob2b-quote-columns.columns-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.woob2b-quote-columns.columns-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* Responsive design */
@media (max-width: 768px) {
  .woob2b-quote-form-wrapper {
    padding: 15px;
    margin: 15px 0;
  }
  
  .woob2b-quote-title {
    font-size: 18px;
  }
  
  .woob2b-quote-columns {
    grid-template-columns: 1fr !important;
  }
  
  .woob2b-quote-field input,
  .woob2b-quote-field textarea,
  .woob2b-quote-field select {
    padding: 10px 12px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .woob2b-quote-submit {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .woob2b-radio-group {
    gap: 8px;
  }
  
  .woob2b-radio-option,
  .woob2b-checkbox-label {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .woob2b-quote-form-wrapper {
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
  }
  
  .woob2b-quote-form {
    gap: 15px;
  }
  
  .woob2b-quote-field {
    gap: 6px;
  }
  
  .woob2b-quote-field label {
    font-size: 13px;
  }
  
  .woob2b-quote-field input,
  .woob2b-quote-field textarea,
  .woob2b-quote-field select {
    padding: 8px 10px;
  }
}

/* Print styles */
@media print {
  .woob2b-quote-form-wrapper {
    border: 1px solid #000;
    box-shadow: none;
    background: white;
  }
  
  .woob2b-quote-submit-wrapper {
    display: none;
  }
  
  .woob2b-quote-field input,
  .woob2b-quote-field textarea,
  .woob2b-quote-field select {
    border: 1px solid #000;
    background: white;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .woob2b-quote-form-wrapper {
    border: 2px solid #000;
  }
  
  .woob2b-quote-field input,
  .woob2b-quote-field textarea,
  .woob2b-quote-field select {
    border: 2px solid #000;
  }
  
  .woob2b-quote-submit {
    background: #000;
    border: 2px solid #000;
  }
  
  .woob2b-quote-submit:hover:not(:disabled) {
    background: #333;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .woob2b-quote-field input,
  .woob2b-quote-field textarea,
  .woob2b-quote-field select,
  .woob2b-quote-submit,
  .woob2b-radio-option,
  .woob2b-checkbox-label {
    transition: none;
  }
  
  .woob2b-quote-submit.loading::after {
    animation: none;
  }
}

/* Dark mode support */
/* @media (prefers-color-scheme: dark) {
  .woob2b-quote-form-wrapper {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .woob2b-quote-title {
    color: #e2e8f0;
    border-bottom-color: #4299e1;
  }
  
  .woob2b-quote-field label {
    color: #e2e8f0;
  }
  
  .woob2b-quote-field input,
  .woob2b-quote-field textarea,
  .woob2b-quote-field select {
    background-color: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
  }
  
  .woob2b-quote-field input:focus,
  .woob2b-quote-field textarea:focus,
  .woob2b-quote-field select:focus {
    border-color: #4299e1;
    background-color: #4a5568;
  }
  
  .woob2b-radio-option,
  .woob2b-checkbox-label {
    background-color: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
  }
  
  .woob2b-radio-option:hover,
  .woob2b-checkbox-label:hover {
    border-color: #4299e1;
    background-color: #2d3748;
  }
  
  .woob2b-quote-messages.success {
    background-color: #276749;
    border-color: #38a169;
    color: #9ae6b4;
  }
  
  .woob2b-quote-messages.error {
    background-color: #742a2a;
    border-color: #e53e3e;
    color: #feb2b2;
  }
  
  .woob2b-quote-field.error input,
  .woob2b-quote-field.error textarea,
  .woob2b-quote-field.error select {
    background-color: #742a2a;
    border-color: #e53e3e;
  }
} */

.woob2b-quote-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.woob2b-quote-form.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 10;
}

.woob2b-quote-form.loading .woob2b-quote-submit {
    position: relative;
}

.woob2b-quote-form.loading .woob2b-quote-submit::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════
 *  POPUP / MODAL MODE
 * ═══════════════════════════════════════════════════════════════════ */

/* Trigger button */
.woob2b-quote-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.25);
}

.woob2b-quote-popup-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.35);
    transform: translateY(-1px);
}

.woob2b-quote-popup-btn:active {
    transform: translateY(0);
}

/* Overlay backdrop */
.woob2b-quote-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

/* Modal container */
.woob2b-quote-popup-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: woob2b-popup-slide-in 0.25s ease-out;
}

@keyframes woob2b-popup-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button */
.woob2b-quote-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 10;
}

.woob2b-quote-popup-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Form wrapper inside popup — override inline styles */
.woob2b-quote-popup-modal .woob2b-quote-form-wrapper {
    border: none;
    border-radius: 0;
    margin: 0;
    background: #fff;
    padding: 28px 28px 24px;
    float: none;
}

.woob2b-quote-popup-modal .woob2b-quote-title {
    padding-right: 30px; /* space for close btn */
}

/* Responsive popup */
@media (max-width: 640px) {
    .woob2b-quote-popup-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .woob2b-quote-popup-modal {
        max-height: 85vh;
        border-radius: 12px 12px 0 0;
        animation: woob2b-popup-slide-up 0.25s ease-out;
    }

    @keyframes woob2b-popup-slide-up {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .woob2b-quote-popup-modal .woob2b-quote-form-wrapper {
        padding: 20px 16px 16px;
    }
}