/* UPDATED TPA CSS BUNDLE — FIXED ALIGNMENTS AND BUTTON RULES */

:root {
  --tpa-blue: #0073e6;
  --tpa-blue-dark: #005bb5;
  --tpa-gray: #444;
  --tpa-green: #00a86b;
  --tpa-green-dark: #008f5a;
  --tpa-bg-light: #fafafa;
  --tpa-border: #ddd;
  --tpa-radius: 10px;
  --tpa-font: "Inter", Arial, sans-serif;
}

body {
    font-family: var(--tpa-font);
    color: var(--tpa-gray);
}

/******************** GLOBAL BUTTONS ********************/
.tpa-btn,
.tpa-btn-primary,
.tpa-btn-secondary,
.tpa-btn-green {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

/* Final merged .tpa-btn-primary */
.tpa-btn-primary {
    background-color: #0073e6;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}
.tpa-btn-primary:hover { background-color: #005bb5; }

/* Final merged .tpa-btn-secondary */
.tpa-btn-secondary {
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #333;
}
.tpa-btn-secondary:hover {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
    transform: translateY(-2px);
}

/* Final merged .tpa-btn-green */
.tpa-btn-green {
    background: #00a86b;
    color: #fff;
}
.tpa-btn-green:hover { background: #008f5a; }

/*******************************************
 HOME PAGE LAYOUT
*******************************************/
.tpa-home-page .tpa-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-items: center;
}

.tpa-home-page .tpa-course-card {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: var(--tpa-radius);
    padding: 20px;
    border: 1px solid var(--tpa-border);
    text-align: center;
}

.tpa-home-page .tpa-card-actions { text-align: center; }

/*******************************************
 HOME PAGE (merged newer layout)
*******************************************/
.tpa-home {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    box-sizing: border-box;
}

.tpa-courses-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

/* Final merged .tpa-course-card */
.tpa-course-card {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out;
}
.tpa-course-card:hover { transform: translateY(-4px); }

.tpa-course-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #003366;
}

.tpa-course-desc {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 20px;
    min-height: 60px;
}

.tpa-card-actions { text-align: center; }

.tpa-home-empty {
    text-align: center;
    font-size: 1.1rem;
    color: #777;
    margin-top: 40px;
}

/*******************************************
 COURSE DETAIL PAGE — CLEAN + MERGED
*******************************************/
.tpa-course-detail-page .tpa-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* Final merged title */
.tpa-course-detail-page .tpa-title {
    font-size: 2rem;
    font-weight: 700;
    color: #003366;
    margin-bottom: 20px;
    text-align: center;
}

/* Final merged longdesc */
.tpa-course-detail-page .tpa-longdesc {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin: 0 auto 40px auto;
    max-width: 800px;
    text-align: left;
}

/* Final merged state container */
.tpa-course-detail-page .tpa-states {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0;
}

/* Final merged state buttons container */
.tpa-course-detail-page .tpa-state-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
}

/* Final merged state buttons style */
.tpa-course-detail-page .tpa-btn-secondary {
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
}
.tpa-course-detail-page .tpa-btn-secondary:hover {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
    transform: translateY(-2px);
}

/*******************************************
 RESPONSIVE — COURSE DETAIL
*******************************************/
@media (max-width: 600px) {
    .tpa-course-detail-page .tpa-title { font-size: 1.6rem; }
    .tpa-course-detail-page .tpa-longdesc {
        padding: 15px;
        font-size: 1rem;
    }
    .tpa-course-detail-page .tpa-btn-secondary {
        width: 100%;
        text-align: center;
    }
}
/*******************************************
 COURSE VIEW PAGE — CLEAN & CENTERED (MERGED)
*******************************************/

/* Page wrapper */
.tpa-course-view {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Course box */
.tpa-course-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Title */
.tpa-course-title-main {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: #003366;
    margin-bottom: 25px;
}

/* Long description */
.tpa-course-long-desc {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 30px;
    background: #fafafa;
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

/*******************************************
 SECTION LIST
*******************************************/
.tpa-section-header {
    font-size: 22px;
    margin-bottom: 15px;
    color: #222;
}

.tpa-section-btn,
.tpa-section-btn-active {
    display: block;
    width: 100%;
    padding: 16px 18px;
    margin-bottom: 12px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* Active section */
.tpa-section-btn-active {
    background: #0073e6;
    border: 1px solid #005bb5;
    color: #fff;
    cursor: pointer;
}
.tpa-section-btn-active:hover {
    background: #005bb5;
}

/* Disabled sections */
.tpa-section-btn[disabled] {
    background: #ececec;
    border: 1px solid #ccc;
    color: #777;
    cursor: not-allowed;
}

/* Normal section (no disabled attribute) */
.tpa-section-btn {
    background: #eef3ff;
    border: 1px solid #d1ddff;
    color: #003366;
}
.tpa-section-btn:hover {
    background: #d9e6ff;
    border-color: #a4bfff;
    transform: translateY(-2px);
}

/*******************************************
 TOTAL QUESTIONS
*******************************************/
.tpa-total-questions {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-top: 10px;
    text-align: right;
}

/*******************************************
 FINAL TEST BOX
*******************************************/
.tpa-final-test-box {
    margin-top: 35px;
    text-align: center;
}

.tpa-final-test-box .tpa-btn-primary {
    font-size: 18px;
    padding: 14px 32px;
    display: inline-block;
    border-radius: 8px;
}

/*******************************************
 RESPONSIVE — COURSE VIEW
*******************************************/
@media (max-width: 600px) {
    .tpa-course-box { padding: 20px; }
    .tpa-course-title-main { font-size: 1.6rem; }
    .tpa-section-btn { font-size: 0.95rem; padding: 12px 14px; }
    .tpa-final-test-box .tpa-btn-primary {
        width: 100%;
        padding: 16px;
    }
}

/*******************************************
 QUIZ DEMO PAGE — CLEAN & CENTERED (MERGED)
*******************************************/
.tpa-demo-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
    box-sizing: border-box;
}

/* Title */
.tpa-demo-title-block {
    text-align: center;
 
}

.tpa-demo-course {
    font-size: 30px;
    font-weight: 700;
    color: #003366;
    line-height: 1.2;
    padding-top: 40px;
}

.tpa-demo-section {
    font-size: 24px;
    font-weight: 500;
    color: #0055aa;
    margin-top: 5px;
    line-height: 1.2;
}


/* Test container */
#testContainer {
    background: #fafafa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
 
}

/* Questions area */
#questions { min-height: 200px; }

/* Score display */
#scoreDisplay {
    text-align: center;
    margin-top: 18px;
    font-weight: 600;
    color: #444;
    font-size: 1rem;
}

/*******************************************
 NAVIGATION — CENTERED
*******************************************/
.tpa-demo-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
}

