/**
 * Client Forms Frontend Styles
 *
 * @package Client_Forms
 */

/* Wrapper */
.client-forms-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Form */
.client-forms-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Sections */
.cf-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cf-section:last-child {
    border-bottom: none;
}

.cf-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--cf-brand-color, #8B6914);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cf-brand-color, #8B6914);
}

.cf-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

/* Headings */
.cf-heading {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 15px;
}

.cf-heading.cf-configurable {
    color: var(--cf-brand-color, #8B6914);
}

/* Paragraphs */
.cf-paragraph {
    font-size: 15px;
    color: #555;
    margin: 10px 0;
    line-height: 1.7;
}

.cf-paragraph.cf-brand-color {
    color: var(--cf-brand-color, #8B6914);
    font-style: italic;
}

/* Separator */
.cf-separator {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* Fields */
.cf-field {
    margin-bottom: 20px;
}

.cf-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.cf-required-mark {
    color: #dc3232;
    font-weight: bold;
}

/* Text Inputs */
.cf-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cf-input:focus {
    outline: none;
    border-color: var(--cf-brand-color, #8B6914);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.cf-text-input {
    max-width: 400px;
}

.cf-full-width .cf-text-input {
    max-width: 100%;
}

/* Textarea */
.cf-textarea {
    min-height: 120px;
    resize: vertical;
    max-width: 100%;
}

/* Select */
.cf-select {
    max-width: 400px;
    cursor: pointer;
}

/* Radio Buttons */
.cf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.cf-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.cf-radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.cf-radio-text {
    color: #555;
}

/* Checkboxes */
.cf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.cf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.cf-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.cf-checkbox-text {
    color: #555;
}

/* Likert Scale */
.cf-likert-label {
    margin-bottom: 12px;
}

.cf-likert-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.cf-likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.cf-likert-option:hover {
    border-color: var(--cf-brand-color, #8B6914);
    background: rgba(139, 105, 20, 0.05);
}

.cf-likert-option input[type="radio"] {
    margin: 0;
}

.cf-likert-option input[type="radio"]:checked + .cf-likert-number {
    color: var(--cf-brand-color, #8B6914);
    font-weight: bold;
}

.cf-likert-number {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cf-likert-label-text {
    font-size: 11px;
    color: #777;
    text-align: center;
}

/* Rating Scale */
.cf-rating-label {
    margin-bottom: 12px;
}

.cf-rating-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.cf-rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 40px;
}

.cf-rating-option:hover {
    border-color: var(--cf-brand-color, #8B6914);
    background: rgba(139, 105, 20, 0.05);
}

.cf-rating-option input[type="radio"] {
    margin: 0;
}

.cf-rating-option input[type="radio"]:checked + .cf-rating-number {
    color: var(--cf-brand-color, #8B6914);
    font-weight: bold;
}

.cf-rating-number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* File Upload */
.cf-file-upload-field {
    margin-bottom: 20px;
}

.cf-file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.cf-file-upload-area:hover {
    border-color: var(--cf-brand-color, #8B6914);
    background: rgba(139, 105, 20, 0.02);
}

.cf-file-upload-area.dragover {
    border-color: var(--cf-brand-color, #8B6914);
    background: rgba(139, 105, 20, 0.05);
}

.cf-upload-icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 10px;
}

.cf-upload-text {
    font-size: 15px;
    color: #555;
    margin: 10px 0;
}

.cf-upload-link {
    color: var(--cf-brand-color, #8B6914);
    text-decoration: underline;
    cursor: pointer;
}

.cf-upload-link:hover {
    color: #6b5010;
}

.cf-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cf-upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Inline Group */
.cf-inline-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cf-inline-group .cf-field {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* Submit Button */
.cf-submit-row {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cf-submit-btn {
    background-color: var(--cf-brand-color, #8B6914);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cf-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cf-submit-btn:active {
    transform: translateY(0);
}

/* Success/Error Messages */
.cf-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
}

.cf-message.cf-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cf-message.cf-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .client-forms-wrapper {
        padding: 10px;
    }

    .client-forms-form {
        padding: 20px;
    }

    .cf-section-title {
        font-size: 20px;
    }

    .cf-radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .cf-likert-scale {
        flex-direction: column;
    }

    .cf-likert-option {
        flex-direction: row;
        justify-content: space-between;
        min-width: 100%;
    }

    .cf-rating-scale {
        flex-wrap: wrap;
    }

    .cf-rating-option {
        min-width: 45px;
    }

    .cf-inline-group {
        flex-direction: column;
    }

    .cf-inline-group .cf-field {
        min-width: 100%;
    }

    .cf-text-input {
        max-width: 100%;
    }

    .cf-select {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .client-forms-form {
        padding: 15px;
    }

    .cf-section-title {
        font-size: 18px;
    }

    .cf-heading {
        font-size: 16px;
    }

    .cf-submit-btn {
        width: 100%;
        padding: 14px;
    }
}

/* ============================================
   Multi-Step Form Styles
   ============================================ */

/* Step Indicators (Progress Bar) */
.cf-multistep-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
    position: relative;
}

.cf-multistep-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 0;
}

.cf-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cf-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.cf-step-indicator.active .cf-step-number {
    background: var(--cf-brand-color, #8B6914);
    color: #fff;
    border-color: var(--cf-brand-color, #8B6914);
}

.cf-step-label {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
    max-width: 100px;
}

.cf-step-indicator.active .cf-step-label {
    color: var(--cf-brand-color, #8B6914);
    font-weight: 600;
}

/* Step Content */
.cf-step {
    display: none;
}

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

.cf-step-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--cf-brand-color, #8B6914);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cf-brand-color, #8B6914);
}

/* Step Navigation Buttons */
.cf-step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cf-btn-prev,
.cf-btn-next {
    background-color: var(--cf-brand-color, #8B6914);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cf-btn-prev:hover,
.cf-btn-next:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cf-btn-prev:active,
.cf-btn-next:active {
    transform: translateY(0);
}

.cf-btn-prev {
    background-color: #6c757d;
}

.cf-btn-prev:hover {
    background-color: #5a6268;
}

.cf-btn-next {
    margin-left: auto;
}

/* Info Box Paragraph Style */
.cf-paragraph.cf-info-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--cf-brand-color, #8B6914);
    padding: 15px 20px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Field Hint (e.g., minimum character count) */
.cf-field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Multi-step Responsive */
@media screen and (max-width: 768px) {
    .cf-step-indicators {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cf-step-indicators::before {
        display: none;
    }

    .cf-step-indicator {
        flex: 1;
        min-width: 60px;
    }

    .cf-step-indicator-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .cf-step-indicator-title {
        font-size: 11px;
        max-width: 80px;
    }

    .cf-step-title {
        font-size: 18px;
    }

    .cf-step-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .cf-btn-prev,
    .cf-btn-next {
        width: 100%;
    }

    .cf-btn-next {
        margin-left: 0;
    }
}

@media screen and (max-width: 480px) {
    .cf-step-indicator-title {
        display: none;
    }

    .cf-step-indicator-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
