/**
 * FormForge Pro Public Styles
 *
 * @package FormForge
 * @since 1.0.0
 */

/* Form Container */
.rfp-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    /* Prevent theme CSS from cutting off the form */
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    box-sizing: border-box;
}

/* Ensure form element isn't constrained */
.rfp-form {
    overflow: visible !important;
    height: auto !important;
}

.rfp-form-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
}

.rfp-form-description {
    margin: 0 0 25px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Form Messages */
.rfp-form-messages {
    margin-bottom: 20px;
}

.rfp-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.rfp-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rfp-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form Unavailable Message (scheduling, entry limits) */
.rfp-form-unavailable {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
}

/* Form */
.rfp-form {
    background: #fff;
    padding: 30px;
}

/* Field Wrapper */
.rfp-field-wrapper {
    margin-bottom: 25px;
}

.rfp-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.rfp-required {
    color: #dc3545;
    margin-left: 2px;
}

.rfp-field-description {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.rfp-field-error {
    margin-top: 6px;
    font-size: 13px;
    color: #dc3545;
    display: none;
}

.rfp-field-wrapper.error .rfp-field-error {
    display: block;
}

/* Form Fields */
.rfp-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.rfp-field:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.rfp-field-wrapper.error .rfp-field {
    border-color: #dc3545;
}

.rfp-field-text,
.rfp-field-email,
.rfp-field-number,
.rfp-field-date,
.rfp-field-time {
    display: block;
}

.rfp-field-textarea {
    resize: vertical;
    min-height: 120px;
}

.rfp-field-select {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    appearance: none;
}

/* Radio and Checkbox Fields */
.rfp-field-radio-group,
.rfp-field-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rfp-radio-label,
.rfp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.rfp-radio-label input[type="radio"],
.rfp-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* File Upload */
.rfp-field-file {
    padding: 8px;
}

/* reCAPTCHA */
.rfp-recaptcha-wrapper {
    margin-bottom: 20px;
}

/* Submit Button */
.rfp-submit-wrapper {
    margin-top: 30px;
}

.rfp-submit-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.rfp-submit-button:hover {
    background: #135e96;
}

.rfp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rfp-submit-button.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Conditional Logic - Hidden by default until JS evaluates */
.rfp-field-wrapper[data-conditional="true"] {
    display: none;
}

/* Show when JS determines condition is met */
.rfp-field-wrapper[data-conditional="true"].rfp-conditional-visible {
    display: block;
}

/* Multi-Page Forms - Progress Bar */
.rfp-progress-bar {
    margin-bottom: 30px;
}

.rfp-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rfp-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.rfp-progress-step.active,
.rfp-progress-step.completed {
    opacity: 1;
}

.rfp-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.rfp-progress-step.active .rfp-step-number {
    background: #2271b1;
    color: #fff;
}

.rfp-progress-step.completed .rfp-step-number {
    background: #00a32a;
    color: #fff;
}

.rfp-step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.rfp-progress-step.active .rfp-step-label {
    color: #2271b1;
    font-weight: 600;
}

.rfp-progress-track {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    overflow: hidden;
}

.rfp-progress-fill {
    height: 100%;
    background: #2271b1;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Multi-Page Forms - Navigation */
.rfp-page-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.rfp-prev-page,
.rfp-next-page {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.rfp-prev-page {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
}

.rfp-prev-page:hover {
    background: #e0e0e0;
}

.rfp-next-page {
    background: #2271b1;
    border: 1px solid #2271b1;
    color: #fff;
    margin-left: auto;
}

.rfp-next-page:hover {
    background: #135e96;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .rfp-form-container {
        padding: 15px;
    }

    .rfp-form {
        padding: 20px;
    }

    .rfp-form-title {
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
    .rfp-form-container {
        padding: 10px;
    }

    .rfp-form {
        padding: 15px;
    }

    .rfp-submit-button {
        width: 100%;
    }
}

/* =====================================================
   PAYMENT FIELDS
   ===================================================== */

/* Product Field */
.rfp-product-field {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rfp-product-field:hover {
    border-color: #2271b1;
}

.rfp-product-field.selected {
    border-color: #2271b1;
    background: #f0f6fc;
    box-shadow: 0 0 0 1px #2271b1;
}

.rfp-product-checkbox,
.rfp-product-radio {
    flex-shrink: 0;
}

.rfp-product-info {
    flex: 1;
}

.rfp-product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.rfp-product-description {
    font-size: 13px;
    color: #666;
}

.rfp-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
    white-space: nowrap;
}

/* Quantity Field */
.rfp-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rfp-quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.rfp-quantity-minus,
.rfp-quantity-plus {
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rfp-quantity-minus:hover,
.rfp-quantity-plus:hover {
    background: #e0e0e0;
}

.rfp-quantity-input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 16px;
    padding: 8px;
    -moz-appearance: textfield;
}

.rfp-quantity-input::-webkit-outer-spin-button,
.rfp-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Total Field */
.rfp-total-field {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #2271b1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.rfp-total-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rfp-total-amount {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
}

.rfp-total-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: left;
}

.rfp-total-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    color: #555;
}

.rfp-total-item-name {
    flex: 1;
}

.rfp-total-item-price {
    font-weight: 600;
}

/* =====================================================
   PAYMENT GATEWAY WRAPPERS
   ===================================================== */

/* Payment Method Selection */
.rfp-payment-methods {
    margin-bottom: 20px;
}

.rfp-payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.rfp-payment-method:hover {
    border-color: #2271b1;
}

.rfp-payment-method.selected {
    border-color: #2271b1;
    background: #f0f6fc;
}

.rfp-payment-method input[type="radio"] {
    margin-right: 12px;
}

.rfp-payment-method-icon {
    width: 40px;
    height: 25px;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.rfp-payment-method-icon svg {
    max-width: 100%;
    max-height: 100%;
}

.rfp-payment-method-label {
    font-weight: 600;
    color: #333;
}

/* Stripe Payment Wrapper */
.rfp-stripe-wrapper {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.rfp-stripe-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.rfp-stripe-logo {
    height: 24px;
    margin-right: 10px;
}

.rfp-stripe-secure {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rfp-stripe-secure svg {
    width: 14px;
    height: 14px;
}

/* Stripe card input - the actual Stripe Element container */
.rfp-stripe-card-input,
.rfp-stripe-card-input[id^="rfp-stripe-card-"] {
    background: #fff !important;
    padding: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Force the Stripe iframe to have proper height */
.rfp-stripe-card-input iframe,
.rfp-stripe-card-input .__PrivateStripeElement,
.rfp-stripe-card-input .__PrivateStripeElement iframe {
    height: 24px !important;
    min-height: 24px !important;
}

/* The wrapper around the card element */
.rfp-stripe-card-element {
    margin-top: 10px;
}

.rfp-stripe-card-input.StripeElement--focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.rfp-stripe-card-input.StripeElement--invalid {
    border-color: #dc3545;
}

.rfp-stripe-card-input.StripeElement--complete {
    border-color: #28a745;
}

#rfp-stripe-card-element.StripeElement--invalid {
    border-color: #dc3545;
}

#rfp-stripe-card-errors {
    color: #dc3545;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.rfp-stripe-powered {
    margin-top: 15px;
    text-align: right;
    font-size: 11px;
    color: #999;
}

.rfp-stripe-powered a {
    color: #666;
    text-decoration: none;
}

/* PayPal Payment Wrapper */
.rfp-paypal-wrapper {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.rfp-paypal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.rfp-paypal-logo {
    height: 24px;
}

#rfp-paypal-button-container {
    min-height: 55px;
}

.rfp-paypal-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.rfp-paypal-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #ddd;
    border-top-color: #0070ba;
    border-radius: 50%;
    animation: rfp-spin 0.8s linear infinite;
}

.rfp-paypal-error,
.rfp-paypal-success {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.rfp-paypal-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: none;
}

.rfp-paypal-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: none;
}

.rfp-paypal-divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.rfp-paypal-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ddd;
}

.rfp-paypal-divider span {
    background: #f9f9f9;
    padding: 0 15px;
    position: relative;
    color: #666;
    font-size: 13px;
}

/* Payment Processing Overlay */
.rfp-payment-processing {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.rfp-payment-processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: rfp-spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.rfp-payment-processing-text {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

@keyframes rfp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Payment Success Message */
.rfp-payment-success {
    text-align: center;
    padding: 40px 20px;
}

.rfp-payment-success-icon {
    width: 80px;
    height: 80px;
    background: #d4edda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.rfp-payment-success-icon svg {
    width: 40px;
    height: 40px;
    color: #00a32a;
}

.rfp-payment-success h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #333;
}

.rfp-payment-success p {
    color: #666;
    margin: 0;
}

/* Responsive Payment Styles */
@media screen and (max-width: 480px) {
    .rfp-product-field {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .rfp-product-info {
        text-align: center;
    }

    .rfp-total-amount {
        font-size: 28px;
    }

    .rfp-stripe-wrapper,
    .rfp-paypal-wrapper {
        padding: 15px;
    }
}

/* ===================================
   SIGNATURE FIELD
   =================================== */
.rfp-signature-wrapper {
    width: 100%;
}

.rfp-signature-canvas {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    cursor: crosshair;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.rfp-signature-canvas:hover {
    border-color: #999;
}

.rfp-signature-controls {
    margin-top: 8px;
}

.rfp-signature-clear {
    font-size: 12px;
}

.rfp-signature-notice {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rfp-signature-notice .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #4caf50;
}

/* Error state */
.rfp-field-wrapper.error .rfp-signature-canvas {
    border-color: #dc3545;
}

/* ===================================
   CONSENT FIELD
   =================================== */
.rfp-consent-wrapper {
    margin: 10px 0;
}

.rfp-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.rfp-consent-checkbox {
    margin-top: 3px;
    flex-shrink: 0;
}

.rfp-consent-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.rfp-consent-text a {
    color: #0073aa;
    text-decoration: underline;
}

/* Responsive Signature */
@media screen and (max-width: 480px) {
    .rfp-signature-canvas {
        max-width: 100%;
        height: 120px;
    }
}

/* Name Field */
.rfp-name-field-wrapper {
    display: flex;
    gap: 15px;
}

.rfp-name-first,
.rfp-name-last {
    flex: 1;
}

.rfp-name-field-wrapper input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.rfp-name-field-wrapper input:focus {
    outline: none;
    border-color: #0073aa;
}

/* Address Field */
.rfp-address-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rfp-address-row {
    display: flex;
    gap: 15px;
}

.rfp-address-street {
    width: 100%;
}

.rfp-address-city,
.rfp-address-state,
.rfp-address-zip,
.rfp-address-country {
    flex: 1;
}

.rfp-address-field-wrapper input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.rfp-address-field-wrapper input:focus {
    outline: none;
    border-color: #0073aa;
}

/* Sub-labels for Name and Address */
.rfp-sub-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Responsive Name and Address */
@media screen and (max-width: 480px) {
    .rfp-name-field-wrapper {
        flex-direction: column;
    }

    .rfp-address-row {
        flex-direction: column;
    }
}

/* Section Divider */
.rfp-section-divider {
    margin: 30px 0 20px;
}

.rfp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.rfp-section-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.rfp-section-line {
    border: none;
    border-top: 1px solid #ddd;
    margin: 0;
}

/* Page Break */
.rfp-page-break {
    display: none;
}

/* Save & Continue */
.rfp-save-continue-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.rfp-save-continue-button:hover {
    background: #e5e5e5;
    border-color: #8c8f94;
}

.rfp-save-continue-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.rfp-save-continue-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.rfp-save-continue-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.rfp-save-continue-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.rfp-save-continue-close:hover {
    color: #333;
}

.rfp-save-continue-modal h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #1d2327;
}

.rfp-save-continue-success {
    text-align: center;
    padding: 10px 0;
}

.rfp-save-continue-success .dashicons-yes-alt {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #00a32a;
    margin-bottom: 10px;
}

.rfp-save-continue-success p {
    margin: 0 0 15px;
    font-size: 16px;
}

.rfp-resume-url-container {
    text-align: left;
}

.rfp-resume-url-container label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
}

.rfp-resume-url {
    width: calc(100% - 80px);
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #f9f9f9;
}

.rfp-copy-url {
    vertical-align: top;
    margin-left: 5px;
}

.rfp-save-continue-email {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.rfp-save-continue-email p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #666;
}

.rfp-continue-email {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.rfp-send-email-link {
    width: 100%;
}

.rfp-email-sent-message {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rfp-save-continue-loading {
    text-align: center;
    padding: 20px 0;
}

.rfp-save-continue-loading .spinner {
    margin: 0 auto 10px;
}

.rfp-save-continue-error {
    text-align: center;
    padding: 10px 0;
    color: #d63638;
}

.rfp-save-continue-error .dashicons-warning {
    font-size: 36px;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
}

.rfp-message-info {
    background: #e8f4fc;
    border-left: 4px solid #0073aa;
    color: #1d2327;
}

/* =====================================================
   QUIZ RESULTS
   ===================================================== */
.rfp-quiz-results {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.rfp-quiz-score {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.rfp-quiz-grade {
    font-size: 18px;
    color: #555;
    margin-bottom: 15px;
    text-align: center;
}

.rfp-quiz-status {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.rfp-quiz-passed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rfp-quiz-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rfp-quiz-answers {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.rfp-quiz-answers h4 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
}

.rfp-quiz-answers ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rfp-quiz-answer {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 14px;
}

.rfp-quiz-correct {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.rfp-quiz-incorrect {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.rfp-quiz-icon {
    margin-right: 8px;
    font-weight: bold;
}

.rfp-quiz-explanation {
    font-style: italic;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* ============================================
   Phase 3 Field Enhancements
   ============================================ */

/* Character Counter */
.rfp-char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Password Field Wrapper */
.rfp-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.rfp-password-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.rfp-password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.rfp-password-toggle:hover {
    color: #333;
}

.rfp-password-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Password Strength Meter */
.rfp-password-strength {
    margin-top: 8px;
}

.rfp-strength-bar {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    transition: width 0.3s, background-color 0.3s;
    width: 0;
}

.rfp-strength-text {
    font-size: 12px;
    margin-top: 4px;
    color: #666;
}

/* File Upload Hints */
.rfp-file-hints {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

/* Field Errors */
.rfp-field-error {
    border-color: #d63638 !important;
}

.rfp-field-error-msg {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
}

.rfp-confirm-error,
.rfp-file-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
}

/* Enhanced Select (Searchable Dropdown) */
.rfp-enhanced-select-wrapper {
    position: relative;
}

.rfp-enhanced-select-display {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.rfp-enhanced-select-display:hover {
    border-color: #2271b1;
}

.rfp-enhanced-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    margin-top: 4px;
}

.rfp-enhanced-select-search {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #eee;
    outline: none;
    box-sizing: border-box;
}

.rfp-enhanced-select-options {
    max-height: 200px;
    overflow-y: auto;
}

.rfp-enhanced-select-option {
    padding: 10px 12px;
    cursor: pointer;
}

.rfp-enhanced-select-option:hover {
    background: #f6f7f7;
}

.rfp-enhanced-select-option.selected {
    background: #2271b1;
    color: #fff;
}

/* Email/Password Confirmation Wrapper */
.rfp-email-confirm-wrapper,
.rfp-password-confirm-wrapper {
    margin-top: 12px;
}

/* ========================================
   FIELD SIZE VARIATIONS
   ======================================== */

/* Field Size - Controls textarea height only (GF-style) */
/* All inputs/selects are full width by default */
.rfp-field-wrapper input[type="text"],
.rfp-field-wrapper input[type="email"],
.rfp-field-wrapper input[type="tel"],
.rfp-field-wrapper input[type="url"],
.rfp-field-wrapper input[type="number"],
.rfp-field-wrapper input[type="password"],
.rfp-field-wrapper input[type="date"],
.rfp-field-wrapper input[type="time"],
.rfp-field-wrapper input[type="datetime-local"],
.rfp-field-wrapper select {
    width: 100%;
}

/* Textarea heights based on size setting */
.rfp-field-size-small textarea {
    height: 80px;
    width: 100%;
}

.rfp-field-size-medium textarea {
    height: 120px;
    width: 100%;
}

.rfp-field-size-large textarea {
    height: 160px;
    width: 100%;
}
