/* Public Styles for Agile Maturity Assessment */

:root {
    --ama-primary: #3498db;
    --ama-primary-dark: #2980b9;
    --ama-secondary: #6c757d;
    --ama-success: #28a745;
    --ama-danger: #dc3545;
    --ama-warning: #ffc107;
    --ama-light: #f8f9fa;
    --ama-dark: #212529;
    --ama-text: #212529;
    --ama-border: #dee2e6;
    --ama-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --ama-radius: 8px;
}

.ama-assessment {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--ama-text);
}

.ama-assessment * {
    box-sizing: border-box;
}

.ama-assessment h1,
.ama-assessment h2,
.ama-assessment h3,
.ama-assessment h4,
.ama-assessment p,
.ama-assessment span,
.ama-assessment label,
.ama-assessment div {
    color: var(--ama-text);
}

/* Screens */
.ama-screen {
    min-height: 80vh;
}

/* Welcome Screen */
.ama-welcome-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* Assessment choices */
.ama-assessment-choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.ama-assessment-choice {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.ama-assessment-choice:hover {
    border-color: var(--ama-primary);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.ama-assessment-choice-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ama-assessment-choice-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #fff;
}

.ama-assessment-choice-content h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: var(--ama-text);
}

.ama-assessment-choice-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Divider */
.ama-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.ama-divider::before,
.ama-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.ama-divider span {
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Compact action card */
.ama-action-card-compact {
    padding: 20px !important;
}

.ama-action-card-compact h3 {
    margin-bottom: 15px !important;
    font-size: 16px !important;
}

/* Inline form */
.ama-form-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.ama-form-inline input {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
}

.ama-form-inline .ama-code-input {
    max-width: 100px;
    flex: 0 0 auto;
}

.ama-form-inline button {
    flex: 0 0 auto;
}

/* Back button */
.ama-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.ama-btn-back:hover {
    background: #f5f5f5;
    color: #333;
}

.ama-btn-back .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ama-logo {
    margin-bottom: 20px;
}

.ama-welcome-container h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--ama-text);
}

.ama-subtitle {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Action Cards */
.ama-action-card {
    background: #fff;
    border: 1px solid var(--ama-border);
    border-radius: var(--ama-radius);
    padding: 30px;
    margin-bottom: 25px;
    text-align: left;
    box-shadow: var(--ama-shadow);
}

.ama-action-card h3 {
    margin: 0 0 8px 0;
    color: var(--ama-text);
}

.ama-action-card > p {
    color: #495057;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Forms */
.ama-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ama-form-row input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ama-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.ama-form-row input:focus {
    outline: none;
    border-color: var(--ama-primary);
}

.ama-code-input {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    text-align: center;
    font-size: 1.3rem !important;
}

/* Buttons */
.ama-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.ama-btn-primary {
    background: var(--ama-primary);
    color: #fff;
}

.ama-btn-primary:hover {
    background: var(--ama-primary-dark);
}

.ama-btn-secondary {
    background: var(--ama-light);
    color: var(--ama-text);
    border: 2px solid var(--ama-border);
}

.ama-btn-secondary:hover {
    background: #e9ecef;
}

.ama-btn-success {
    background: #27ae60;
    color: #fff;
    border: none;
}

.ama-btn-success:hover {
    background: #219a52;
}

.ama-btn-copy {
    background: transparent;
    color: var(--ama-primary);
    border: 2px solid var(--ama-primary);
}

.ama-btn-copy:hover {
    background: var(--ama-primary);
    color: #fff;
}

.ama-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Session Created Screen */
.ama-session-created {
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
}

.ama-success-icon {
    width: 80px;
    height: 80px;
    background: var(--ama-success);
    color: #fff;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ama-session-code {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--ama-primary);
    padding: 20px;
    background: var(--ama-light);
    border-radius: 8px;
    margin: 25px 0;
    font-family: monospace;
}

.ama-session-created .ama-btn {
    margin: 5px;
}

/* Main Layout */
.ama-main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar */
.ama-sidebar {
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
    padding: 25px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.ama-session-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ama-border);
    margin-bottom: 20px;
}

.ama-session-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.ama-session-code-display {
    background: var(--ama-light);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 15px;
}

.ama-session-code-display code {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ama-primary);
    letter-spacing: 2px;
}

.ama-participants-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #495057;
}

/* Radar Chart */
.ama-radar-container {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 20px;
}

/* Legend */
.ama-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ama-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 4px 8px;
    background: var(--ama-light);
    border-radius: 4px;
}

.ama-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Global Stats */
.ama-global-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ama-stat {
    text-align: center;
    padding: 15px;
    background: var(--ama-light);
    border-radius: 8px;
}

.ama-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ama-primary);
}

.ama-stat-label {
    font-size: 0.75rem;
    color: #495057;
    text-transform: uppercase;
}

/* Content Area */
.ama-content {
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
    padding: 30px;
}

/* Chapter Navigation */
.ama-chapter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ama-border);
}

