/* Bootstrap heading and description styles for no-theme mode */
.gf-no-theme input.h1,
.gf-no-theme textarea.h1 {
    font-size: 2rem !important;
}

.gf-no-theme input.h2,
.gf-no-theme textarea.h2 {
    font-size: 2rem !important;
}

.gf-no-theme input.h3,
.gf-no-theme textarea.h3 {
    font-size: 1.5rem !important;
}

.gf-no-theme input.h4,
.gf-no-theme textarea.h4 {
    font-size: 1.25rem !important;
}

.gf-no-theme input.h5,
.gf-no-theme textarea.h5 {
    font-size: 1rem !important;
}

.gf-no-theme input.h6,
.gf-no-theme textarea.h6 {
    font-size: 0.875rem !important;
}

/* Description text styling for no-theme mode */
.gf-no-theme textarea.form-text {
    color: #6c757d;
}

/* Form control border and padding styling for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control input.form-control,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control textarea.form-control,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select.form-control,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select.form-select {
font-size: 15px !important;
line-height: 1.5 !important;
border: 1px solid #dee2e6 !important;
border-radius: 0.25rem !important;
padding: 0.375rem 0.75rem !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select.form-control,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select.form-select {
  font-size: 14px !important;
  line-height: 1.5 !important;
  min-height: 40px !important;
  max-width: 100% !important;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: var(--gf-no-theme-select-caret, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M4 6l4 4 4-4'/%3E%3C/svg%3E")) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 14px 14px !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-phone-input-group .griffinforms-phone-country-select {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select {
  flex: 0 0 28% !important;
  max-width: 28% !important;
  width: 28% !important;
  min-width: 120px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: var(--gf-phone-caret-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolyline points='2,4 6,8 10,4' fill='none' stroke='%236c757d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")) !important;
  background-position: calc(100% - 14px) 50% !important;
  background-size: 12px 12px !important;
  background-repeat: no-repeat !important;
  padding-right: 44px !important;
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code_name"] {
  flex: 0 0 35% !important;
  max-width: 35% !important;
  width: 35% !important;
  min-width: 140px !important;
  max-width: 220px !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code"] {
  flex: 0 0 28% !important;
  max-width: 28% !important;
  width: 28% !important;
  min-width: 120px !important;
  max-width: 180px !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="code_only"] {
  flex: 0 0 16% !important;
  max-width: 16% !important;
  width: 16% !important;
  min-width: 76px !important;
  max-width: 110px !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group input.form-control[type="tel"] {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .form-control {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
}

@media (max-width: 575.98px) {
  .griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="code_only"] {
    background-image: none !important;
    padding-right: 12px !important;
  }
}

/* Form control border and padding styling for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control input[type="file"].form-control {
    padding: 3px !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control input.form-control:focus,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control textarea.form-control:focus,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select.form-control:focus,
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select.form-select:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Override WordPress core select styling for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control select {
    border-color: #dee2e6 !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
}

/* Bootstrap standard button styling for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .btn {
    font-size: 1rem !important;
    padding: 0.375rem 0.75rem !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
}

/* Bootstrap button color variants for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .btn-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .btn-secondary:hover {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

.griffinforms-app-formlayout-form .gf-no-theme .btn-success:hover {
    background-color: #157347 !important;
    border-color: #146c43 !important;
}

/* File input field styling for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control input[type="file"] {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem !important;
}

/* File upload button styling for no-theme mode */
/* Applies Bootstrap-style button appearance when no custom theme is set */
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control input[type="file"]::file-selector-button {
    padding: 0.375rem 0.75rem !important;
    margin-right: 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #e9ecef !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out !important;
}

/* File upload button hover state for no-theme mode */
.griffinforms-app-formlayout-form .gf-no-theme .griffinforms-app-field-form_control input[type="file"]::file-selector-button:hover {
    background-color: #dee2e6 !important;
    border-color: #adb5bd !important;
}

/* Ensure themed file upload buttons don't get bootstrap fallback styling */
.griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control input[type="file"]::file-selector-button {
    /* Theme-specific styles will be applied via inline styles by renderFileSelectorButtonStyles() */
}
