/**
 * Resolution Path Assessment Quiz
 * Brand-compliant styles with Plus Jakarta Sans
 * Primary: #1A95AD | Secondary/Accent: #FEA647
 */

/* ============================================
   CSS Variables & Base Styles
   ============================================ */

:root {
    --rpq-primary: #1A95AD;
    --rpq-primary-dark: #157A8F;
    --rpq-primary-light: #E8F6F8;
    --rpq-secondary: #FEA647;
    --rpq-secondary-dark: #E8932D;
    --rpq-secondary-light: #FFF5E9;
    --rpq-accent: #FEA647;
    --rpq-text-dark: #1F2937;
    --rpq-text-medium: #4B5563;
    --rpq-text-light: #6B7280;
    --rpq-bg-white: #FFFFFF;
    --rpq-bg-light: #F9FAFB;
    --rpq-bg-warm: #FFFCF8;
    --rpq-border: #E5E7EB;
    --rpq-border-focus: #1A95AD;
    --rpq-success: #059669;
    --rpq-success-light: #ECFDF5;
    --rpq-warning: #D97706;
    --rpq-warning-light: #FFFBEB;
    --rpq-error: #DC2626;
    --rpq-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --rpq-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --rpq-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --rpq-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --rpq-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --rpq-radius-sm: 6px;
    --rpq-radius-md: 10px;
    --rpq-radius-lg: 16px;
    --rpq-radius-xl: 24px;
    --rpq-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Container
   ============================================ */

.rpq-container {
    font-family: var(--rpq-font-family);
    max-width: 720px;
    margin: 40px auto;
    background: var(--rpq-bg-white);
    border-radius: var(--rpq-radius-xl);
    box-shadow: var(--rpq-shadow-xl);
    overflow: hidden;
    position: relative;
}

.rpq-container *,
.rpq-container *::before,
.rpq-container *::after {
    box-sizing: border-box;
}

/* ============================================
   Progress Bar
   ============================================ */

.rpq-progress-wrapper {
    padding: 20px 32px;
    background: linear-gradient(135deg, var(--rpq-primary-light) 0%, var(--rpq-bg-light) 100%);
    border-bottom: 1px solid var(--rpq-border);
}

.rpq-progress-bar {
    height: 8px;
    background: rgba(26, 149, 173, 0.15);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.rpq-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--rpq-primary) 0%, var(--rpq-secondary) 100%);
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rpq-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: rpq-shimmer 2s infinite;
}

@keyframes rpq-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.rpq-progress-text {
    margin-top: 12px;
    text-align: center;
}

#rpq-progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--rpq-primary);
    letter-spacing: 0.02em;
}

/* ============================================
   Header
   ============================================ */

.rpq-header {
    text-align: center;
    padding: 32px 32px 24px;
    background: var(--rpq-bg-white);
}

.rpq-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--rpq-primary) 0%, var(--rpq-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(26, 149, 173, 0.3);
}

.rpq-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.rpq-title {
    font-family: var(--rpq-font-family);
    font-size: 28px;
    font-weight: 800;
    color: var(--rpq-text-dark);
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.rpq-subtitle {
    font-size: 16px;
    color: var(--rpq-text-medium);
    margin: 0;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================
   Content Area
   ============================================ */

.rpq-content {
    padding: 0 32px 32px;
    min-height: 400px;
}

/* ============================================
   Screens
   ============================================ */

.rpq-screen {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rpq-screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Start Screen
   ============================================ */

.rpq-start-content {
    text-align: center;
    padding: 20px 0 10px;
}

.rpq-start-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--rpq-primary);
    opacity: 0.9;
}

.rpq-start-icon svg {
    width: 100%;
    height: 100%;
}

.rpq-start-content h3 {
    font-family: var(--rpq-font-family);
    font-size: 22px;
    font-weight: 700;
    color: var(--rpq-text-dark);
    margin: 0 0 16px;
}

.rpq-start-content p {
    font-size: 16px;
    color: var(--rpq-text-medium);
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.rpq-start-content p strong {
    color: var(--rpq-primary);
    font-weight: 600;
}

.rpq-start-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.rpq-start-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--rpq-text-medium);
}

.rpq-start-features li svg {
    width: 18px;
    height: 18px;
    color: var(--rpq-success);
    flex-shrink: 0;
}

/* ============================================
   Buttons
   ============================================ */

.rpq-btn {
    font-family: var(--rpq-font-family);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border: none;
    border-radius: var(--rpq-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--rpq-transition);
    text-decoration: none;
    line-height: 1;
}

.rpq-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rpq-btn-primary {
    background: linear-gradient(135deg, var(--rpq-primary) 0%, var(--rpq-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(26, 149, 173, 0.35);
}

.rpq-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 149, 173, 0.45);
}

