/**
 * Styles for Eyewitness Experiment
 * World-Class Clean Design
 */

/* Experiment links are now enabled for district competition */

/* ============================================
   HOMEPAGE STYLES
   ============================================ */

.eyewitness-homepage {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: #ffffff;
}

.eyewitness-hero {
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8a 100%);
    color: #ffffff;
    padding: 120px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.eyewitness-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.eyewitness-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.eyewitness-hero-title {
    font-size: 64px;
    font-weight: 700;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
    line-height: 1.1;
}

.eyewitness-hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
}

.eyewitness-content-section {
    padding: 80px 20px;
    background: #ffffff;
}

.eyewitness-container {
    max-width: 1200px;
    margin: 0 auto;
}

.eyewitness-two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-top: 40px;
}

.eyewitness-column {
    padding: 0;
}

.eyewitness-section-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #2271b1;
    line-height: 1.2;
}

.eyewitness-text {
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 20px 0;
    color: #4a5568;
}

.eyewitness-text strong {
    color: #2271b1;
    font-weight: 600;
}

.eyewitness-cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.eyewitness-cta-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background: #ffffff;
    padding: 60px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.eyewitness-cta-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1a202c;
}

.eyewitness-cta-text {
    font-size: 20px;
    color: #4a5568;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.eyewitness-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8a 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    padding: 18px 48px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.eyewitness-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.eyewitness-cta-button:active {
    transform: translateY(0);
}

.eyewitness-stats-section {
    padding: 80px 20px;
    background: #ffffff;
}

.eyewitness-stats-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 60px 0;
    color: #1a202c;
}

.eyewitness-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.eyewitness-stat-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.eyewitness-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #2271b1;
}

.eyewitness-stat-number {
    font-size: 56px;
    font-weight: 700;
    color: #2271b1;
    margin: 0 0 16px 0;
    line-height: 1;
}