/* Buttons inside nav */
.tpa-demo-nav button {
    background: #0073e6;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.tpa-demo-nav button:hover { background: #005bb5; }

/*******************************************
 PAGE INDICATOR
*******************************************/
.tpa-page-info {
    font-weight: 600;
    color: #222;
}

/*******************************************
 RESPONSIVE — QUIZ DEMO
*******************************************/
@media (max-width: 600px) {
    .tpa-demo-nav {
        flex-direction: column;
        gap: 10px;
    }
    .tpa-demo-nav button {
        width: 100%;
    }
}
/*******************************************
 FLASHCARD DEMO PAGE — CLEAN, CENTERED
*******************************************/
.tpa-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/*******************************************
 LANGUAGE + MODE PANEL
*******************************************/
.tpa-lang-panel {
    margin-bottom: 30px;
    background: #fafafa;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

.tpa-question-modes {
    margin-bottom: 15px;
    text-align: center;
}

.tpa-mode-btn {
    background: #aaa;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: white;
    font-weight: 600;
    margin-right: 6px;
}

.tpa-mode-btn.tpa-active {
    background: #0073e6;
}

/*******************************************
 LANGUAGE SELECT
*******************************************/
.tpa-lang-label {
    font-weight: 600;
    margin-right: 10px;
}

.tpa-lang-select {
    padding: 7px 10px;
}

/*******************************************
 FLASHCARD PANELS
*******************************************/
.tpa-flash-panel {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 25px auto;
    background: #fff;
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 12px;
    min-height: 300px;
    font-size: 20px;
    line-height: 1.5;
}

.tpa-flash-panel h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.tpa-flash-answer {
    font-size: 20px;
    margin-top: 20px;
}

/*******************************************
 FLASHCARD NAVIGATION — CENTERED
*******************************************/
.tpa-flash-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

#flash-voice-toggle {
    margin-left: auto;
}

/*******************************************
 FLASHCARD BUTTONS
*******************************************/
.tpa-btn {
    background: #0073e6;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.tpa-btn:hover {
    background: #005bb5;
}

.tpa-secondary {
    background: #666;
}

/*******************************************
 SUBSCRIBE PANEL (DEMO ONLY)
*******************************************/
.tpa-subscribe-panel {
    width: 100%;
    max-width: 700px;
    margin: 40px auto 0;
    background: #f7faff;
    border: 1px solid #d0e3ff;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.tpa-subscribe-text {
    font-size: 18px;
    margin-bottom: 15px;
}

.tpa-subscribe-btn {
    background: #007bff;
    padding: 12px 25px;
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none;
    font-size: 20px;
    display: inline-block;
}

.tpa-subscribe-btn:hover {
    background: #005ac7;
}

/*******************************************
 RESPONSIVE — FLASHCARDS
*******************************************/
@media (max-width: 600px) {
    .tpa-flash-nav {
        flex-direction: column;
        gap: 10px;
    }
    .tpa-btn {
        width: 100%;
        text-align: center;
    }
}

/*******************************************
 SUBSCRIBE PAGE — CLEAN, CENTERED, MODERN
*******************************************/
.tpa-subscribe-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.tpa-subscribe-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #003366;
    margin-bottom: 10px;
}