.rpq-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.rpq-btn-primary:disabled {
    background: var(--rpq-border);
    color: var(--rpq-text-light);
    box-shadow: none;
    cursor: not-allowed;
}

.rpq-btn-secondary {
    background: var(--rpq-bg-light);
    color: var(--rpq-text-medium);
    border: 1px solid var(--rpq-border);
}

.rpq-btn-secondary:hover:not(:disabled) {
    background: var(--rpq-bg-white);
    border-color: var(--rpq-primary);
    color: var(--rpq-primary);
}

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

.rpq-btn-accent {
    background: linear-gradient(135deg, var(--rpq-secondary) 0%, var(--rpq-secondary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(254, 166, 71, 0.35);
}

.rpq-btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 166, 71, 0.45);
}

.rpq-btn-start {
    padding: 16px 36px;
    font-size: 17px;
}

/* ============================================
   Questions
   ============================================ */

.rpq-question {
    display: none;
    animation: rpq-fadeIn 0.4s ease;
}

.rpq-question.active {
    display: block;
}

@keyframes rpq-fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rpq-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--rpq-primary-light);
    color: var(--rpq-primary);
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 16px;
}

.rpq-question-text {
    font-family: var(--rpq-font-family);
    font-size: 20px;
    font-weight: 700;
    color: var(--rpq-text-dark);
    margin: 0 0 24px;
    line-height: 1.4;
}

.rpq-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rpq-option {
    position: relative;
}

.rpq-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.rpq-option-label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: var(--rpq-bg-light);
    border: 2px solid transparent;
    border-radius: var(--rpq-radius-md);
    cursor: pointer;
    transition: var(--rpq-transition);
}

.rpq-option-label:hover {
    background: var(--rpq-bg-white);
    border-color: var(--rpq-primary);
    box-shadow: var(--rpq-shadow-md);
}

.rpq-option input:checked + .rpq-option-label {
    background: var(--rpq-primary-light);
    border-color: var(--rpq-primary);
    box-shadow: 0 0 0 3px rgba(26, 149, 173, 0.15);
}

.rpq-option-radio {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--rpq-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--rpq-transition);
    margin-top: 1px;
}

.rpq-option input:checked + .rpq-option-label .rpq-option-radio {
    border-color: var(--rpq-primary);
    background: var(--rpq-primary);
}

.rpq-option input:checked + .rpq-option-label .rpq-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.rpq-option-content {
    flex: 1;
}

.rpq-option-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--rpq-text-dark);
    line-height: 1.4;
}

.rpq-option input:checked + .rpq-option-label .rpq-option-title {
    color: var(--rpq-primary-dark);
}

/* ============================================
   Navigation
   ============================================ */

.rpq-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rpq-border);
    gap: 12px;
}

.rpq-btn-submit {
    margin-left: auto;
}

/* ============================================
   Results Screen
   ============================================ */

.rpq-results-wrapper {
    padding: 20px 0;
}

.rpq-result-header {
    text-align: center;
    margin-bottom: 32px;
}

