/*
 * DiviPower Academy Frontend Styles
 * Replaces inline styles for marketplace, course hub, and shared utilities.
 */

/* ---- Marketplace Filter & Sort Controls ---- */

/* Container – centers the forms side-by-side */
.da-marketplace-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 20px 0 0 0;
}

/* Individual forms */
.da-filter-form,
.da-sort-form {
    display: flex;
    align-items: center;
}

/* Select boxes */
.da-filter-select,
.da-sort-select {
    padding: 10px 35px 10px 15px;
    border-radius: 12px;
    border: 2px solid var(--da-accent-color, #2b87da);
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    /* Visible dark‑grey arrow */
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><polygon points="0,3 6,9 12,3" fill="%23333333"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
}

/* Hover / Focus */
.da-filter-select:hover,
.da-sort-select:hover,
.da-filter-select:focus,
.da-sort-select:focus {
    border-color: var(--da-accent-color);
    box-shadow: 0 0 0 3px rgba(43, 135, 218, 0.1);
    outline: none;
}
/* ==================== Marketplace Grid ==================== */
.da-marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==================== Course Hub Layout ==================== */
/* Overrides the grid in lesson-style.css when this stylesheet is loaded. */
.da-course-hub-layout {
    display: flex !important;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.da-course-sidebar {
    flex: 0 0 280px;
    min-width: 0;
    overflow: hidden;
}

/* ==================== Skip-to-content link ==================== */
.da-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 999999;
}

.da-skip-link:focus {
    left: 10px;
    top: 10px;
    width: auto;
    height: auto;
    padding: 10px 20px;
    background: var(--da-accent);
    color: #fff;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
}

/* ==================== Lesson Viewer ==================== */

/* Wrapper and tablet frame – already styled by lesson-style.css, here only overrides */
.da-lesson-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* Header bar – fine‑tune inline overrides */
.da-lesson-header .da-lesson-back-link {
    margin-left: 15px;
}

/* Lesson content area */
.da-lesson-resource-wrap {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.da-lesson-resource-title {
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Quiz intro */
.da-quiz-intro {
    color: #666;
    margin-bottom: 30px;
}

/* Quiz question card */
.da-quiz-question {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.da-quiz-question p {
    font-weight: 600;
    margin-bottom: 12px;
}

.da-quiz-option {
    display: block;
    padding: 10px 15px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.da-quiz-option:hover {
    border-color: var(--da-accent);
}

.da-quiz-option input {
    margin-right: 8px;
}

.da-quiz-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.da-quiz-input:focus {
    outline: none;
    border-color: var(--da-accent);
}

/* Discussion section */
.da-discussion-wrap {
    padding: 20px 0 0 0;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.da-discussion-title {
    font-size: 1rem;
    margin-bottom: 15px;
}

.da-comment-list {
    margin-bottom: 15px;
}

.da-comment-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.da-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.da-comment-author {
    font-size: 0.75rem;
}

.da-comment-date {
    font-size: 0.65rem;
    color: #999;
}

.da-comment-delete {
    font-size: 0.6rem;
    color: #ccc;
    margin-left: 8px;
    text-decoration: none;
}

.da-comment-text {
    font-size: 0.8rem;
    color: #555;
    margin: 0;
}

.da-reply-link {
    font-size: 0.7rem;
    color: #888;
    text-decoration: none;
}

.da-reply-box {
    display: none;
    margin-top: 8px;
    margin-left: 15px;
}

.da-reply-box textarea {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.75rem;
}

.da-reply-submit {
    margin-top: 4px;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    background: var(--da-accent);
}

.da-reply-item {
    padding: 10px;
    margin-bottom: 8px;
    margin-left: 25px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #d0e4ff;
}

.da-reply-author {
    font-size: 0.75rem;
    color: #2271b1;
}

.da-reply-badge {
    font-size: 0.6rem;
    background: #d0e4ff;
    padding: 1px 6px;
    border-radius: 10px;
}

.da-reply-text {
    font-size: 0.8rem;
    color: #555;
    margin: 0;
}

.da-no-comments {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    padding: 15px;
}

.da-comment-form {
    margin-top: 10px;
}

.da-comment-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.8rem;
}

.da-comment-submit {
    margin-top: 8px;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--da-accent);
}

/* Back to Course / My Account links */
.da-lesson-header .da-lesson-back-link {
    margin-left: 15px;
}

/* ==================== Student Portal ==================== */

/* Layout */
.da-portal-layout {
    display: flex;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
}

.da-portal-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 20px;
}

.da-portal-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.da-portal-main-inner {
    display: grid;
    gap: 12px;
}

/* Welcome heading */
.da-welcome-heading {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin: 30px 0 40px;
    font-weight: 800;
}

/* Mastery badge */
.da-mastery-badge-wrap {
    text-align: center;
    margin: -25px 0 30px;
}

.da-mastery-badge {
    display: inline-block;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Sidebar sections */
.da-sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px;
}

.da-sidebar-heading-space {
    margin-top: 20px;
}

.da-sidebar-link {
    display: block;
    padding: 3px 0;
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
}

.da-sidebar-link-completed {
    color: #888;
}

.da-sidebar-link-accomplishment {
    padding: 4px 0;
    color: #666;
    font-size: 0.8rem;
}

.da-sidebar-no-data {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

/* Bookmarks */
.da-bookmark-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.da-bookmark-link {
    color: #666;
    text-decoration: none;
    font-size: 0.75rem;
}

.da-bookmark-remove {
    color: #ccc;
    text-decoration: none;
    font-size: 0.6rem;
}

/* My Ratings */
.da-rating-link {
    display: block;
    padding: 3px 0;
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
}

.da-no-ratings {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* My Data links */
.da-my-data-link {
    display: block;
    padding: 4px 0;
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
}

.da-deletion-link {
    display: block;
    padding: 4px 0;
    color: #c0392b;
    text-decoration: none;
    font-size: 0.8rem;
}

/* Teacher courses heading */
.da-teacher-courses-heading {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.da-teacher-courses-wrap {
    max-width: 900px;
    margin: 0 auto 40px;
}

.da-teacher-course-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px 25px;
    margin-bottom: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.da-teacher-course-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.da-teacher-course-cat {
    display: inline-block;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 8px;
    background: var(--da-accent);
}

.da-teacher-course-title {
    font-size: 0.95rem;
}

.da-teacher-course-students {
    font-size: 0.75rem;
    color: #888;
    margin-left: 10px;
}

.da-teacher-course-actions {
    display: flex;
    gap: 8px;
}

.da-teacher-edit-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #f0f0f0;
    color: #555;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

.da-teacher-view-btn {
    display: inline-block;
    padding: 6px 16px;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--da-accent);
}

/* My Courses section */
.da-my-courses-heading {
    margin-top: 0;
    color: #333;
}

.da-my-courses-card {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.da-my-courses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.da-my-courses-title {
    font-size: 0.9rem;
}

.da-my-courses-completed {
    font-size: 0.7rem;
    color: #27ae60;
    font-weight: 600;
    margin-left: 8px;
}

.da-my-courses-next {
    font-size: 0.7rem;
    color: #888;
    margin-left: 8px;
}

.da-my-courses-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.da-my-courses-pct {
    font-size: 0.7rem;
    color: #888;
    text-align: right;
}

.da-my-courses-bar-bg {
    background: #f0f0f0;
    width: 80px;
    height: 4px;
    border-radius: 2px;
}

.da-my-courses-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--da-accent);
}

.da-my-courses-resume-btn {
    background: var(--da-accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
}

.da-my-courses-modules {
    /* container for individual module rows */
}

.da-my-courses-module-done {
    color: #27ae60;
    font-size: 0.7rem;
    padding: 2px 0;
}

.da-my-courses-module-undone {
    color: #ccc;
    font-size: 0.7rem;
    padding: 2px 0;
}

/* Journal */
.da-journal-wrap {
    margin-top: 10px;
    font-size: 0.7rem;
}

.da-journal-toggle {
    color: #888;
    text-decoration: none;
}

.da-journal-form {
    display: none;
    margin-top: 8px;
}

.da-journal-form-inner {
    display: grid;
    gap: 6px;
}

.da-journal-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.75rem;
}

.da-journal-save-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
}

/* Registration form (dark theme) */
.da-register-wrapper {
    background: #000;
    border: 2px solid #222;
    border-radius: 30px;
    padding: 50px;
    color: #fff;
    max-width: 550px;
    margin: 0 auto 40px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.da-register-title {
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 0;
    font-size: 20px;
}

.da-register-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.da-register-form {
    display: grid;
    gap: 18px;
}

.da-register-input {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 18px;
    border-radius: 15px;
    font-size: 16px;
}

.da-register-submit {
    color: #000;
    border: none;
    padding: 20px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: 0.3s;
    background: var(--da-accent);
}

.da-register-login-link {
    font-size: 12px;
    margin-top: 25px;
    color: #666;
}

/* Deletion success */
.da-deletion-success {
    color: #27ae60;
    text-align: center;
    padding: 20px;
}

/* No enrollments prompt */
.da-no-enrollments {
    color: #888;
    text-align: center;
}

/* Accent color utility */
.da-accent-color {
    color: var(--da-accent);
}

/* Password error */
.da-password-error {
    color: #ff4d4d;
    text-align: center;
    padding: 15px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Account exists message */
.da-account-exists {
    color: #ff4d4d;
    text-align: center;
    padding: 15px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

/* ==================== Welcome Page ==================== */
.da-welcome-wrapper {
    max-width: 700px;
    margin: 50px auto;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.da-welcome-header {
    padding: 50px 30px;
    border-radius: 20px 20px 0 0;
    background: var(--da-accent);
}

.da-welcome-header h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
}

.da-welcome-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin: 15px 0 0;
}

.da-welcome-course-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 5px 0 0;
}

.da-welcome-body {
    background: #fff;
    padding: 40px 30px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.da-welcome-ring-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.da-welcome-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    color: var(--da-accent);
}

.da-welcome-cta {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 10px;
}

.da-welcome-email-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 25px;
}

.da-welcome-start-btn {
    display: inline-block;
    color: #fff;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    background: var(--da-accent);
}

.da-welcome-confetti {
    font-size: 0.8rem;
    color: #999;
    margin-top: 25px;
}

/* ==================== Registration Form ==================== */
.da-reg-form-wrapper {
    max-width: 500px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
    text-align: center;
}

.da-reg-form-title {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--da-accent);
}

.da-reg-form-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 20px 0;
}

.da-reg-form {
    display: grid;
    gap: 14px;
    text-align: left;
}

.da-reg-form label {
    font-size: 0.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.da-reg-form input[type="text"],
.da-reg-form input[type="email"],
.da-reg-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.da-reg-form input[type="submit"] {
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 5px;
    background: var(--da-accent);
}

.da-reg-consent-label {
    font-size: 0.7rem;
    color: #888;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
    line-height: 1.4;
}

.da-reg-consent-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.da-reg-login-link {
    font-size: 0.8rem;
    color: #999;
    margin: 18px 0 0 0;
}

.da-reg-login-link a {
    color: var(--da-accent);
    font-weight: 600;
}

/* ==================== Privacy Policy ==================== */
.da-privacy-policy {
    max-width: 700px;
    margin: 20px auto;
    padding: 15px 20px;
    background: #f9f9f9;
    border-left: 4px solid var(--da-accent);
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}