/* B2B Form - Herbs/Zielarnia Styling */
.abc-b2b-form-wrapper {
    padding: 0;
    margin: 0;
}

.abc-form-container {
    max-width: 768px;
    margin: 0 auto;
}

.abc-b2b-form {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 40px;
    gap: 20px;
    display: flex;
    flex-direction: column;
}

.abc-b2b-form input[type="text"],
.abc-b2b-form input[type="email"],
.abc-b2b-form input[type="tel"],
.abc-b2b-form input[type="url"],
.abc-b2b-form select,
.abc-b2b-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.abc-b2b-form input:focus,
.abc-b2b-form select:focus,
.abc-b2b-form textarea:focus {
    outline: none;
    border-color: #3b7a57;
    box-shadow: 0 0 0 3px rgba(59, 122, 87, 0.1);
}

.abc-b2b-form select {
    background: white;
    cursor: pointer;
}

.abc-b2b-form textarea {
    resize: vertical;
    font-family: inherit;
}

.abc-b2b-form button[type="submit"] {
    width: 100%;
    background-color: #2d5a3d;
    color: white;
    padding: 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.abc-b2b-form button[type="submit"]:hover {
    background-color: #3b7a57;
}

.abc-b2b-form button[type="submit"]:active {
    background-color: #2d5a3d;
}

/* LOADER */
/* Customization variables */
:root {
    --loader-size: 40px;              /* Size of the loader circle */
    --loader-color: #3498db;          /* Color of the animated border */
    --loader-border-color: #f3f3f3;   /* Color of the static border */
  }
  
  /* Container styling: occupies 100% of the parent */
  .abc-form-custom-loading {
    position: absolute;
    background: #f5f5f5ad;
    width: 100%;
    height: 100%;
    display: none;
  }
  
  /* Loader styling (initially hidden) */
  .abc-form-custom-loading .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--loader-size);
    height: var(--loader-size);
    margin: calc(var(--loader-size) / -2); /* Center the loader */
    border: 4px solid var(--loader-border-color);
    border-top: 4px solid var(--loader-color);
    border-radius: 50%;
    animation: abc-spin 1s linear infinite;
    display: none; /* Hidden by default */
  }
  
  /* Toggle class to activate the loader */
  .abc-form-custom-loading.active {
    display: block;
  }
  
  /* Keyframes for the spinning animation */
  @keyframes abc-spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  

/* Error highlighting */
.customcontactform .error {
    border: 2px solid red;
    box-shadow: 0 0 5px red;
}

.abc-custom-form-errors {
    color: red;
    margin:20px 5px;
    font-size: 0.8em;
}

/* Section Headers */
.abc-section-header {
    border-bottom: 1px solid #f3f3f3;
    padding-bottom: 4px;
    padding-top: 8px;
    margin-bottom: 8px;
}

.abc-section-header-first {
    border-bottom: 1px solid #f3f3f3;
    padding-bottom: 16px;
    margin-bottom: 8px;
}

.abc-section-title {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3b7a57;
}

/* Form Field Grid */
.abc-form-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Form Field Container */
.abc-form-field {
    display: flex;
    flex-direction: column;
}

/* Form Labels */
.abc-b2b-form label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-align: left;
}

/* Helper text under inputs */
.abc-form-helper-text {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Checkbox and Radio Groups */
.abc-form-checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
}

.abc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.abc-checkbox-label input[type="checkbox"] {
    accent-color: #3b7a57;
    flex-shrink: 0;
}

/* Consent Section */
.abc-consent-section {
    padding-top: 8px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #666;
}

.abc-consent-label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.abc-consent-label > span {
  line-height: 1.5em;
}

.abc-consent-label input[type="checkbox"] {
    accent-color: #3b7a57;
    flex-shrink: 0;
    margin-top: 4px;
}

.abc-consent-label a {
    color: #3b7a57;
    text-decoration: underline;
}

/* Footer Text */
.abc-form-footer-text {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-bottom:0;
}

/* Error Message Container */
.abc-form-errors {
    display: none;
    background-color: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

/* kontener */
.form-group-50{
  display:flex;          /* układ w jednej linii */
  gap:0.75rem;           /* odstęp między polami (≈ 12 px) */
  flex-wrap:wrap;        /* w razie braku miejsca łamie w dół */
}

/* każde pole = 50 % szerokości kontenera (minus odstęp) */
.form-group-50 .form-group{
  flex:1 1 calc(50% - 0.75rem);  /* rośnie i kurczy się, ale bazuje na połowie */
}

/* aby input/label rozciągały się do pełnej szerokości wewnątrz kolumny */
.form-group-50 .form-control,
.form-group-50 label{
  width:100%;
}



/* Custom Checkbox for Button-style Selects */
.abc-btn-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
}

