/**
 * Additional styles for static colorblind test
 */

/* Homepage spacing fixes */

.title-img {
    background-image: url('../images/front/title_img.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    height: 183px;
    width: 273px;
    margin: 0 auto 20px auto;
    display: block;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .title-img {
        background-image: url('../images/front/title_img@2x.png');
        background-size: 273px 183px;
    }
}

/* Ensure icon classes work when toggled from JS */
.ico-logo {
    background-image: url('../images/front/dalton_icon.png') !important;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ico-logo {
        background-image: url('../images/front/dalton_icon@2x.png') !important;
    }
}

.ico-pause {
    background-image: url('../images/front/pause_icon.png') !important;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ico-pause {
        background-image: url('../images/front/pause_icon@2x.png') !important;
    }
}

.ico-time {
    background-image: url('../images/front/time_icon.png') !important;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ico-time {
        background-image: url('../images/front/time_icon@2x.png') !important;
    }
}

/* Test Content Styles - Original Design */
.my-slide {
    text-align: center;
}

.img-wrapper {
    background: #ffffff;
    display: block;
    height: 40vh;
    height: calc(100vh - 370px);
}

.test-img {
    display: inline-block;
    max-height: 100%;
    max-width: 100%;
    width: auto;
}

/* Original answer buttons styling */
.answers {
    padding: 0.625rem 0.625rem 0 0.625rem;
    list-style: none;
    margin: 0;
}

.answers li {
    margin-bottom: 0.625rem;
    padding-left: 4.375rem;
    list-style-type: none;
    -webkit-box-shadow: 0px 1px 2px 0px rgba(18, 44, 79, 0.2);
    -moz-box-shadow: 0px 1px 2px 0px rgba(18, 44, 79, 0.2);
    box-shadow: 0px 1px 2px 0px rgba(18, 44, 79, 0.2);
}

.test-btn {
    position: relative;
    padding-left: 1.5rem;
    text-align: left;
    display: inline-block;
    width: 100%;
    height: 4.375rem;
    line-height: 4.375rem;
    font-size: 1.25rem;
    background: #ffffff;
    color: #262b3c;
    font-weight: bold;
    text-decoration: none;
    border-bottom-right-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    border: none;
    cursor: pointer;
}

/* Letter badges (A, B, C) */
.test-btn:before {
    content: '';
    position: absolute;
    display: inline-block;
    height: 4.375rem;
    width: 4.375rem;
    margin-left: -5.875rem;
    top: 0;
    line-height: 4.375rem;
    font-size: 1.25rem;
    background: #7b77c9;
    text-align: center;
    color: #ffffff;
    border-right: 2px solid #7b77c9;
    border-bottom-left-radius: 0.25rem;
    border-top-left-radius: 0.25rem;
}

/* Letter content */
.answers li:nth-child(1) .test-btn:before {
    content: 'A';
}

.answers li:nth-child(2) .test-btn:before {
    content: 'B';
}

.answers li:nth-child(3) .test-btn:before {
    content: 'C';
}

.answers li:nth-child(4) .test-btn:before {
    content: 'D';
}

/* Hover effects */
.test-btn:hover,
.test-btn:active,
.test-btn:focus {
    text-decoration: none;
    background: #7b77c9;
    color: #ffffff;
}

.test-btn:hover:before,
.test-btn:active:before,
.test-btn:focus:before {
    border-right: 2px solid #8d8ad5;
}

/* Progress bar animation */
#test-preloader .test-preloader-bg {
    background-color: #42d999 !important;
    transition: width 0.1s ease-out;
}

