.customcontactform {
    margin: 20px 0;
}
.customcontactform .form-group {
    margin-bottom: 15px;
}
.customcontactform label {
    font-weight: 500;
}

.customcontactform label.zgoda-checkbox {
    font-weight: normal;
    font-size:0.8em;
}

.customcontactform .form-control:focus {
    color: black;
}

/* 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;
}

/* 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;
}

.abc-file-label {
  position: relative;
  min-width: 0;
}

.abc-file-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .abc-file-name { max-width: 70px; }
  .abc-file-clear { height: 28px; width: 28px; font-size: 1.1em; }
}
/* Hide file clear button but keep space */
.abc-file-clear {
  visibility: hidden;
  opacity: 0.01;
  pointer-events: none;
  transition: opacity 0.2s;
}
.abc-file-clear.abc-file-clear-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

@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;
  }
}