.abc-btn-checkbox .abc-checkbox-icon {
  width: 17px;
  height: 17px;
  padding: 1px;
  border: 2px solid #ff914d;
  border-radius: 4px;
  margin-right: 5px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.elementor-button.abc-active .abc-checkbox-icon {
  /* background: #ff914d; */
  border-color: #ac6138;
}
.elementor-button.abc-active .abc-checkbox-icon svg > * {
  stroke: #ac6138;
  fill: #ac6138;
}
.abc-checkbox-icon svg {
  display: none;
}

.elementor-button.abc-active .abc-checkbox-icon svg {
  display: block;
}

.abc-btn-checkbox .abc-btn-label {
}


.abc-btn-checkbox .abc-btn-label {
  user-select: none;
}
/* Custom file upload styling */
.abc-file-upload {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 8px;
}

.abc-file-input[type="file"] {
  opacity: 0;
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  z-index: 2;
  cursor: pointer;
}

.abc-file-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  border: 2px solid #ff914d;
  border-radius: 8px;
  padding: 7px 16px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 38px;
  font-size: 1em;
  position: relative;
  z-index: 1;
}

.abc-file-btn {
  background: #ff914d;
  color: #fff;
  border-radius: 6px;
  padding: 5px 18px;
  font-weight: 500;
  font-size: 1em;
  border: none;
  outline: none;
  transition: background 0.2s;
  white-space: nowrap;
  margin-right: 8px;
  box-shadow: 0 1px 2px #0001;
}

.abc-file-label:hover, .abc-file-label:focus-within {
  border-color: #ac6138;
  box-shadow: 0 0 0 2px #ff914d33;
}

.abc-file-btn:active {
  background: #ac6138;
}

.abc-file-name {
  color: #888;
  font-size: 0.98em;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  display: inline-block;
}

@media (max-width: 600px) {
  .abc-file-label { flex-direction: column; align-items: flex-start; gap: 4px; }
  .abc-file-name { max-width: 120px; }
}
/* File input clear (X) button */
.abc-file-clear {
  background: none;
  border: none;
  color: #ff914d;
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  margin-left: auto;
  margin-right: 0;
  padding: 0 8px;
  line-height: 1;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
  border-radius: 50%;
  z-index: 3;
  pointer-events: auto;
  position: relative;
}

.abc-file-clear:hover, .abc-file-clear:focus {
  color: #fff;
  background: #ff914d;
  outline: none;
}

@media(max-width: 767px) {
  .abc-file-upload {
    flex-direction: row !important;
    align-items: center !important;
    display: flex !important;
    gap: 8px;
  }
  .abc-file-label {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 8px !important;
    margin: 0 !important;
  }
  .abc-file-btn {
    min-width: 0;
    margin-right: 6px;
    padding: 5px 10px;
    font-size: 1em;
  }
  .abc-file-name {
    max-width: 90px;
    font-size: 0.97em;
  }
  .abc-file-clear {
    margin-left: 0;
    margin-right: 0;
    min-width: 32px;
    min-height: 32px;
  }
}

/* Mobile (tablet & phone) <= 768px */
@media (max-width: 768px) {
  .abc-b2b-form {
    padding: 20px;
    gap: 16px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  }

  .abc-form-field-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .abc-form-checkbox-group {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .abc-b2b-form input[type="text"],
  .abc-b2b-form input[type="email"],
  .abc-b2b-form input[type="tel"],
  .abc-b2b-form input[type="url"],
  .abc-b2b-form select,
  .abc-b2b-form textarea {
    font-size: 16px;
    line-height: 1.2;
    padding: 8px 12px;
  }

  .abc-b2b-form select {
    font-size: 14px;
  }

  .abc-b2b-form textarea {
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 12px;
  }

  .abc-b2b-form label {
    font-size: 13px;
    margin-bottom: 2px;
  }

  .abc-b2b-form button[type="submit"] {
    font-size: 14px;
    line-height: 1.2;
    padding: 10px 16px;
    margin-top: 4px;
  }

  .abc-section-header {
    padding-top: 4px;
    padding-bottom: 4px;
    margin-bottom: 4px;
  }

  .abc-section-header-first {
    padding-bottom: 12px;
    margin-bottom: 4px;
  }

  .abc-consent-section {
    font-size: 13px;
    padding-top: 4px;
  }

  .form-group-50 {
    flex-direction: column;
    gap: 16px;
  }

  .form-group-50 .form-group {
    flex: 1 1 100%;
  }
}

/* Small phones <= 360px */
@media (max-width: 360px) {
  .abc-b2b-form {
    padding: 14px;
    gap: 12px;
    border-radius: 10px;
  }

  .abc-form-field-grid {
    gap: 12px;
  }

  .abc-form-checkbox-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .abc-b2b-form input[type="text"],
  .abc-b2b-form input[type="email"],
  .abc-b2b-form input[type="tel"],
  .abc-b2b-form input[type="url"],
  .abc-b2b-form select,
  .abc-b2b-form textarea {
    padding: 7px 10px;
  }

  .abc-b2b-form select {
    font-size: 13px;
  }

  .abc-b2b-form textarea {
    font-size: 13px;
    padding: 7px 10px;
  }

  .abc-b2b-form label {
    font-size: 12px;
  }

  .abc-b2b-form button[type="submit"] {
    font-size: 13px;
    padding: 9px 14px;
  }

  .abc-section-title {
    font-size: 10px;
  }

  .abc-consent-section {
    font-size: 12px;
    gap: 6px;
  }

  .abc-consent-label {
    gap: 6px;
  }

  .abc-form-footer-text {
    font-size: 11px;
  }
}