.rq-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    background: #f0f7f9;
    padding: 20px;
    border-radius: 8px;
}

/* Steps */
.rq-step {
    display: none;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.rq-step.active {
    display: block;
}

.rq-step h3 {
    margin-top: 0;
    color: #398c99;
    border-bottom: 2px solid #e0ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Form Elements */
.rq-row {
    display: flex;
    gap: 15px;
}
.rq-col {
    flex: 1;
}

.rq-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.rq-wrapper input[type="text"],
.rq-wrapper input[type="email"],
.rq-wrapper input[type="number"],
.rq-wrapper input[type="date"],
.rq-wrapper select,
.rq-wrapper textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.rq-checkboxes label,
.rq-radio-group label {
    display: inline-block;
    font-weight: normal;
    margin-right: 15px;
    margin-bottom: 10px;
}

.rq-radio-group {
    margin-bottom: 15px;
}

.rq-bmi-display {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.rq-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Buttons */
.rq-wrapper button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.rq-next, #r_submit_btn {
    background: #398c99;
    color: #fff;
    float: right;
}

.rq-prev {
    background: #ccc;
    color: #333;
    float: left;
}

.rq-wrapper button:hover {
    opacity: 0.9;
}

#r_form_response {
    clear: both;
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

#r_form_response.error { background: #f8d7da; color: #721c24; }

/* Clearfix for buttons */
.rq-step::after {
    content: "";
    clear: both;
    display: table;
}

/* --- Custom File Upload Styles for Step 7 --- */
.rq-upload-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .rq-upload-grid {
        flex-direction: column;
    }
}

.rq-upload-box {
    flex: 1;
    position: relative;
}

.rq-hidden-file {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.rq-upload-label {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8fcfd;
    border: 2px dashed #398c99;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.rq-upload-label:hover {
    background: #e0ecef;
    border-color: #2a6a74;
}

.rq-upload-label svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    fill: #398c99;
    transition: all 0.3s ease;
}

.rq-upload-label .rq-file-name {
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 5px !important;
    font-size: 16px;
    word-break: break-all;
}

.rq-upload-label small {
    color: #666;
    font-weight: normal;
}

/* Success state when a file is selected */
.rq-upload-box.has-file .rq-upload-label {
    border-style: solid;
    background: #e8f5e9;
    border-color: #4caf50;
}

.rq-upload-box.has-file .rq-upload-label svg {
    fill: #4caf50;
}
/* --- Loading Spinner for Submit Button --- */
.rq-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button flex alignment to keep spinner centered with text */
#r_submit_btn {
    display: flex;
    justify-content: center;
    align-items: center;
}