.ama-chapter-tab {
    padding: 10px 18px;
    background: var(--ama-light);
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ama-chapter-tab:hover {
    background: #e9ecef;
}

.ama-chapter-tab.active {
    background: var(--ama-primary);
    color: #fff;
}

.ama-chapter-tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ama-chapter-tab-progress {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Questions */
.ama-chapter-section {
    display: none;
}

.ama-chapter-section.active {
    display: block;
}

.ama-chapter-title {
    font-size: 1.4rem;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ama-chapter-title-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.ama-chapter-description {
    color: #495057;
    margin-bottom: 25px;
}

.ama-question {
    background: var(--ama-light);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ama-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ama-question-text {
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--ama-text);
}

.ama-question-description {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 15px;
    font-style: italic;
}

/* Score Buttons */
.ama-score-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ama-score-btn {
    flex: 1;
    min-width: 60px;
    padding: 15px 10px;
    border: 2px solid var(--ama-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.ama-score-btn:hover {
    border-color: var(--ama-primary);
    background: rgba(52, 152, 219, 0.1);
}

.ama-score-btn.selected {
    border-color: var(--ama-primary);
    background: var(--ama-primary);
    color: #fff;
}

.ama-score-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.ama-score-label {
    display: block;
    font-size: 0.65rem;
    margin-top: 5px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Navigation */
.ama-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--ama-border);
}

.ama-progress {
    flex-grow: 1;
    height: 8px;
    background: var(--ama-light);
    border-radius: 4px;
    overflow: hidden;
}

.ama-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ama-primary), #2ecc71);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Results Screen */
.ama-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ama-results-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Results Header */
.ama-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
    padding: 25px 30px;
    margin-bottom: 30px;
    gap: 30px;
}

.ama-results-session-info {
    flex: 1;
}

.ama-results-session-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ama-text);
    margin-bottom: 8px;
}

.ama-results-session-meta {
    display: flex;
    gap: 25px;
    font-size: 0.95rem;
    color: #666;
}

.ama-results-session-meta code {
    background: var(--ama-light);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--ama-primary);
}

.ama-results-summary {
    display: flex;
    gap: 20px;
}

.ama-summary-item {
    text-align: center;
    padding: 15px 25px;
    background: var(--ama-light);
    border-radius: var(--ama-radius);
    min-width: 100px;
}

.ama-summary-item.ama-summary-main {
    background: var(--ama-primary);
}

.ama-summary-item.ama-summary-main .ama-summary-value,
.ama-summary-item.ama-summary-main .ama-summary-label {
    color: #fff;
}

.ama-summary-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ama-text);
    line-height: 1.2;
}

.ama-summary-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* Results Body */
.ama-results-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Results Section */
.ama-results-section {
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
    padding: 25px;
    margin-bottom: 30px;
}

.ama-results-section-collective {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ama-results-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ama-border);
    font-size: 1.3rem;
    color: var(--ama-text);
}

.ama-results-section-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--ama-primary);
}

.ama-results-section-collective .ama-results-section-title .dashicons {
    color: #27ae60;
}

.ama-results-section-score {
    margin-left: auto;
    font-size: 1rem;
    font-weight: normal;
    color: #666;
}

.ama-results-section-score strong {
    font-size: 1.4rem;
    color: var(--ama-primary);
}

.ama-results-section-collective .ama-results-section-score strong {
    color: #27ae60;
}

.ama-results-section .ama-results-body {
    margin-bottom: 0;
}

.ama-results-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.ama-results-radar {
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
    padding: 30px;
}

.ama-results-details {
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: var(--ama-shadow);
    padding: 30px;
}

.ama-result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--ama-border);
}

.ama-result-item:last-child {
    border-bottom: none;
}

.ama-result-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 15px;
}

.ama-result-name {
    flex-grow: 1;
    font-weight: 500;
}

.ama-result-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ama-primary);
    margin-left: 15px;
}

.ama-result-bar {
    width: 100px;
    height: 10px;
    background: var(--ama-light);
    border-radius: 5px;
    overflow: hidden;
}

.ama-result-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.ama-results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Loader */
.ama-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ama-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--ama-light);
    border-top-color: var(--ama-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Toast */
.ama-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--ama-dark);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(calc(100% + 30px));
    transition: transform 0.3s ease;
}

.ama-toast.show {
    transform: translateX(0);
}

.ama-toast.success {
    background: var(--ama-success);
}

.ama-toast.error {
    background: var(--ama-danger);
}

/* Responsive */
@media (max-width: 992px) {
    .ama-main-layout {
        grid-template-columns: 1fr;
    }
    
    .ama-sidebar {
        position: relative;
        top: 0;
    }
    
    .ama-results-layout {
        grid-template-columns: 1fr;
    }
    
    .ama-results-body {
        grid-template-columns: 1fr;
    }
    
    .ama-results-header {
        flex-direction: column;
        text-align: center;
    }
    
    .ama-results-session-meta {
        justify-content: center;
    }
    
    .ama-results-summary {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .ama-welcome-container h1 {
        font-size: 1.6rem;
    }
    
    .ama-session-code {
        font-size: 2rem;
        letter-spacing: 5px;
    }
    
    .ama-score-buttons {
        gap: 5px;
    }
    
    .ama-score-btn {
        min-width: 50px;
        padding: 12px 5px;
    }
    
    .ama-score-value {
        font-size: 1.2rem;
    }
    
    .ama-score-label {
        display: none;
    }
    
    .ama-navigation {
        flex-wrap: wrap;
    }
    
    .ama-progress {
        order: -1;
        width: 100%;
    }
}

/* Modal Overlay */
.ama-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.ama-modal-box {
    background: #fff;
    border-radius: var(--ama-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ama-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: #fff;
}

.ama-modal-header .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.ama-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.ama-modal-body {
    padding: 25px;
}

.ama-modal-body p {
    margin: 0 0 15px 0;
    color: var(--ama-text);
    line-height: 1.6;
}

.ama-modal-body p:last-child {
    margin-bottom: 0;
}

.ama-modal-body strong {
    color: var(--ama-primary);
}

.ama-modal-actions {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    background: var(--ama-light);
    border-top: 1px solid var(--ama-border);
}

.ama-modal-actions .ama-btn {
    flex: 1;
    justify-content: center;
}

@media (max-width: 500px) {
    .ama-modal-actions {
        flex-direction: column;
    }
}
