/**
 * Reading Plus Q&A Styles - Matching GeneratePress Theme
 */

/* Custom Styles from Customizer */
.posted-on .updated {
    display: inline-block;
}

.rpqa-view-all:visited, .rpqa-btn-back:visited {
    color: white !important;
}

.grecaptcha-badge {
    visibility: hidden;
}

.posted-on .updated + .entry-date {
    display: none;
}

ul.level-alphabets {
    list-style: none;
    display: inline-block;
    float: left;
    margin: 0;
}

input.search-submit {
    background: #f9cfcf;
    color: #4671c6;
}

input.search-submit:hover {
    background: #4671c6;
    color: white;
}

li.level-alphabet {
    padding: 8px;
    color: black;
    margin: 2px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border: 1px solid gray;
    cursor: pointer;
    border-radius: 4px;
}

li.level-alphabet.current-level {
    background: black;
    color: white !important;
}

ul.level-alphabets a {
    text-decoration: none !important;
    float: left;
}

ul.level-alphabets a:hover li {
    background: black;
    border-radius: 4px;
    color: white !important;
}

td span {
    background: #d6fdd6;
    padding: 0 2%;
    margin: 0 2%;
    border-radius: 8px;
    color: darkgreen;
}

td i {
    margin-right: 4px;
}

td a {
    background: #f9cfcf;
    color: #4671c6!important;
    display: block;
    padding: 2%;
    border: 1px solid black;
    text-align: center;
    font-family: monospace;
    font-weight: bold;
    padding: 0 2%;
    margin-bottom: 1px;
}

table tr:nth-child(1) {
    background: #f7f7f7;
}

.answers-key {
    background: #f0f0f0;
    padding: 40px;
    margin: 30px 0;
    border-left: 4px solid #4671c6;
}

.answers-key p {
    margin: 0;
}

/* Breadcrumb Navigation */
.rpqa-breadcrumb-nav {
    margin-bottom: 20px;
    padding: 15px 0;
    font-size: 15px;
}

.rpqa-breadcrumb-nav a {
    color: #0073aa;
    text-decoration: none;
    transition: opacity 0.2s;
}

.rpqa-breadcrumb-nav a:hover {
    opacity: 0.7;
}

.rpqa-breadcrumb-nav .separator {
    margin: 0 8px;
    color: #999;
}

/* Pagination Notice */
.rpqa-pagination-notice {
    background: #f0f0f0;
    padding: 20px 30px;
    margin: 30px 0;
    border-left: 4px solid #0073aa;
    font-size: 16px;
}

.rpqa-pagination-notice p {
    margin: 0;
    line-height: 1.6;
}

.rpqa-pagination-notice a {
    color: #0073aa;
    text-decoration: underline;
    font-weight: 600;
}

.rpqa-pagination-notice a:hover {
    color: #005a87;
}

/* Theme Integration - White Content on Gray Background */
body.reading-plus-qa-page {
    background: #efefef;
}

/* Don't override GeneratePress grid system */
.reading-plus-qa-page .inside-article {
    background: #fff;
}

.rpqa-level-nav {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
}

.rpqa-level-nav p {
    margin-bottom: 10px;
    font-size: 15px;
}

.rpqa-level-content {
    margin: 40px 0;
}

.rpqa-level-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 30px 0 20px 0;
    color: #333;
}

.rpqa-level-content p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 1.5em;
    color: #333;
}

.rpqa-main-content {
    margin: 40px 0;
}

.rpqa-main-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 35px 0 20px 0;
    color: #333;
    line-height: 1.3;
}

.rpqa-main-content p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 1.5em;
    color: #333;
}

.rpqa-page-header {
    margin-bottom: 40px;
    text-align: center;
}

.rpqa-page-header .entry-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2em;
}

.rpqa-intro {
    font-size: 17px;
    line-height: 1.5;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.rpqa-intro p {
    margin-bottom: 0;
    margin-top: 40px;
}

/* Level Sections */
.rpqa-level-section {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0,0,0,.1);
}

.rpqa-level-section:last-child {
    border-bottom: 0;
}

.rpqa-level-header {
    margin-bottom: 30px;
}

.rpqa-level-header h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2em;
    color: #333;
}

