/**
 * Frontend CSS for WP Assessments
 */

/* Container */
.wpa-frontend-container {
    max-width: 900px;
    margin: 10px auto;
    padding: 0 20px;
}

/* Featured Images */
.wpa-assessment-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.wpa-assessment-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Headers */
.wpa-assessments-header,
.wpa-assessment-single-header,
.wpa-quiz-header,
.wpa-results-header {
    text-align: center;
}

.wpa-assessments-header h1,
.wpa-assessment-single-header h1,
.wpa-quiz-header h1,
.wpa-results-header h1 {
    font-size: 36px;
    margin-bottom: 0px;
    color: #1a1a1a;
}

.wpa-assessment-title {
    font-size: 18px;
    color: #666;
}

/* Badges */
.wpa-assessment-type-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

/* Assessments Grid */
.wpa-assessments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 350px));
    gap: 24px;
    margin: 30px 0;
}

.wpa-assessment-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.wpa-assessment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.wpa-assessment-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.wpa-assessment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpa-assessment-card-header {
    padding: 24px 24px 0 24px;
}

.wpa-assessment-card-header h2 {
    font-size: 22px;
    margin: 0 0 12px;
}

.wpa-assessment-description {
    color: #666;
    line-height: 1.6;
    margin: 16px 0;
    padding: 0 24px;
}

.wpa-assessment-meta {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    padding: 0 24px;
    font-size: 14px;
    color: #666;
}

.wpa-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wpa-meta-item .dashicons {
    font-size: 18px;
}

.wpa-assessment-actions {
    margin-top: 20px;
    padding: 0 24px 24px 24px;
}

/* Buttons */
.wpa-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: #40B5AD;
    color: #fff;
}

.wpa-button-primary {
    background: #40B5AD;
    color: #fff;
}

.wpa-button-primary:hover {
    background: #1D7D7A;
    color: #fff;
}

.wpa-button-secondary {
    background: #f0f0f0;
    color: #1a1a1a;
}

.wpa-button-secondary:hover {
    background: #ddd;
    color: #1a1a1a;
}

.wpa-button-large {
    padding: 16px 32px;
    font-size: 18px;
}

.wpa-button-small {
    padding: 8px 16px;
    font-size: 14px;
}

.wpa-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpa-button-disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.wpa-button-disabled:hover {
    background: #ccc !important;
    color: #666 !important;
}

/* Quizzes Overview */
.wpa-quizzes-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 32px 0;
}

.wpa-quiz-overview-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transition: box-shadow 0.2s;
}

.wpa-quiz-overview-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wpa-quiz-card-image {
    flex-shrink: 0;
    width: 40%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.wpa-quiz-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpa-quiz-card-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpa-quiz-card-content h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.wpa-quiz-card-description {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}

.wpa-quiz-card-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: auto;
}

.wpa-quiz-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #40B5AD;
    font-size: 14px;
    font-weight: 600;
}

.wpa-quiz-meta-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Quiz Featured Image */
.wpa-quiz-featured-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 24px;
}

.wpa-quiz-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Quiz Progress */
.wpa-quiz-progress {
    margin-bottom: 30px;
}

.wpa-progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wpa-quiz-progress-label {
    font-size: 14px;
    color: #666;
}

.wpa-progress-text {
    font-size: 14px;
    color: #666;
}

.wpa-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.wpa-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #40B5AD, #1D7D7A);
    transition: width 0.3s;
}

/* Questions */
.wpa-question {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 32px;
}

.wpa-question-media {
    margin-bottom: 24px;
}