.eyewitness-stat-label {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eyewitness-hero {
        padding: 80px 20px 60px;
    }
    
    .eyewitness-hero-title {
        font-size: 42px;
    }
    
    .eyewitness-hero-subtitle {
        font-size: 20px;
    }
    
    .eyewitness-content-section,
    .eyewitness-cta-section,
    .eyewitness-stats-section {
        padding: 60px 20px;
    }
    
    .eyewitness-two-column {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .eyewitness-cta-box {
        padding: 40px 30px;
    }
    
    .eyewitness-cta-title {
        font-size: 32px;
    }
    
    .eyewitness-stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ============================================
   EXPERIMENT PAGE STYLES (Enhanced)
   ============================================ */

.eyewitness-consent-form,
.eyewitness-experiment {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

.consent-container,
.experiment-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 50px;
    margin-top: 20px;
}

.consent-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e8ecf0;
}

.consent-header h1 {
    color: #1a202c;
    margin-bottom: 12px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.consent-content {
    margin-bottom: 40px;
    line-height: 1.7;
}

.info-card {
    background: #f8fafc;
    border-left: 4px solid #3498db;
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 8px;
    transition: all 0.2s;
}

.info-card:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card.highlight {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.info-card h2 {
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.info-card p {
    color: #475569;
    margin-bottom: 12px;
    font-size: 15px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card ul {
    margin: 12px 0 12px 20px;
    color: #475569;
}

.info-card ul li {
    margin-bottom: 8px;
    font-size: 15px;
}

.time-estimate {
    color: #64748b;
    font-style: italic;
    margin-top: 12px;
}

.form-section {
    background: #f8fafc;
    padding: 32px;
    border-radius: 12px;
    margin-top: 40px;
}

.form-title {
    color: #1e293b;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-description {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
}

.form-group select:hover {
    border-color: #cbd5e1;
}

.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.consent-checkbox {
    margin: 32px 0;
    padding: 24px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.consent-checkbox:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.consent-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
}

.consent-checkbox input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #3498db;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 17px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

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

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary svg {
    transition: transform 0.3s;
}

.btn-primary:hover:not(:disabled) svg {
    transform: translateX(4px);
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

/* Experiment Interface */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.3s;
}

/* Step visibility management - no inline styles, class-based only */
/* CRITICAL: Use child selector to prevent parent .experiment-step from hiding children */
.experiment-container > .experiment-step {
    display: none;
}

.experiment-container > .experiment-step.active {
    display: block;
}

/* Fallback for any nested steps (shouldn't happen, but defensive) */
.experiment-step {
    display: none;
}

.experiment-step.active {
    display: block;
}

/* Step visibility is handled by .experiment-step.active class above */
/* No need for redundant ID selectors - class selector has sufficient specificity */

/* Hidden utility class for other elements */
.hidden {
    display: none;
}

.instruction-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #34495e;
}

.suspect-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.suspect-photo {
    max-width: 300px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: 3px solid #333;
    background: #f5f5f5;
    /* ID photo styling */
    filter: grayscale(20%) contrast(1.1) brightness(0.95);
    aspect-ratio: 3/4;
    object-fit: cover;
}

.description-box {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.description-box h3 {
    margin-top: 0;
    color: #2c3e50;
}

.photo-selection-area {
    margin-bottom: 30px;
}

.selection-instruction {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.photo-item {
    position: relative;
    cursor: pointer;
    border: 3px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
    aspect-ratio: 3/4; /* ID photo aspect ratio (portrait) */
    background: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-item:hover {
    border-color: #3498db;
    transform: scale(1.05);
}

.photo-item.selected {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Style to look like ID photos/mugshots */
    background: #f0f0f0;
    border: 2px solid #333;
    filter: grayscale(20%) contrast(1.1) brightness(0.95);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(39, 174, 96, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
}

.photo-item.selected .photo-overlay {
    display: flex;
}

.checkmark {
    color: white;
    font-size: 48px;
    font-weight: bold;
}

.selection-counter {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat-value {
    font-size: 48px;
    font-weight: bold;
    color: #3498db;
    margin: 10px 0;
}

.debriefing {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    line-height: 1.6;
}

.error-message {
    color: #c33;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .eyewitness-consent-form,
    .eyewitness-experiment {
        padding: 10px;
    }
    
    .consent-container,
    .experiment-container {
        padding: 24px;
        border-radius: 8px;
    }
    
    .consent-header h1 {
        font-size: 24px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-section {
        padding: 24px;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

/* Witness Description Form Styling */
#witness-description-form {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.question-group {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e8ecf0;
}

.question-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.question-group h3 {
    color: #1e293b;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 25px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #2271b1;
    display: inline-block;
    width: 100%;
}

.question-group .form-field {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.question-group .form-field label {
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0;
}

.question-group .form-field label strong {
    font-weight: 600;
    color: #1e293b;
}

.question-group .form-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.question-group .form-field select:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.question-group .form-field select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
    background-color: #fff;
}

.question-group .form-field select:required:invalid {
    color: #94a3b8;
}

/* Two-column grid for better alignment on larger screens */
@media (min-width: 768px) {
    .question-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 30px;
    }
    
    .question-group h3 {
        grid-column: 1 / -1;
        margin-bottom: 10px;
    }
    
    .question-group .form-field {
        margin-bottom: 0;
    }
}

/* Single column on mobile */
@media (max-width: 767px) {
    .question-group {
        display: block;
    }
    
    .question-group .form-field {
        margin-bottom: 20px;
    }
}

/* Scene Reference Photo Styling */
.scene-reference {
    background: #f0f6fc;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #2271b1;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.scene-reference h3 {
    color: #2271b1;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.scene-reference img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: block;
    margin: 0 auto;
}

.scene-reference p {
    font-size: 14px;
    color: #64748b;
    margin-top: 12px;
    font-style: italic;
}

/* Scene Display Container */
.scene-display {
    max-width: 900px;
    margin: 30px auto;
    text-align: center;
}

.scene-display img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Tic-Tac-Toe Game Board - Layout handled by inline styles in template */
#game-board {
    /* Grid layout is in inline style in template - no need to override */
    box-sizing: border-box;
}

#game-board .game-cell {
    /* Dimensions handled by grid parent - cells fill grid cells */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 48px;
    font-weight: bold;
    transition: all 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

#game-board .game-cell:hover:not(.disabled) {
    background: #f0f6fc;
    border-color: #135e96;
    transform: scale(1.02);
}

#game-board .game-cell.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

#game-board .game-cell.x {
    color: #2271b1;
}

#game-board .game-cell.o {
    color: #d63638;
}

/* Submit button styling for witness description form */
#witness-description-form .btn-primary {
    margin-top: 30px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* ============================================
   HIDE FOOTER (User Request)
   ============================================ */

/* Hide footer - use more specific selectors to avoid !important */
/* BUT: Don't hide the eyewitness version footer */
body footer:not(.eyewitness-version-footer),
body .site-footer:not(.eyewitness-version-footer),
body #footer:not(.eyewitness-version-footer),
body .footer:not(.eyewitness-version-footer),
body .wp-block-template-part[data-area="footer"]:not(.eyewitness-version-footer),
body .wp-block-group[class*="footer"]:not(.eyewitness-version-footer) {
    display: none;
}

/* Ensure eyewitness version footer is visible */
.eyewitness-version-footer,
.eyewitness-homepage .eyewitness-version-footer {
    display: block !important;
    visibility: visible !important;
}

/* Lineup Selection Styling */
.lineup-option-btn {
    transition: all 0.3s ease;
}

.lineup-option-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.lineup-option-btn:active {
    transform: scale(0.98);
}

#lineup-images {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.lineup-photo {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    border: 3px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
    background-color: transparent;
}

.lineup-photo:hover {
    border-color: #2271b1;
    background-color: #f0f6fc;
    transform: scale(1.02);
}

.lineup-photo.selected {
    border-color: #2271b1;
    background-color: #f0f6fc;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.lineup-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

#lineup-loading {
    text-align: center;
    padding: 50px;
}

#lineup-error {
    text-align: center;
    padding: 30px;
    background: #fee;
    border: 2px solid #dc3232;
    border-radius: 8px;
    color: #dc3232;
}

