/* AHP Assessment Plugin Styles */

.ahp-assessment-container,
.ahp-results-container,
.ahp-view-results-container,
.ahp-comparison-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Organization Info Section */
.organization-info {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

span.required {
    color: #e32;
    margin-left: 4px;
}

/* Admin Dashboard Multi-Column Layout */
.admin-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.admin-section:nth-child(1) {
    grid-column: 1 / -1; /* Organizations table spans full width */
}

.admin-section {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-table {
    width: 100%;
}

@media (max-width: 768px) {
    .admin-sections {
        grid-template-columns: 1fr;
    }
}

/* Assessment Tables */
.criteria-category {
    margin-bottom: 30px;
}

.criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.criteria-table th,
.criteria-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.criteria-table th:first-child,
.criteria-table td.criterion-description {
    text-align: left;
    width: 60%;
}

.criteria-table th:not(:first-child),
.criteria-table td.score-cell,
.criteria-table td.weight-cell {
    text-align: center;
    width: 10%;
}

.criteria-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* Yes/Partially/No columns styling */
.criteria-table th:nth-child(2),
.yes-cell {
    background-color: #e6f7e6; /* Light green for Yes */
}

.criteria-table th:nth-child(3),
.partially-cell {
    background-color: #fff7e6; /* Light yellow for Partially */
}

.criteria-table th:nth-child(4),
.no-cell {
    background-color: #f7e6e6; /* Light red for No */
}

.criteria-table th:nth-child(5),
.weight-cell {
    background-color: #e6e6f7; /* Light blue for Weight */
    font-weight: bold;
    color: #333;
}

/* Custom radio buttons */
.criteria-table input[type="radio"] {
    transform: scale(1.5);
    margin: 0 auto;
    display: block;
}

/* Row hover effect */
.criteria-table tbody tr:hover {
    background-color: rgba(0, 115, 170, 0.05);
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.admin-dashboard .form-actions {
    justify-content: flex-start;
}

button.submit-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.submit-button:hover {
    background-color: #005f8b;
}

/* Results Styles */
.ahp-results-container h2,
.ahp-view-results-container h2,
.ahp-comparison-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.organization-details {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.maturity-level {
    background-color: #eaf7ff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    text-align: center;
}

.maturity-level h3 {
    color: #0073aa;
    margin-top: 0;
}

.overall-score {
    font-size: 18px;
    margin-top: 15px;
}

.category-scores {
    margin-bottom: 30px;
}

/* Category Scores Section Layout */
.category-scores-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.chart-container {
    position: relative;
    margin: 20px auto;
    height: 400px;
    width: 100%;
    max-width: 600px;
}

.categories-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .category-scores-content {
        flex-direction: column;
    }
    
    .chart-container,
    .categories-grid {
        width: 100%;
    }
}

/* Comparison Controls and Tables */
.comparison-controls {
    margin: 15px 0;
    text-align: center;
}

.comparison-controls button {
    margin: 0 5px;
}

.category-table,
.ranking-table,
.comparison-table,
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.category-table th,
.category-table td,
.ranking-table th,
.ranking-table td,
.comparison-table th,
.comparison-table td,
.results-table th,
.results-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.category-table th,
.ranking-table th,
.comparison-table th,
.results-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* Recommendations Section */
.recommendations {
    background-color: #fff9e6;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.recommendations h3 {
    color: #d39e00;
    margin-top: 0;
}

.recommendations ul {
    margin: 15px 0 0;
    padding-left: 20px;
}

.recommendations li {
    margin-bottom: 10px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 20px;
    margin-top: 15px;
}

.recommendation {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.recommendation.highlight {
    border-left: 4px solid #ff9800;
}

.recommendation h4 {
    margin-top: 0;
    color: #333;
}

.detailed-results {
    margin-bottom: 30px;
}

/* Categories Grid Layout */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 20px;
    margin-bottom: 30px;
}

.category-score {
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.category-score.high-score {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
}

.category-score.medium-score {
    background-color: rgba(255, 152, 0, 0.1);
    border-color: #FF9800;
}

.category-score.low-score {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: #F44336;
}

.category-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.score-value {
    font-size: 1.5em;
    font-weight: bold;
    margin: 5px 0;
}

.weighted-score {
    color: #666;
    margin-bottom: 3px;
}

.weight-info {
    color: #666;
    font-size: 0.9em;
}

/* Detailed Category Analysis */
.category-accordion {
    margin-bottom: 15px;
}

.accordion-toggle {
    width: 100%;
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion-toggle.high-score {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
}

.accordion-toggle.medium-score {
    background-color: rgba(255, 152, 0, 0.1);
    border-color: #FF9800;
}

.accordion-toggle.low-score {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: #F44336;
}

.score-badge {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    margin-left: auto;
    margin-right: 10px;
}

.weight-badge {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    color: #666;
    margin-right: 15px;
}

.toggle-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.accordion-content {
    display: block;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.accordion-content.hidden {
    display: none;
}

/* Sensitivity Analysis */
.sensitivity-analysis {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.analysis-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 20px;
    margin-top: 15px;
}

.category-weights,
.criteria-weights,
.sensitivity-result {
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.slider-group {
    margin-bottom: 15px;
}

.slider-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.criteria-category-selector {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.criteria-category-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 3px 3px 0 0;
    border-bottom: none;
}

.criteria-category-btn:hover {
    background-color: #e0e0e0;
}

.criteria-category-btn.active {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.criteria-container {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0 3px 3px 3px;
    background-color: #f9f9f9;
}

.weight-total {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.weight-warning {
    color: #999;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.weight-warning.warning-active {
    display: block;
    color: red;
    font-weight: bold;
}

.sensitivity-score {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.sensitivity-note {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 15px;
}

.positive-change {
    color: #28a745;
    font-weight: bold;
}

.negative-change {
    color: #dc3545;
    font-weight: bold;
}

/* Actions Section */
.actions {
    margin-top: 30px;
    text-align: center;
}

.print-button,
.new-assessment-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    cursor: pointer;
}

.print-button {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.new-assessment-button {
    background-color: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

.print-button:hover {
    background-color: #e9ecef;
}

.new-assessment-button:hover {
    background-color: #005a87;
}

/* Admin Controls */
.admin-controls {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.update-weights-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
}

.update-weights-button:hover {
    background-color: #c82333;
}

/* Maturity Level */
.readiness-indicator {
    margin-top: 15px;
}

.level-label {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.score-display {
    font-size: 2em;
    font-weight: bold;
    color: #0073aa;
    margin: 5px 0 15px 0;
}

.progress-bar {
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #0073aa;
    border-radius: 10px;
    transition: width 0.5s;
}

.level-description {
    color: #666;
    font-style: italic;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .analysis-container {
        grid-template-columns: 1fr;
    }
    
    .categories-grid,
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .compare-button {
        display: block;
        margin: 10px 0;
        text-align: center;
    }
}

/* Previous Results Section */
.previous-results {
    margin-bottom: 30px;
}

/* Action Buttons */
.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.compare-button,
.project-link {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.compare-button:hover,
.project-link:hover {
    background-color: #005d87;
    color: white;
}

.project-link {
    background-color: #4CAF50;
}

.project-link:hover {
    background-color: #388E3C;
}

/* Print Styles */
@media print {
    .action-buttons,
    .sensitivity-analysis,
    .admin-controls,
    .actions {
        display: none;
    }
    
    .chart-container {
        page-break-inside: avoid;
    }
    
    .ahp-results-container {
        max-width: 100%;
        padding: 0;
    }
    
    .accordion-content {
        display: block !important;
    }
    
    .accordion-toggle {
        page-break-inside: avoid;
    }
    
    .recommendations-grid,
    .categories-grid {
        page-break-inside: avoid;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Selected cell highlighting */
.criteria-table td.score-cell.selected {
    background-color: rgba(0, 115, 170, 0.2);
}

/* Error and success messages */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.form-error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .criteria-table td.criterion-description {
        width: 40%;
    }
    
    .criteria-table th,
    .criteria-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .print-button,
    .new-assessment-button {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .submit-button,
    .print-button,
    .new-assessment-button {
        display: none;
    }
    
    .ahp-results-container {
        padding: 0;
    }
}

/* Sensitivity Analysis Styles */
.sensitivity-analysis {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.sensitivity-analysis h3 {
    margin-top: 0;
    color: #0073aa;
}

.sensitivity-controls {
    margin-top: 20px;
}

.weight-control {
    margin-bottom: 15px;
}

.weight-control label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: normal;
    overflow-wrap: break-word;
    word-break: normal;
    width: 100%;
}

.slider-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.slider-container input[type="range"] {
    flex: 1;
    margin-right: 10px;
}

.weight-value {
    margin-left: 10px;
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

.total-weight {
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    text-align: center;
}

#total-category-weight.warning,
.total-criteria-weight.warning {
    color: #ff0000;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.criteria-weights-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

button.recalculate-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

button.recalculate-button:hover {
    background-color: #005f8b;
}

.sensitivity-results {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.sensitivity-overall-score {
    background-color: #eaf7ff;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

.sensitivity-overall-score h4 {
    margin: 0;
    color: #0073aa;
}

.value-increased {
    color: #28a745;
    font-weight: bold;
}

.value-decreased {
    color: #dc3545;
    font-weight: bold;
}

.score-comparison {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.original-scores, .new-scores {
    flex: 1;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.original-scores h6, .new-scores h6 {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.original-scores ul, .new-scores ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.original-scores li, .new-scores li {
    margin-bottom: 8px;
}

.original-scores .total-score, .new-scores .total-score {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-weight: bold;
}

@media (max-width: 768px) {
    .score-comparison {
        flex-direction: column;
    }
    
    .original-scores, .new-scores {
        margin-bottom: 15px;
    }
}

/* Version comparison styles */
.version-comparison {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.version-comparison h3 {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 15px;
}

.current-version {
    font-weight: bold;
    background-color: #eaf7ff;
}

/* Admin Controls */
.admin-controls {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.admin-controls h3 {
    color: #333;
    margin-top: 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.admin-controls .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
}

.update-weights-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.update-weights-button:hover {
    background-color: #0056b3;
}

/* Organizations ranking styles */
.organizations-ranking {
    margin-bottom: 30px;
}

.ranking-table {
    margin-top: 15px;
}

.ranking-table a {
    color: #0073aa;
    text-decoration: none;
}

.ranking-table a:hover {
    text-decoration: underline;
}

/* Comparison chart */
.comparison-chart {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* View results form */
.ahp-view-results-container form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    margin: 0 auto;
}

/* Add to responsive styles */
@media (max-width: 768px) {
    .slider-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .slider-container input[type="range"] {
        width: 100%;
        margin-bottom: 5px;
    }
}

.score-explanation {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #0073aa;
}

.score-explanation p {
    margin: 5px 0;
}

/* Make weighted score column stand out */
.category-table td:nth-child(2),
.responses-table td:nth-child(3) {
    font-weight: bold;
    color: #0073aa;
}

.policy-areas-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.policy-areas-column {
    flex: 1;
    min-width: 45%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* Organization comparison styles */
.ahp-comparison-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.filters {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-weight: bold;
}

.policy-areas-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.policy-areas-column {
    flex: 1;
    min-width: 45%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
}

.checkbox-label:hover {
    background: #e9e9e9;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-button, .reset-button {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.filter-button {
    background: #0073aa;
    color: white;
    border: none;
}

.reset-button {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    text-decoration: none;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.comparison-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.score-cell {
    text-align: center;
    font-weight: bold;
}

.high-score {
    color: #4CAF50;
}

.medium-score {
    color: #FFC107;
}

.low-score {
    color: #F44336;
}

.no-results {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
    margin-top: 20px;
}

/* Assessment form styles */
.ahp-assessment-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.required {
    color: #F44336;
}

.criteria-container {
    margin-top: 30px;
}

.criteria-category {
    margin-bottom: 30px;
}

.criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.criteria-table th,
.criteria-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.criteria-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.criterion-description {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-cell {
    text-align: center;
}

.weight-cell {
    text-align: center;
}

.submit-button {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.submit-button:hover {
    background: #005177;
}

/* Make organization rows clearly clickable */
.organization-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.organization-row:hover {
    background-color: #f5f9ff !important;
}

/* Add a downward arrow to indicate expandable content */
.organization-row td:nth-child(2)::after {
    content: "▼";
    display: inline-block;
    margin-left: 8px;
    font-size: 10px;
    color: #888;
    transition: transform 0.3s ease;
}

/* Rotate the arrow when active */
.organization-row.active td:nth-child(2)::after {
    transform: rotate(180deg);
    color: #0073aa;
}

/* Detail row styling */
.details-row {
    transition: background-color 0.3s ease;
}

.details-container {
    padding: 15px;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    background-color: #f9f9f9;
}

/* Category scores styling */
.category-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.category-score {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease;
}

.category-score:hover {
    transform: translateY(-3px);
}

.category-name {
    font-weight: bold;
    margin-bottom: 8px;
}

.score-value {
    margin-top: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #0073aa;
    display: block;
    width: 100%;
    padding: 5px 0;
    border-radius: 3px;
    background-color: rgba(0,115,170,0.05);
}

.weight-info {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    padding-top: 5px;
    border-top: 1px dashed #ddd;
    width: 100%;
}

.weighted-score {
    font-size: 22px;
    font-weight: bold;
}

/* Compare button styling */
.comparison-actions {
    margin-bottom: 20px;
}

.compare-selected-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.compare-selected-btn:hover {
    background-color: #005d87;
}

/* Active row */
.organization-row.active {
    background-color: #e5f2f8;
}

/* Checkbox styling */
.compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive chart */
@media screen and (max-width: 768px) {
    .chart-container {
        padding: 15px;
    }
}

/* Assessment ID column styling */
.assessment-id-cell {
    font-family: monospace;
    letter-spacing: 0.5px;
    color: #666;
}

/* Highlight user's organization assessment ID */
.user-organization .assessment-id-cell {
    font-weight: bold;
    color: #0073aa;
    position: relative;
}

.user-organization .assessment-id-cell::after {
    content: "★";
    margin-left: 5px;
    color: #ffcc00;
}

/* Organization comparison enhancements */
.organization-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.organization-row:hover {
    background-color: #f0f0f0;
}

.organization-row.active {
    background-color: #e6f2f9;
    border-bottom: none;
}

.details-row td {
    padding: 0 !important;
}

.details-container {
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.category-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.category-score {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-score.high-score {
    background-color: rgba(76, 175, 80, 0.1);
}

.category-score.medium-score {
    background-color: rgba(255, 193, 7, 0.1);
}

.category-score.low-score {
    background-color: rgba(244, 67, 54, 0.1);
}

.category-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.score-value {
    font-size: 1.2em;
    font-weight: bold;
}

.comparison-actions {
    margin-bottom: 20px;
}

.compare-selected-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.compare-selected-btn:hover {
    background-color: #005a87;
}

.chart-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/**
 * Organization Comparison Styles
 */
.ahp-comparison-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.comparison-table th {
    background-color: #f6f6f6;
    font-weight: 600;
    color: #333;
}

.comparison-table tr:hover {
    background-color: #f9f9f9;
}

/* User's organization highlighting */
.user-organization {
    background-color: #ffffd7 !important;
    border-left: 4px solid #ffcc00;
}

.user-organization td {
    font-weight: 600;
}

.highlight-marker {
    background-color: #ffffd7;
    padding: 2px 5px;
    font-weight: bold;
    border: 1px solid #ffcc00;
    border-radius: 3px;
}

.user-organization-notice {
    background-color: #f0f8ff;
    border-left: 4px solid #0073aa;
    padding: 10px 15px;
    margin-bottom: 20px;
}

/* Chart container styling */
.chart-container {
    margin: 30px 0;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Expanded row styling */
.details-row {
    background-color: #f5f5f5;
}

.details-container {
    padding: 15px;
}

.details-container h4 {
    margin-top: 0;
    color: #0073aa;
}

.category-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.category-score {
    flex: 1 1 200px;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-score .category-name {
    margin-bottom: 10px;
    font-weight: 600;
}

.category-score .score-value {
    font-size: 1.5em;
    font-weight: bold;
}

.high-score {
    background-color: #d4edda;
    color: #155724;
}

.medium-score {
    background-color: #fff3cd;
    color: #856404;
}

.low-score {
    background-color: #f8d7da;
    color: #721c24;
}

/* Compare button styling */
.comparison-actions {
    margin-bottom: 20px;
}

.compare-selected-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.compare-selected-btn:hover {
    background-color: #005d87;
}

/* Active row */
.organization-row.active {
    background-color: #e5f2f8;
}

/* Checkbox styling */
.compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive chart */
@media screen and (max-width: 768px) {
    .chart-container {
        padding: 15px;
    }
}

/* Assessment ID column styling */
.assessment-id-cell {
    font-family: monospace;
    letter-spacing: 0.5px;
    color: #666;
}

/* Highlight user's organization assessment ID */
.user-organization .assessment-id-cell {
    font-weight: bold;
    color: #0073aa;
    position: relative;
}

.user-organization .assessment-id-cell::after {
    content: "★";
    margin-left: 5px;
    color: #ffcc00;
}

/* Chart container size adjustment */
.chart-container {
    max-width: 800px;
    margin: 30px auto;
}

.chart-container div {
    max-height: 400px;
    position: relative;
}

@media (max-width: 768px) {
    .chart-container div {
        max-height: 350px;
    }
}

/* Export Buttons */
.export-buttons {
    margin: 20px 0;
    display: flex;
    gap: 15px;
}

.export-buttons .button {
    min-width: 150px;
    text-align: center;
}

.admin-section .info {
    margin-top: 15px;
    font-style: italic;
    color: #666;
}

:root {
    --fu-primary: #004b87;       /* Primary blue color */
    --fu-secondary: #e74011;     /* Secondary orange/red color */
    --fu-light-grey: #f5f5f5;    /* Light grey background */
    --fu-dark-grey: #333333;     /* Dark grey text */
    --fu-accent: #00a3e0;        /* Accent blue color */
    --fu-light-blue: #e1f4fd;    /* Light blue background */
    --fu-hover: #0a6cb4;         /* Hover state blue */
    --fu-hover-light: #f2f8fc;   /* Hover state light */
}

/* Main navigation styling */
.main-nav {
    background-color: #004b87;
    margin-bottom: 20px;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    display: inline-block;
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #006bb3;
}

.main-nav li.active a {
    background-color: #ff5722;
}

/* User menu styling */
.main-nav li.user-menu {
    margin-left: auto;
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.main-nav li.user-menu span {
    color: white;
    padding: 0 10px;
    font-size: 0.9em;
}

.main-nav li.user-menu a {
    background-color: var(--fu-secondary);
    padding: 15px 20px;
    border-radius: 0 5px 5px 0;
}

.main-nav li.user-menu a:hover {
    background-color: #c63610;
}

/* Site header styling */
.site-header {
    background-color: #f8f8f8;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.site-header h1 {
    color: #004b87;
    margin: 0 0 20px 0;
    font-size: 1.8em;
}

/* Container styling */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer styling */
.site-footer {
    background-color: var(--fu-dark-grey);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.9em;
}

/* Main content area */
.main-content {
    min-height: 400px;
    padding: 0;
    display: block;
}

/* Buttons styling */
.button {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--fu-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: var(--fu-hover);
    text-decoration: none;
    color: white;
}

.button.primary {
    background-color: var(--fu-primary);
}

.button.secondary {
    background-color: var(--fu-secondary);
}

.button.delete {
    background-color: #e74011;
}

.button.delete:hover {
    background-color: #c63610;
}

/* Form styling */
form {
    background-color: var(--fu-light-grey);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--fu-dark-grey);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--fu-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 163, 224, 0.2);
}

/* Admin dashboard */
.admin-section {
    background-color: var(--fu-light-grey);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-section h3 {
    color: var(--fu-primary);
    border-bottom: 2px solid var(--fu-accent);
    padding-bottom: 10px;
    margin-top: 0;
}

/* Additional styles to match FU website and improve appearance */
body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--fu-dark-grey);
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

/* Page headings */
h2 {
    color: var(--fu-primary);
    font-size: 1.8em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--fu-accent);
    padding-bottom: 0.5em;
}

h3 {
    color: var(--fu-primary);
    font-size: 1.4em;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h4 {
    color: var(--fu-dark-grey);
    font-size: 1.2em;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-table th {
    background-color: var(--fu-primary);
    color: white;
    text-align: left;
    padding: 12px 15px;
}

.admin-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.admin-table tr:nth-child(even) {
    background-color: var(--fu-light-grey);
}

.admin-table tr:hover {
    background-color: var(--fu-hover-light);
}

/* Messages */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.message.info {
    background-color: #e3f2fd;
    border-color: var(--fu-accent);
    color: #0c5460;
}

.message.success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.message.error {
    background-color: #ffebee;
    border-color: var(--fu-secondary);
    color: #c62828;
}

.message.warning {
    background-color: #fff8e1;
    border-color: #ffc107;
    color: #ff8f00;
}

/* Card layout */
.card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-header h3 {
    margin: 0;
    color: var(--fu-primary);
}

.card-content {
    margin-bottom: 15px;
}

.card-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* Responsiveness */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav li.user-menu {
        margin-left: 0;
        flex-direction: column;
    }
    
    .main-nav li.user-menu a {
        border-radius: 0;
        width: 100%;
        text-align: center;
    }
    
    .main-nav li.user-menu span {
        padding: 10px;
        text-align: center;
    }
}

/* Home Page Styles - Updated */
.welcome-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.welcome-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0;
}

.welcome-header h2 {
    color: #004b87;
    font-size: 1.8em;
    margin-bottom: 1em;
    border-bottom: 2px solid #00a3e0;
    padding-bottom: 0.5em;
    display: inline-block;
}

.intro-text {
    font-size: 18px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    color: #333333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: #0073aa;
    text-align: center;
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 22px;
    text-align: center;
}

.feature-card p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.feature-card ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.feature-card li {
    margin-bottom: 8px;
}

.feature-card .button {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.info-section {
    background: #f2f7fb;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.info-section h3 {
    margin-top: 0;
    color: #333;
}

.app-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.main-content {
    padding: 20px 0;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 15px;
    right: 20px;
    background-color: #f8f8f8;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-switcher a {
    text-decoration: none;
    color: #333;
    padding: 3px 6px;
    margin: 0 3px;
}

.language-switcher a.active {
    background-color: #004b87;
    color: white;
    border-radius: 3px;
}

.language-switcher a:hover:not(.active) {
    background-color: #e5e5e5;
    border-radius: 3px;
}

/* End Language Switcher */

.login-button, .cancel-button {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    margin: 0 5px;
}

.login-button {
    background-color: #0073aa;
    color: white;
}

.login-button:hover {
    background-color: #005f8b;
}

.cancel-button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.cancel-button:hover {
    background-color: #e0e0e0;
}

/* Assessment Form Table Styles */
.criteria-table th[style*="text-align: left;"] {
    text-align: left;
}

.criteria-table th[style*="text-align: center;"] {
    text-align: center;
}

.criteria-table td.criterion-description {
    text-align: left;
}

.criteria-table td.score-cell {
    text-align: center;
}

.criteria-table td.weight-cell {
    text-align: center;
}

/* Specific styles for the comparison charts */
#chartContainer {
    max-width: 1000px !important;
    height: 500px !important;
    margin: 30px auto;
    padding: 40px 40px 70px 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

#scoreChartContainer {
    max-width: 1000px !important;
    height: 400px !important;
    margin: 30px auto;
    padding: 40px 40px 70px 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

#chartContainer canvas,
#scoreChartContainer canvas {
    max-height: 100%;
}

@media (max-width: 768px) {
    #chartContainer,
    #scoreChartContainer {
        height: 350px !important;
        padding: 25px 25px 55px 25px;
    }
}

/* Criterion tooltips */
.criterion-description {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.criterion-tooltip {
    position: relative;
    display: inline-block;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.info-icon:hover {
    background-color: #0056b3;
}

.tooltip-content {
    display: none;
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    white-space: pre-line;
}

.criterion-tooltip:hover .tooltip-content {
    display: block;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-left: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    transform-origin: center;
    transform: translateY(-50%) rotate(45deg);
}

.tooltip-content p,
.tooltip-content span,
.tooltip-content div {
    margin: 0 0 10px 0;
    text-align: left;
    width: 100%;
    display: block;
}

.tooltip-content .scoring-guide {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: left;
}

.tooltip-content .scoring-guide p {
    margin-bottom: 5px;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tooltip-content {
        width: 280px;
        left: 50%;
        top: calc(100% + 10px);
        transform: translateX(-50%);
    }

    .tooltip-content::before {
        left: 50%;
        top: -6px;
        transform: translateX(-50%) rotate(135deg);
    }
} 