/* Modern Audit Plugin Styles */
.audit-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Section Navigation */
.section-navigation {
    margin-bottom: 30px;
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.section-tab:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.section-tab.active {
    border-color: #007cba;
    background: #007cba;
    color: white;
}

.section-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.section-progress-fill {
    height: 100%;
    background: #00ff88;
    transition: width 0.3s ease;
}

.section-tab.active .section-progress {
    background: rgba(255, 255, 255, 0.2);
}

/* Questions Container */
.questions-container {
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 20px;
    text-align: center;
}

.question-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.question-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0;
    flex: 1;
}

.question-weight {
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 15px;
}

.question-content {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Rating Scale */
.rating-scale {
    margin-top: 20px;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.rating-options {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.rating-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.rating-option:hover {
    background: #f0f8ff;
}

.rating-option.selected {
    background: #e6f3ff;
}

.rating-option input[type="radio"] {
    display: none;
}

.rating-circle {
    width: 40px;
    height: 40px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    background: white;
}

.rating-option:hover .rating-circle {
    border-color: #007cba;
    transform: scale(1.1);
}

.rating-option.selected .rating-circle {
    border-color: #007cba;
    background: #007cba;
    color: white;
    transform: scale(1.1);
}

.rating-value {
    font-weight: 600;
    font-size: 16px;
}

.rating-label {
    font-size: 11px;
    text-align: center;
    color: #666;
    font-weight: 500;
    line-height: 1.3;
}

.rating-option.selected .rating-label {
    color: #007cba;
    font-weight: 600;
}

/* Section Controls */
.section-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
}

/* Participant Information */
.participant-info {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.participant-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e1e1e;
    font-size: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007cba;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-submit {
    background: linear-gradient(135deg, #007cba, #00a0d2);
    color: white;
    font-size: 18px;
    padding: 16px 32px;
    width: 100%;
    margin-bottom: 20px;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87, #007cba);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Submit Container */
.submit-container {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.submit-requirements {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.submit-requirements p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #856404;
}

.submit-requirements ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.submit-requirements li {
    margin-bottom: 5px;
}

/* Results Container */
.results-container {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.results-header h2 {
    color: #1e1e1e;
    font-size: 28px;
    margin-bottom: 10px;
}

.results-header p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

.results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border: 6px solid #007cba;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
    position: relative;
}

.score-value {
    font-size: 36px;
    font-weight: 700;
    color: #007cba;
}

.score-max {
    font-size: 24px;
    color: #666;
    margin-left: 2px;
}

.score-percentage {
    font-size: 24px;
    font-weight: 600;
    color: #007cba;
}

.category-display h3 {
    margin-bottom: 15px;
    color: #1e1e1e;
    font-size: 20px;
}

.category-badge {
    background: linear-gradient(135deg, #007cba, #00a0d2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    display: inline-block;
}

.results-actions {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .audit-container {
        padding: 15px;
    }
    
    .section-tabs {
        flex-direction: column;
    }
    
    .section-tab {
        min-width: auto;
    }
    
    .rating-options {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .rating-option {
        flex: 0 0 calc(20% - 8px);
        min-width: 60px;
    }
    
    .rating-circle {
        width: 35px;
        height: 35px;
    }
    
    .rating-value {
        font-size: 14px;
    }
    
    .rating-label {
        font-size: 10px;
    }
    
    .section-controls {
        flex-direction: column;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .question-weight {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .results-container {
        padding: 25px;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 28px;
    }
    
    .score-max {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .rating-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .rating-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .rating-circle {
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .rating-label {
        text-align: left;
        flex: 1;
    }
    
    .scale-labels {
        display: none;
    }
}

/* Animation for smooth transitions */
.audit-form > * {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
.rating-option:focus-within .rating-circle {
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.3);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.3);
}

/* Print styles */
@media print {
    .audit-container {
        box-shadow: none;
    }
    
    .question-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .btn {
        display: none;
    }
    
    .section-navigation {
        display: none;
    }
}