/* Flash animation for auto-answer */
@keyframes flash {
    0% { background-color: #ffffff; }
    50% { background-color: #ffeaa7; }
    100% { background-color: #ffffff; }
}

.animated.flash {
    animation: flash 0.5s infinite;
}

/* Fun Fact Slides Styling - Purple background with white text like original */
.fun-and-fact-content {
    background: transparent;
    padding: 0 30px;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    text-align: center;
}

.fun-and-fact-content .main-title {}

.fun-and-fact-content .main-title strong {}

.fun-and-fact-content .perex {}

.fun-and-fact-content .btn {}

.fun-and-fact-content .btn:hover {}

/* Responsive adjustments */
@media (max-width: 768px) {
    .answers {
        padding: 0.5rem;
    }
    
    .answers li {
        padding-left: 3.5rem;
        margin-bottom: 0.5rem;
    }
    
    .test-btn {
        font-size: 1.1rem;
        height: 3.75rem;
        line-height: 3.75rem;
        padding-left: 1rem;
    }
    
    .test-btn:before {
        width: 3.5rem;
        height: 3.75rem;
        line-height: 3.75rem;
        margin-left: -4.5rem;
        font-size: 1.1rem;
    }
    
    .img-wrapper {
        height: 30vh;
        height: calc(100vh - 320px);
    }
    
    .fun-and-fact-content {
        margin: 0;
        padding: 0 30px;
    }
    
    .fun-and-fact-content .main-title {
        font-size: 1.5rem;
    }
    
    .fun-and-fact-content .main-title strong {
        font-size: 1.875rem;
    }
}

.question-slide {
    max-width: 600px;
    margin: 0 auto;
}

.question-image {
    margin-bottom: 30px;
}

.question-image img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.question-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #333;
    font-weight: 300;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
}

.answer-btn {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
}

.answer-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

/* Fun Fact Styles */
.funfact-slide {
    max-width: 700px;
    margin: 0 auto;
}

.funfact-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.funfact-title {
    font-size: 1.6em;
    margin-bottom: 20px;
    line-height: 1.3;
}

.funfact-text {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.funfact-text strong {
    color: #ffd700;
}

/* Result Styles */
.result-message {
    margin: 40px 0;
}

.result-type {
    font-size: 2.75rem;
    line-height: 3rem;
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
    color: #313646;
    font-weight: 700;
}

.result-description {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 30px;
}

.result-correct-line {
    font-size: 1.125rem;
    color: #666;
    margin-top: 0.25rem;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.result-actions .btn {
    min-width: 200px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    
    .question-image img {
        max-width: 250px;
        max-height: 250px;
    }
    
    .question-title {
        font-size: 1.4em;
    }
    
    .funfact-content {
        padding: 30px 20px;
    }
    
    .funfact-title {
        font-size: 1.3em;
    }
    
    .result-type {
        font-size: 2em;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions .btn {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-content {
    animation: slideInUp 0.5s ease-out;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Results page (match original) */
.line-behind {
    position: relative;
    z-index: 1;
    margin: 10px 0;
}
.line-behind:before {
    border-top: 2px solid #d4d9df;
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 50%; left: 0; right: 0; bottom: 0;
    width: 95%;
    z-index: -1;
}
.line-behind span {
    font-size: 18px;
    color: #848ba3;
    background: #eef1f4;
    padding: 0 25px;
}

.result-img {
    background-image: url('../images/front/final_img.png');
    -webkit-background-size: 651px 344px;
    background-size: 651px 344px;
    background-position: center 120px;
    background-repeat: no-repeat;
    position: relative;
    height: 444px; /* ensure full image is visible with space below */
    width: 100%;
    z-index: 0;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .result-img {
        background-image: url('../images/front/final_img@2x.png');
        -webkit-background-size: 651px 344px;
        background-size: 651px 344px;
    }
}

.result-row h1 {
    margin-bottom: 10px;
}

.store-btns {
    text-align: center;
}
.store-btns a { display: inline-block; }
.store-btns a img { width: 240px; height: auto; }
.store-btns a.apple-btn img { width: 215px; }

/* Center results block vertically similar to original spacing */
#result-content {
    position: relative;
    min-height: calc(100vh - 3.75rem);
}

#result-content .container-fluid {
    padding-top: 20px;
    padding-bottom: 200px;
    height: auto;
    position: static;
}

#result-content .line-behind {
    position: relative;
    margin-top: 40px;
    left: 40px;
    right: 40px;
}

#result-content .store-btns {
    position: relative;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .result-img {
        background-position: center 100px;
    }
    #result-content .line-behind { left: 20px; right: 20px; margin-top: 30px; }
    #result-content .store-btns { margin-top: 16px; }
}

/* Layout alignment to match original full-width answers */
#test-content .answers {
    display: block;
    max-width: none;
    margin: 0;
}

#test-content .answers li {
    width: auto;
}
