/**
 * Civil Engineer Assessment Front-end CSS
 */

/* General Form Styling */
.ce-assessment-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.ce-assessment-heading {
    text-align: center;
    margin-bottom: 30px;
}

.ce-assessment-intro {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f0f7ff;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

/* Progress Bar */
.ce-assessment-progress {
    margin-bottom: 30px;
}

.ui-progressbar {
    height: 18px !important;
    background-color: #e0e0e0 !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.ui-progressbar .ui-progressbar-value {
    background-color: #3498db !important;
    border-radius: 10px !important;
    margin: 0 !important;
}

#progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #555;
}

/* Tabs Styling */
#assessment-tabs {
    border: none !important;
    padding: 0 !important;
}

.ui-tabs-nav {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px !important;
}

.ui-tabs-nav li {
    margin: 0 5px 5px 0 !important;
    border-radius: 4px !important;
    background-color: #e0e0e0 !important;
}

.ui-tabs-nav li a {
    padding: 8px 15px !important;
    color: #555 !important;
    font-size: 14px !important;
}

.ui-tabs-nav li.ui-tabs-active {
    background-color: #3498db !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.ui-tabs-nav li.ui-tabs-active a {
    color: #fff !important;
}

.ui-tabs-panel {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

/* Section Titles */
.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

/* Question Styling */
.question-group {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.question-group:last-child {
    border-bottom: none;
}

.question-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

/* Radio Button Styling */
.radio-options {
    display: flex;
    flex-wrap: wrap;
    margin-left: 20px;
}

.radio-option {
    margin-right: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.radio-option input[type="radio"] {
    margin-right: 5px;
}

/* Likert Scale Styling */
.likert-scale {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.likert-option {
    text-align: center;
    flex: 1;
}

.likert-option label {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #555;
}

/* Text Area Styling */
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
}

/* Form Controls */
.form-controls {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.tab-button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.tab-button:hover {
    background-color: #2980b9;
}

.tab-button.prev {
    background-color: #95a5a6;
}

.tab-button.prev:hover {
    background-color: #7f8c8d;
}

/* Submit Button */
#assessment-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

#assessment-submit:hover {
    background-color: #219955;
}

#assessment-submit:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Loading Indicator */
#assessment-loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Validation */
.unanswered {
    border-left: 4px solid #e74c3c;
    padding-left: 15px;
    background-color: rgba(231, 76, 60, 0.05);
}

/* Results Styling */
#assessment-results-container {
    display: none;
}

.results-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.results-title {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.result-item {
    margin-bottom: 15px;
}

.result-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.result-value {
    padding: 10px;
    background-color: #f9f9f9;
    border-left: 3px solid #3498db;
}

#result-orientation {
    font-size: 20px;
    color: #2980b9;
    font-weight: 700;
}

/* Chart Styling */
#score-chart-container {
    height: 300px;
    margin-top: 20px;
}

.simple-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 250px;
    padding-bottom: 30px;
    position: relative;
}

.chart-bar {
    width: 60px;
    background-color: #3498db;
    border-radius: 4px 4px 0 0;
}

.chart-bar.field {
    background-color: #2ecc71;
}

.chart-bar.office {
    background-color: #3498db;
}

.chart-bar.flexibility {
    background-color: #f1c40f;
}

.chart-labels {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.chart-labels span {
    text-align: center;
    font-size: 12px;
}

/* For smaller screens */
@media (max-width: 768px) {
    .radio-options {
        flex-direction: column;
    }
    
    .radio-option {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .likert-scale {
        flex-direction: column;
    }
    
    .likert-option {
        margin-bottom: 10px;
        display: flex;
        align-items: center;
    }
    
    .likert-option input {
        margin-right: 10px;
    }
    
    .likert-option label {
        margin-top: 0;
    }
    
    .ui-tabs-nav li {
        width: calc(50% - 5px);
    }
}