.wpa-question-media img,
.wpa-question-media video {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.wpa-question-text h3 {
    font-size: 20px;
    margin: 0 0 16px;
    color: #40B5AD;
}

.wpa-question-text p {
    font-size: 18px;
    line-height: 1.6;
    color: #1a1a1a;
    margin: 0 0 24px;
}

/* Question Options */
.wpa-question-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wpa-option {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.wpa-option:hover {
    border-color: #1D7D7A;
    background: #fffbf0;
}

.wpa-option-selected {
    border-color: #1D7D7A;
    background: #fffbf0;
}

.wpa-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.wpa-option-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wpa-option-label {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
}

.wpa-option-selected .wpa-option-label {
    background: #1D7D7A;
    color: #fff;
}

.wpa-option-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

.wpa-option-text p {
    margin: 0 0 10px 0;
}

.wpa-option-text p:last-child {
    margin-bottom: 0;
}

.wpa-question-text strong,
.wpa-option-text strong {
    font-weight: 700;
}

.wpa-question-text em,
.wpa-option-text em {
    font-style: italic;
}

/* Likert Options (side by side on larger screens) */
@media (min-width: 768px) {
    .wpa-likert-scale {
        flex-direction: row;
    }

    .wpa-likert-option {
        flex: 1;
    }
}

/* Quiz Navigation */
.wpa-quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

/* Results */
.wpa-results-comparison {
    margin: 40px 0;
}

.wpa-scores-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 30px 0;
}

.wpa-score-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.wpa-score-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.wpa-score-value {
    font-size: 48px;
    font-weight: bold;
    color: #40B5AD;
    margin-bottom: 12px;
}

.wpa-score-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wpa-score-fill {
    height: 100%;
    background: linear-gradient(to right, #40B5AD, #1D7D7A);
}

.wpa-score-detail {
    font-size: 14px;
    color: #666;
}

.wpa-gap-badge {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.wpa-gap-value {
    font-size: 36px;
    font-weight: bold;
}

.wpa-tier-message {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
}

/* Profile Section */
.wpa-profile-section {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 40px 0;
}

.wpa-profile-badge {
    display: inline-block;
    padding: 12px 32px;
    background: #40B5AD;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    border-radius: 4px;
    margin: 16px 0;
}

.wpa-profile-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    max-width: 600px;
    margin: 16px auto 0;
}

/* Action Sections */
.wpa-assessment-actions-section,
.wpa-results-actions {
    text-align: center;
    margin: 40px 0;
}

.wpa-results-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Notices */
.wpa-notice {
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.wpa-notice-info {
    background: #e5f5fa;
    border-left: 4px solid #00a0d2;
    color: #1a1a1a;
}

.wpa-notice-warning {
    background: #fff8e5;
    border-left: 4px solid #f0b849;
    color: #1a1a1a;
}

.wpa-notice-error {
    background: #ffe5e5;
    border-left: 4px solid #dc3232;
    color: #1a1a1a;
}

/* Tables */
.wpa-attempts-table,
.wpa-results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
}

.wpa-attempts-table th,
.wpa-results-table th {
    background: #f9f9f9;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
}

.wpa-attempts-table td,
.wpa-results-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .wpa-frontend-container {
        margin: 20px auto;
    }

    .wpa-assessments-grid {
        grid-template-columns: 1fr;
    }

    .wpa-quiz-overview-card {
        flex-direction: column;
    }

    .wpa-quiz-card-image {
        width: 100%;
    }

    .wpa-scores-comparison {
        grid-template-columns: 1fr;
    }

    .wpa-quiz-navigation {
        flex-direction: column;
    }

    .wpa-results-actions {
        flex-direction: column;
    }

    .wpa-button {
        width: 100%;
    }
}

/* Theme Compatibility */
.wpa-assessment-page .page_content_wrap {
    padding: 0 !important;
}

/* ============================================
   Results Page Styles
   ============================================ */

.wpa-final-results-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.wpa-final-results-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.wpa-final-results-intro {
    background: #f9f9f9;
    padding: 20px 30px 10px;
    border-radius: 8px;
    margin-bottom: 40px;
    line-height: 1.8;
    font-size: 16px;
}

.wpa-final-results-intro h1,
.wpa-final-results-intro h2,
.wpa-final-results-intro h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.wpa-final-results-intro p {
    margin-bottom: 1em;
}

.wpa-tier-profile-section,
.wpa-gap-profile-section {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
}

.wpa-tier-badge-large {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpa-tier-progress-bar {
    width: 100%;
    height: 20px;
    background: #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.wpa-tier-progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 1s ease-out;
}

.wpa-tier-full-message,
.wpa-gap-full-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.wpa-tier-full-message h1,
.wpa-tier-full-message h2,
.wpa-tier-full-message h3,
.wpa-gap-full-content h1,
.wpa-gap-full-content h2,
.wpa-gap-full-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

.wpa-tier-full-message p,
.wpa-gap-full-content p {
    margin-bottom: 1em;
}

.wpa-tier-full-message ul,
.wpa-tier-full-message ol,
.wpa-gap-full-content ul,
.wpa-gap-full-content ol {
    margin-left: 20px;
    margin-bottom: 1em;
}

.wpa-tier-full-message strong,
.wpa-gap-full-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.wpa-section-header-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
}

.wpa-quiz-1-profile-heading,
.wpa-gap-analysis-heading {
    font-size: 28px;
    margin-bottom: 30px;
    margin-top: 30px;
    color: #2c3e50;
}