/* === FORMS STYLES (MontaCRM unified) === */

/* --- Labels --- */
.custom-form .form-label {
  width: 100% !important;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

/* --- Inputs & Selects --- */
.custom-form input,
.custom-form select,
.custom-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  transition: border 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  font-size: 0.95rem;
  background: #fff;
  box-sizing: border-box;
}

/* --- Focus styles --- */
.custom-form input:focus,
.custom-form select:focus,
.custom-form textarea:focus {
  border-color: #8e2de2;
  box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.15);
  outline: none;
}

/* --- Spacing --- */
.custom-form .mb-3 {
  margin-bottom: 20px;
}

.custom-form-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

/* === SELECT2 STYLES === */
.select2-container {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 0.95rem;
}

.select2-selection--single {
  height: 44px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  border: 1px solid #ccc !important;
  padding-left: 10px;
  transition: border 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  background: #fff !important;
}

.select2-selection--single:focus,
.select2-selection--single:active {
  border-color: #8e2de2 !important;
  box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.15) !important;
  outline: none !important;
}

.select2-selection__rendered {
  line-height: 44px !important;
  color: #333 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important; /* 🔹 Довгі офери обрізаються */
}

.select2-selection__arrow {
  height: 42px !important;
  right: 10px !important;
}

/* --- Dropdown --- */
.select2-dropdown {
  border-radius: 10px !important;
  border: 1px solid #ccc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.select2-results__option {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.select2-results__option--highlighted {
  background-color: #8e2de2 !important;
  color: #fff !important;
}

/* --- Disable dropdown from stretching --- */
.select2-container .select2-dropdown {
  width: 256px
  min-width: 100% !important;
  max-width: 100% !important;
}

/* === Textarea === */
.custom-form textarea {
  resize: vertical;
  min-height: 90px;
}

/* === Buttons in forms === */
.btn-add-record {
  background-color: #8e2de2;
  color: #fff;
  border-radius: 8px;
  border: none;
  padding: 10px 18px;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

.btn-add-record:hover {
  background-color: #7321b8;
}

.btn-reset-filter {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 18px;
  background: #fff;
  transition: all 0.2s ease-in-out;
}

.btn-reset-filter:hover {
  border-color: #8e2de2;
  color: #8e2de2;
}

/* === FILTERS SELECT2 (спеціальні стилі для панелей фільтрів) === */
.filters-form .select2-container {
  width: auto !important;
  min-width: 180px !important;
  max-width: 240px !important;
  font-size: 0.9rem;
}

.filters-form .select2-selection--single {
  height: 38px !important;
  border-radius: 8px !important;
  border: 1px solid #bbb !important;
  background: #fff !important;
  padding-left: 10px !important;
}

.filters-form .select2-selection__rendered {
  line-height: 38px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.filters-form .select2-selection__arrow {
  height: 36px !important;
}

.filters-form .select2-dropdown {
  border-radius: 8px !important;
  border: 1px solid #bbb !important;
}