.tpa-sub-desc {
    text-align: center;
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 30px;
    line-height: 1.5;
}

/*******************************************
 PRICING BLOCK
*******************************************/
.tpa-price-box {
    background: #fafafa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    margin-bottom: 25px;
}

.tpa-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.tpa-price-row .label {
    font-weight: 600;
    color: #333;
}

.regular-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-weight: 600;
}

.sale-price {
    color: #00a86b;
    font-weight: 700;
}

.tpa-price-duration {
    margin-top: 10px;
    text-align: center;
    font-size: 1rem;
    color: #333;
}

/*******************************************
 AUTH BOX — USER NOT LOGGED IN
*******************************************/
.tpa-auth-cta-box {
    margin-top: 30px;
    padding: 25px;
    background: #f7faff;
    border-radius: 10px;
    border: 1px solid #dce3ff;
}

.tpa-auth-cta-box p {
    margin-bottom: 15px;
}

/*******************************************
 PAYMENT BOX — LOGGED IN USERS
*******************************************/
.tpa-payment-box {
    margin-top: 20px;
    padding: 25px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.tpa-payment-box h3 {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #003366;
}

.tpa-payment-box p {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #333;
}

/*******************************************
 SUBSCRIBE BUTTONS
*******************************************/
.tpa-btn,
.tpa-btn-primary,
.tpa-btn-green {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: #fff;
}

.tpa-btn-primary { background: #0073e6; }
.tpa-btn-primary:hover { background: #005bb5; }

.tpa-btn-green { background: #00a86b; }
.tpa-btn-green:hover { background: #008f5a; }

/*******************************************
 RESPONSIVE — SUBSCRIBE
*******************************************/
@media (max-width: 600px) {
    .tpa-subscribe-container { padding: 25px 15px; }
    .tpa-price-box { padding: 20px; }
    .tpa-payment-box { padding: 20px; }
}

/*******************************************
 ACCOUNT PAGE — CLEAN & CENTERED
*******************************************/
.tpa-account-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 35px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
}

.tpa-account-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #003366;
    font-weight: 700;
}

.tpa-account-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tpa-account-links li { margin: 20px 0; }

.tpa-account-link {
    display: inline-block;
    font-size: 1.15rem;
    padding: 12px 22px;
    background: #0073e6;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease;
}
.tpa-account-link:hover { background: #005bb5; }

/*******************************************
 RESPONSIVE — ACCOUNT PAGE
*******************************************/
@media (max-width: 600px) {
    .tpa-account-container {
        padding: 25px;
        margin: 40px auto;
    }
    .tpa-account-link {
        width: 100%;
        display: block;
    }
}

/*******************************************
 COURSE ACCESS PAGE (course-access-view.php)
*******************************************/
.tpa-course-view {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.tpa-course-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tpa-course-title-main {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: #003366;
    margin: 0 0 20px;
}

.tpa-course-long-desc {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 30px;
}

.tpa-section-header {
    font-size: 1.4rem;
    font-weight: 600;
    color: #003366;
    margin-bottom: 15px;
}

.tpa-section-btn {
    display: block;
    width: 100%;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: #eef3ff;
    border: 1px solid #d1ddff;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #003366;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.tpa-section-btn:hover {
    background: #d9e6ff;
    border-color: #a4bfff;
    transform: translateY(-2px);
}

.tpa-total-questions {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-top: 10px;
    text-align: right;
}

.tpa-final-test-box {
    margin-top: 35px;
    text-align: center;
}
.tpa-final-test-box .tpa-btn-primary {
    font-size: 18px;
    padding: 14px 32px;
    display: inline-block;
    border-radius: 8px;
}

/*******************************************
 RESPONSIVE — ACCESS PAGE
*******************************************/
@media (max-width: 600px) {
    .tpa-course-box { padding: 20px; }
    .tpa-course-title-main { font-size: 1.6rem; }
    .tpa-section-btn { font-size: 0.95rem; padding: 12px 14px; }
    .tpa-final-test-box .tpa-btn-primary {
        width: 100%;
        padding: 16px;
    }
}

/*******************************************
 ASSESSMENT QUIZ PAGE — CLEAN & CENTERED
*******************************************/
.tpa-quiz-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
    box-sizing: border-box;
}

/* Title */
.tpa-quiz-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #003366;
    margin-bottom: 20px;
}

/*******************************************
 QUIZ QUESTION CONTAINER (like demo box)
*******************************************/
#quiz-box {
    background: #fafafa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    min-height: 200px;
}

/*******************************************
 QUESTION ELEMENTS
*******************************************/
.tpa-quiz-question {
    padding: 10px;
}

.tpa-q-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #003366;
    margin-bottom: 12px;
}

.tpa-q-text {
    font-size: 1.05rem;
    margin-bottom: 18px;
    color: #222;
}
/* SCORE BOX — centered on its own line */
#scoreBox {
    text-align: center;
    width: 100%;
    display: block;
    margin: 10px auto;
    font-size: 1.2rem;
    font-weight: 600;
}