.rpq-result-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rpq-result-icon.mediation {
    background: linear-gradient(135deg, var(--rpq-success) 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.rpq-result-icon.collaborative {
    background: linear-gradient(135deg, var(--rpq-primary) 0%, var(--rpq-primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(26, 149, 173, 0.3);
}

.rpq-result-icon.court {
    background: linear-gradient(135deg, var(--rpq-secondary) 0%, var(--rpq-secondary-dark) 100%);
    box-shadow: 0 4px 14px rgba(254, 166, 71, 0.3);
}

.rpq-result-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.rpq-result-title {
    font-family: var(--rpq-font-family);
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
}

.rpq-result-title.mediation { color: var(--rpq-success); }
.rpq-result-title.collaborative { color: var(--rpq-primary); }
.rpq-result-title.court { color: var(--rpq-secondary-dark); }

.rpq-result-subtitle {
    font-size: 16px;
    color: var(--rpq-text-medium);
    margin: 0;
}

/* Result Cards */
.rpq-result-card {
    background: var(--rpq-bg-light);
    border-radius: var(--rpq-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.rpq-result-card h4 {
    font-family: var(--rpq-font-family);
    font-size: 16px;
    font-weight: 700;
    color: var(--rpq-text-dark);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rpq-result-card h4 svg {
    width: 20px;
    height: 20px;
    color: var(--rpq-primary);
}

.rpq-result-card p {
    font-size: 15px;
    color: var(--rpq-text-medium);
    line-height: 1.6;
    margin: 0;
}

.rpq-result-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rpq-result-card ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
    color: var(--rpq-text-medium);
    border-bottom: 1px solid var(--rpq-border);
}

.rpq-result-card ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rpq-result-card ul li svg {
    width: 18px;
    height: 18px;
    color: var(--rpq-success);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Score Breakdown */
.rpq-score-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.rpq-score-item {
    background: var(--rpq-bg-white);
    border: 1px solid var(--rpq-border);
    border-radius: var(--rpq-radius-md);
    padding: 16px;
    text-align: center;
}

.rpq-score-item.recommended {
    border-color: var(--rpq-primary);
    background: var(--rpq-primary-light);
}

.rpq-score-bar {
    height: 6px;
    background: var(--rpq-border);
    border-radius: 100px;
    margin-bottom: 12px;
    overflow: hidden;
}

.rpq-score-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.rpq-score-bar-fill.mediation { background: var(--rpq-success); }
.rpq-score-bar-fill.collaborative { background: var(--rpq-primary); }
.rpq-score-bar-fill.court { background: var(--rpq-secondary); }

.rpq-score-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--rpq-text-medium);
}

.rpq-score-item.recommended .rpq-score-label {
    color: var(--rpq-primary);
}

/* CTA Section */
.rpq-cta-section {
    background: linear-gradient(135deg, var(--rpq-primary) 0%, var(--rpq-primary-dark) 100%);
    border-radius: var(--rpq-radius-lg);
    padding: 28px;
    text-align: center;
    margin-top: 24px;
}

.rpq-cta-section h4 {
    font-family: var(--rpq-font-family);
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px;
}

.rpq-cta-section p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px;
}

.rpq-btn-cta {
    background: white;
    color: var(--rpq-primary);
    padding: 14px 32px;
    font-weight: 700;
}

.rpq-btn-cta:hover {
    background: var(--rpq-secondary);
    color: white;
    transform: translateY(-2px);
}

/* Restart Button */
.rpq-restart {
    text-align: center;
    margin-top: 20px;
}

.rpq-btn-restart {
    font-size: 14px;
    padding: 10px 20px;
    background: transparent;
    color: var(--rpq-text-light);
    border: 1px solid var(--rpq-border);
}

.rpq-btn-restart:hover {
    color: var(--rpq-primary);
    border-color: var(--rpq-primary);
    background: var(--rpq-primary-light);
}

/* ============================================
   Footer
   ============================================ */

.rpq-footer {
    padding: 20px 32px;
    background: var(--rpq-bg-light);
    border-top: 1px solid var(--rpq-border);
}

.rpq-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--rpq-text-light);
    line-height: 1.5;
    margin: 0;
}

.rpq-disclaimer svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--rpq-text-light);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .rpq-container {
        margin: 20px 16px;
        border-radius: var(--rpq-radius-lg);
    }
    
    .rpq-progress-wrapper {
        padding: 16px 20px;
    }
    
    .rpq-header {
        padding: 24px 20px 20px;
    }
    
    .rpq-title {
        font-size: 24px;
    }
    
    .rpq-subtitle {
        font-size: 15px;
    }
    
    .rpq-content {
        padding: 0 20px 24px;
    }
    
    .rpq-start-features {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .rpq-question-text {
        font-size: 18px;
    }
    
    .rpq-option-label {
        padding: 14px 16px;
    }
    
    .rpq-navigation {
        flex-wrap: wrap;
    }
    
    .rpq-btn-prev {
        order: 2;
        flex: 1;
    }
    
    .rpq-btn-next,
    .rpq-btn-submit {
        order: 1;
        flex: 1;
        margin-left: 0 !important;
    }
    
    .rpq-score-breakdown {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .rpq-result-title {
        font-size: 22px;
    }
    
    .rpq-footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .rpq-container {
        margin: 12px;
    }
    
    .rpq-icon {
        width: 48px;
        height: 48px;
    }
    
    .rpq-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .rpq-title {
        font-size: 22px;
    }
    
    .rpq-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .rpq-btn-start {
        padding: 14px 28px;
        font-size: 16px;
        width: 100%;
    }
    
    .rpq-result-card {
        padding: 20px;
    }
    
    .rpq-cta-section {
        padding: 24px 20px;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes rpq-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.rpq-btn-primary:not(:disabled):hover {
    animation: rpq-pulse 0.3s ease;
}

/* Accessibility */
.rpq-option input:focus + .rpq-option-label {
    outline: 2px solid var(--rpq-primary);
    outline-offset: 2px;
}

.rpq-btn:focus-visible {
    outline: 2px solid var(--rpq-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .rpq-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .rpq-btn,
    .rpq-navigation,
    .rpq-cta-section {
        display: none;
    }
}
