/**
 * Spiritual Gifts Assessment Styles
 * These styles override theme defaults to ensure consistent appearance
 */

/* Container */
.sg-assessment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: #333;
}

/* Reset theme styles */
.sg-assessment-container h2,
.sg-assessment-container h3,
.sg-assessment-container h4,
.sg-assessment-container p,
.sg-assessment-container ul,
.sg-assessment-container li {
    margin: 0;
    padding: 0;
    line-height: inherit;
}

.sg-assessment-container ul {
    list-style: none;
}

/* Screens */
.sg-screen {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sg-screen.active {
    display: block;
    opacity: 1;
}

/* Introduction Screen */
.sg-intro h2 {
    font-size: 2em;
    margin-bottom: 1em;
    color: #2271b1;
    text-align: center;
}

.sg-intro-content {
    background: #fff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sg-intro-content h3 {
    font-size: 1.4em;
    margin: 1.5em 0 1em;
    color: #1d2327;
}

.sg-intro-content ul {
    margin: 1em 0;
    padding-left: 1.5em;
}

.sg-intro-content ul ul {
    margin: 0.5em 0;
}

.sg-intro-content li {
    margin-bottom: 0.5em;
    list-style-type: disc;
}

.sg-intro-content li li {
    list-style-type: circle;
}

.sg-time-estimate {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin: 2em 0;
    padding: 1em;
    background: #f0f6fc;
    border-radius: 4px;
    color: #1d2327;
}

.sg-time-estimate .dashicons {
    color: #2271b1;
}

/* Questions Screen */
.sg-questions {
    background: #f0f6fc;
    padding: 2em;
    border-radius: 8px;
}

/* Progress Bar */
.sg-progress {
    margin-bottom: 2em;
}

.sg-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5em;
}

.sg-progress-fill {
    height: 100%;
    background: #2271b1;
    width: 0;
    transition: width 0.3s ease;
}

.sg-progress-text {
    text-align: center;
    font-size: 0.9em;
    color: #50575e;
}

/* Question Groups */
.sg-question-group {
    display: none;
}

.sg-question-group.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Questions */
.sg-question {
    background: #fff;
    padding: 1.5em;
    margin-bottom: 1.5em;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sg-question-text {
    font-size: 1.1em;
    margin-bottom: 1.5em;
    color: #1d2327;
}

/* Answer Options */
.sg-answers {
    display: flex;
    justify-content: space-between;
    gap: 1em;
}

.sg-answer {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.sg-answer input[type="radio"] {
    display: none;
}

.sg-answer-text {
    display: block;
    padding: 1em;
    background: #f6f7f7;
    border: 2px solid #dcdcde;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sg-answer:hover .sg-answer-text {
    background: #f0f0f1;
    border-color: #c5c5c5;
}

.sg-answer input[type="radio"]:checked + .sg-answer-text {
    background: #f0f7fc;
    border-color: #2271b1;
    color: #2271b1;
}

.sg-answer-label {
    display: block;
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #50575e;
}

/* Navigation */
.sg-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2em;
    gap: 1em;
}

/* Button Styles */
.sg-assessment-container .button {
    display: inline-block;
    min-width: 120px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 2px solid #6b46c1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sg-assessment-container .button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

/* Primary Button */
.sg-assessment-container .button-primary,
.sg-assessment-container .sg-next,
.sg-assessment-container .sg-submit {
    background-color: #6b46c1;
    color: #ffffff;
}

.sg-assessment-container .button-primary:hover,
.sg-assessment-container .sg-next:hover,
.sg-assessment-container .sg-submit:hover {
    background-color: #805ad5;
    border-color: #805ad5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Secondary Button */
.sg-assessment-container .sg-prev {
    background-color: #ffffff;
    color: #6b46c1;
}

.sg-assessment-container .sg-prev:hover {
    background-color: #f8f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Start Assessment Button */
.sg-assessment-container .sg-start-assessment {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2em auto 0;
    padding: 15px 30px;
    font-size: 18px;
}

/* Loading Screen */
.sg-loading {
    text-align: center;
    padding: 4em 2em;
}

.sg-loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    margin-bottom: 1em;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .sg-assessment-container {
        padding: 1em;
    }

    .sg-questions {
        padding: 1em;
    }

    .sg-answers {
        flex-direction: column;
    }

    .sg-answer {
        margin-bottom: 0.5em;
    }

    .sg-navigation {
        flex-direction: column;
        gap: 1em;
        margin-top: 1.5em;
    }

    .sg-assessment-container .button {
        width: 100%;
        min-height: 48px; /* Larger touch target */
        padding: 14px 24px;
        font-size: 16px;
    }

    .sg-assessment-container .sg-start-assessment {
        max-width: 100%;
        margin-top: 1.5em;
    }
}

/* Print Styles */
@media print {
    .sg-assessment-container {
        padding: 0;
    }

    .sg-navigation,
    .sg-progress {
        display: none;
    }

    .sg-question {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
