/* Thank-you message styling */
.jof-thank-you {
    background-color: #d4edda; /* Light green background */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb; /* Light green border */
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.jof-thank-you h3 {
    margin: 0;
    font-weight: bold;
}

.jof-countdown {
    font-size: 16px;
    color: #333;
}

/* Checkbox and radio button inline styling */
.jof-checkbox-group, .jof-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between options */
}

.jof-container .jof-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: normal;
}

/* General form field styling */
.jof-html-field {
    margin-top: 10px;
}

.jof-container .jof-label {
  font-weight: 600;
}

/* Enhanced error message styling */
.jof-error-message {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb; /* Light red border */
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    margin-top: 5px;
    display: none; /* Hidden by default */
    position: relative;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

.jof-error-message::before {
    content: '⚠'; /* Warning icon */
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.jof-show-field {
    display: block !important;
}

.jof-hide-field {
    display: none !important;
}

/* Multi-page form pagination - toggled by joform.js. Only ever
   applied on forms that actually have more than one page. */
.jof-page-hidden {
    display: none !important;
}

/* Used only for the captcha row, never the field pages. reCAPTCHA/
   hCaptcha/Turnstile auto-render into their container on script load
   and stay permanently blank if that container was display:none at
   that moment - so this keeps a real, measurable box (just moved out
   of the flow and made invisible) instead. */
.jof-captcha-hidden {
    position: absolute !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Preview page - read-only summary of what's been entered, built by
   joform.js's buildPreviewContent(). */
.jof-preview-section-title {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.jof-preview-section-title:first-child {
    margin-top: 0;
}

.jof-preview-list {
    margin: 0 0 10px;
}

.jof-preview-list dt {
    font-weight: 600;
    color: #495057;
}

.jof-preview-list dd {
    margin: 0 0 10px;
    word-break: break-word;
}