/* NAVIGATION — all centered on one line */
#navigation {
    text-align: center;
    width: 100%;
    margin: 15px 0;
}

/* Page X of Y centered */
.tpa-page-info {
    display: inline-block;
    margin: 0 15px;
    font-weight: 500;
}


/*******************************************
 OPTIONS (use same look as demo answers)
*******************************************/
.tpa-q-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tpa-q-option {
    background: #fff;
    border: 1px solid #cdd6e0;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tpa-q-option:hover {
    background: #eef5ff;
    border-color: #0073e6;
}

.tpa-q-option.selected {
    background: #0073e6;
    color: #fff;
    border-color: #005bb5;
}

/*******************************************
 NAVIGATION (similar to demo nav)
*******************************************/
.tpa-q-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
}

/* Navigation Buttons */
.tpa-btn-nav {
    background: #0073e6;
    color: #fff !important;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.tpa-btn-nav:hover {
    background: #005bb5;
}

.tpa-btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/*******************************************
 END SCREEN
*******************************************/
.tpa-quiz-complete {
    text-align: center;
    padding: 30px;
}

.tpa-quiz-complete h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #0073e6;
}

.tpa-quiz-complete p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/*******************************************
 RESPONSIVE
*******************************************/
@media (max-width: 600px) {
    .tpa-q-nav {
        flex-direction: column;
        gap: 12px;
    }

    .tpa-btn-nav {
        width: 100%;
    }
}

