/**
 * B Contact Form - Frontend Styles
 * Styles for form display on frontend
 */
/* Form Container */
.bcf-form-container {
  padding: 0;
  margin: 20px auto;
  overflow-x: auto;
  color: #333333;
}
.bcf-form {
  background: inherit;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
}
/* Labels */
.bcf-form label {
  display: block;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  margin-bottom: 5px;
  font-size: 18px;
}
.bcf-form label .required {
  color: #dc3232;
  margin-left: 3px;
}
/* Input Fields */
.bcf-field {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.4;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  box-sizing: border-box;
  color: inherit;
}
.bcf-field:focus {
  outline: none;
}

.bcf-field:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}
.bcf-field::placeholder {
  color: #999999;
  opacity: 1;
}
/* Textarea */
textarea.bcf-field {
  resize: vertical;
  min-height: 120px;
}
/* Select */
select.bcf-field:not([multiple]) {
  background-image: url("../img/bfc_select_arrow.svg");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
}
/* Group Title for Radio and Checkbox */
.bcf-group-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: inherit;
  line-height: 1.4;
  font-size: 20px;
  width: 100%;
}
.bcf-group-title .required {
  color: #dc3232;
  margin-left: 3px;
}
/* Radio and Checkbox Groups */
.bcf-radio-group,
.bcf-checkbox-group {
  margin-bottom: 20px;
}
.bcf-radio-group-wrap {
  margin-bottom: 20px;
}
.bcf-multi-select-wrap {
  margin-bottom: 20px;
}
.bcf-radio-clear,
.bcf-multi-select-clear {
  border: none;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: underline;
}
.bcf-radio-clear:focus,
.bcf-multi-select-clear:focus {
  outline: none;
}
.bcf-radio-clear[hidden],
.bcf-multi-select-clear[hidden] {
  display: none;
}
.bcf-radio-label,
.bcf-checkbox-label {
  font-size: 16px;
  display: flex;
  align-items: flex-start;
  font-weight: 400;
  cursor: pointer;
}
.bcf-radio-label:last-child,
.bcf-checkbox-label:last-child {
  margin-bottom: 0;
}
.bcf-radio-group input[type="radio"],
.bcf-checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0 8px 0 0;
  flex-shrink: 0;
}
/* Submit Button */
.bcf-submit-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.1s ease;
  width: auto;
  min-width: 120px;
  margin-top: 10px;
  margin-bottom: 0px;
}
.bcf-submit-btn:hover {
  background: #005a87;
  transform: translateY(-1px);
}
.bcf-submit-btn:active {
  transform: translateY(0);
}
.bcf-submit-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
}
.bcf-submit-btn.bcf-loading {
  position: relative;
  color: transparent;
}
.bcf-submit-btn.bcf-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: bcf-spin 0.8s linear infinite;
}
@keyframes bcf-spin {
  to {
    transform: rotate(360deg);
  }
}
/* Dividers */
.bcf-form hr {
  border: none;
  height: 1px;
  background: #e0e0e0;
  margin: 10px 0;
}
.bcf-radio-group .bcf-radio-label,
.bcf-checkbox-group .bcf-checkbox-label {
  font-weight: 400;
}
/* Required Field Validation */
.bcf-field.bcf-required.bcf-error {
  border-color: #dc3232;
  box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
  outline: none;
  box-shadow: none;
}
/* Messages */
.bcf-form-messages {
  margin-bottom: 20px;
  margin-top: 10px;
}
.bcf-message {
  padding: 8px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 500;
}
.bcf-message.bcf-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.bcf-message.bcf-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
.bcf-message.bcf-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
/* Field Errors */
.bcf-field-error {
  display: block;
  color: #dc3232;
  font-size: 14px;
  margin-top: -10px;
  font-weight: 500;
}
/* Responsive Design */
@media (max-width: 768px) {
  .bcf-form {
    padding: 20px;
    margin: 10px;
  }
  .bcf-field {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  .bcf-submit-btn {
    width: 100%;
    padding: 16px;
  }
}
/* RTL Support */
.rtl .bcf-radio-label,
.rtl .bcf-checkbox-label {
  direction: rtl;
}
.rtl .bcf-radio-group input[type="radio"],
.rtl .bcf-checkbox-group input[type="checkbox"] {
  margin: 0 0 0 8px;
}
.rtl select.bcf-field {
  background-position: left 12px center;
  padding-left: 40px;
  padding-right: 16px;
}
/* High Contrast Mode */
@media (prefers-contrast: high) {
  .bcf-field {
    border-width: 3px;
  }
  .bcf-submit-btn {
    border: 2px solid #000000;
  }
}
/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .bcf-field,
  .bcf-submit-btn {
    transition: none;
  }
  .bcf-submit-btn.bcf-loading::after {
    animation: none;
  }
}
/* Thank You Popup Styles */
#bcf-thank-you-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bcf-popup-content {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: bcf-popup-slide-in 0.3s ease-out;
}
@keyframes bcf-popup-slide-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.bcf-popup-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 23px;
}
.bcf-popup-header > * {
  margin: 0;
}
.bcf-popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  display: flex;
  line-height: 22px;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  position: absolute;
  right: 10px;
  background-color: #f3f4f6;
  top: 10px;
}
.bcf-close-icon {
  background-image: url(../img/close.svg);
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: contain;
}
.bcf-popup-close:not(.bcf-close-icon):hover {
  background-color: #d6d6d6;
}
.bcf-popup-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
}
.bcf-popup-footer {
  padding: 16px 24px 24px;
  text-align: center;
}
.bcf-popup-body {
  padding: 0 24px 0;
  text-align: center;
}
.bcf-popup-ok {
  background: #2563eb;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}
.bcf-popup-ok:hover {
  background: #006391;
  transform: translateY(-1px);
}
.bcf-popup-ok:active {
  transform: translateY(0);
}
.group_field {
  padding: 12px 10px 10px;
  border: 2px solid #ccc;
  border-radius: 5px;
  margin-bottom: 20px;
  position: relative;
  width: 100%;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bcf_field_wrap {
  position: relative;
}
.bcf-condition-hidden {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -99999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.bcf_field_wrap input[type="file"] {
  display: block;
  max-width: 100%;
}
.duplicate-button,
.delete-button {
  width: 30px;
  height: 30px;
  cursor: pointer;
  position: absolute;
  top: 0;
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 100;
}
.duplicate-button {
  right: 0;
  background-image: url(../img/bfc_edit_icon.svg);
}
.delete-button {
  right: 34px;
  background-image: url(../img/bfc_delete_icon.svg);
}
.bcf-star-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}
.bcf-star-rating-star {
  width: 24px;
  height: 24px;
  background-image: url(../img/bfc_star_outline.svg);
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
  cursor: pointer;
}
.bcf-star-rating-star.is-active {
  background-image: url(../img/bfc_star.svg);
}
.group_field .duplicate-control {
  display: none;
  visibility: hidden;
  opacity: 0;
}
.bcf-select-image-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.bcf-select-image-group.bcf-select-image-vertical {
  flex-direction: column;
  align-items: stretch;
}
.bcf-select-image-option {
  flex: 1 1 0;
  min-width: 0;
}
.bcf-select-image-vertical .bcf-select-image-option {
  flex: 0 0 auto;
  width: 100%;
  align-items: center;
  justify-content: center;
  display: flex;
}
.bcf-select-image-option input[type="radio"],
.bcf-select-image-option input[type="checkbox"] {
  display: none;
}
.bcf-select-image-vertical .bcf-select-image-inner {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
}
.bcf-select-image-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.3s;
  margin-bottom: 10px;
}
.bcf-select-image-option input[type="radio"]:checked + .bcf-select-image-inner,
.bcf-select-image-option
  input[type="checkbox"]:checked
  + .bcf-select-image-inner {
  border-color: #007bff;
}
.bcf-select-image-img {
  height: auto;
  max-height: 100px;
  object-fit: contain;
  display: block;
}
.bcf-select-image-vertical .bcf-select-image-img {
  max-width: 100px;
  max-height: 80px;
}
.bcf-select-image-label {
  margin-top: 5px;
  text-align: center;
  font-size: 14px;
}
.bcf-select-image-vertical .bcf-select-image-label {
  margin-top: 0;
  text-align: left;
}
.bcf-select-image-vertical .bcf-select-image-inner {
  flex-direction: column;
}
/* field controls columns  */
.bcf-column-25 {
  width: calc(25% - 5px);
}
.bcf-column-50 {
  width: calc(50% - 5px);
}
.bcf-column-33 {
  width: calc(33% - 5px);
}
.bcf-column-75 {
  width: calc(75% - 5px);
}
.bcf-column-100 {
  width: 100%;
}

.bcf-file-list {
  margin-top: 10px;
}
.bcf-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 5px;
  background-color: #e6e6e6;
  border-radius: 4px;
  font-size: 14px;
}
.bcf-file-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.bcf-file-item-remove {
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #dc3545;
  font-weight: bold;
  transition: color 0.2s;
  user-select: none;
  display: block;
  margin-top: -7px;
}