.rpqa-level-description {
    font-size: 17px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.rpqa-level-count {
    font-size: 15px;
    color: #999;
    font-weight: 600;
    margin: 0;
}

/* Cards Flexbox Layout */
.rpqa-cards-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.rpqa-card {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 280px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    transition: all .2s ease-in-out;
}

.rpqa-card:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transform: translateY(-1px);
    border-color: #d5d5d5;
}

.rpqa-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 30px;
}

.rpqa-label {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rpqa-label.answer {
    background: #46b450;
}

.rpqa-card-question h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.rpqa-card-answer-preview {
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,.05);
}

.rpqa-card-answer-preview p {
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Level Footer */
.rpqa-level-footer {
    text-align: center;
    margin-top: 20px;
}

.rpqa-view-all {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 12px 24px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background-color .2s ease-in-out;
}

.rpqa-view-all:hover {
    background: #005a87;
    color: #fff;
}

/* Taxonomy Archive (Individual Level Pages) */
.rpqa-archive-container {
    padding: 40px 0;
}

.rpqa-archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.rpqa-archive-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2em;
}

.rpqa-archive-description {
    font-size: 17px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.rpqa-archive-meta {
    font-size: 15px;
    color: #999;
    font-weight: 600;
}

/* Single Q&A Page */
.rpqa-single-container {
    padding: 40px 0;
}

.rpqa-breadcrumb {
    margin-bottom: 30px;
}

.rpqa-back-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: opacity .2s;
}

.rpqa-back-link:hover {
    opacity: .8;
}

.rpqa-single-card {
    background: #fff;
    border: 1px solid #e5e5e5;
}

.rpqa-single-question,
.rpqa-single-answer {
    padding: 40px;
}

.rpqa-single-question {
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
}

.rpqa-label-wrapper {
    margin-bottom: 20px;
}

.rpqa-card-label-large {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rpqa-card-label-large.answer {
    background: #46b450;
}

.rpqa-question-title {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.rpqa-answer-content {
    font-size: 17px;
    color: #333;
    line-height: 1.7;
}

.rpqa-answer-content p {
    margin-bottom: 1.5em;
}

.rpqa-answer-content p:last-child {
    margin-bottom: 0;
}

.rpqa-answer-content ul,
.rpqa-answer-content ol {
    margin-left: 3em;
    margin-bottom: 1.5em;
}

.rpqa-answer-content ul {
    list-style: disc;
}

.rpqa-answer-content ol {
    list-style: decimal;
}

.rpqa-single-footer {
    padding: 30px 40px;
    background: #f7f7f7;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.rpqa-btn-back {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 12px 24px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background-color .2s ease-in-out;
}

.rpqa-btn-back:hover {
    background: #005a87;
    color: #fff;
}

/* Related Questions */
.rpqa-related-section {
    margin-top: 50px;
}

.rpqa-related-section h2 {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.2em;
}

.rpqa-related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.rpqa-related-card {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 250px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    transition: all .2s ease-in-out;
}

.rpqa-related-card:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    border-color: #d5d5d5;
}

.rpqa-related-card a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.rpqa-related-question h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

/* No Results */
.rpqa-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 17px;
}

/* Pagination */
.rpqa-pagination {
    margin-top: 40px;
    text-align: center;
}

.rpqa-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.rpqa-pagination a,
.rpqa-pagination span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,.1);
}

.rpqa-pagination a:hover {
    background: #f9f9f9;
    color: #333;
}

.rpqa-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Responsive Design */
@media (max-width: 992px) {
    .rpqa-cards-flex {
        gap: 15px;
    }

    .rpqa-card {
        flex: 1 1 calc(50% - 15px);
    }

    .rpqa-related-card {
        flex: 1 1 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .rpqa-page-header .entry-title,
    .rpqa-archive-title {
        font-size: 30px;
    }

    .rpqa-level-header h2,
    .rpqa-related-section h2 {
        font-size: 24px;
    }

    .rpqa-cards-flex,
    .rpqa-related-grid {
        flex-direction: column;
    }

    .rpqa-card,
    .rpqa-related-card {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .rpqa-single-question,
    .rpqa-single-answer,
    .rpqa-single-footer {
        padding: 30px 20px;
    }

    .rpqa-question-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .rpqa-card-link {
        padding: 20px;
    }

    .rpqa-page-header .entry-title,
    .rpqa-archive-title {
        font-size: 24px;
    }

    .rpqa-level-header h2 {
        font-size: 20px;
    }
}