.bcf-file-item-remove:hover {
  color: #c82333;
}

.bcf-file-info {
  margin-top: 8px;
  color: inherit;
  font-size: 15px;
  line-height: 1.4;
}

.bcf-file-info small {
  display: block;
}

.bcf-file-info-value {
  font-weight: 600;
}

/* file input */
.bcf-file-upload-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 90px;
  
  flex-direction: column;
  width: calc(100% - 4px);
}
.bcf-file-upload-border {position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 4px;
  border: 2px dashed #e0e0e0; pointer-events: none;}
.bcf-file-upload-border.bcf-error {
  border-color: #dc3232;
}
.bcf-file-upload-wrapper:before {
  content: "Browse Files";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: #999999;
  pointer-events: none;
}
.bcf-file-upload-wrapper input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1000;
}
.bcf-file-upload-wrapper .bcf-field-error {position: absolute; left: 8px; bottom: 5px;}
.bcf-file-upload-wrapper + .bcf-field-error,
.bcf-star-rating-wrapper + .bcf-field-error {
  margin-top: 6px;
}

/* Responsive popup */
@media (max-width: 768px) {
  .bcf-popup-content {
    width: 95%;
    margin: 20px;
  }
  .bcf-popup-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .bcf-popup-body p {
    font-size: 15px;
  }
}
/* Print Styles */
@media print {
  .bcf-submit-btn {
    display: none;
  }
  .bcf-form {
    box-shadow: none;
    border: 1px solid #000000;
  }
  #bcf-thank-you-popup {
    display: none !important;
  }
}
