/* Civic Dispatch Course Dashboard Styles */

body.cd-has-custom-dashboard,
body.cd-has-custom-dashboard .elementor,
body.cd-has-custom-dashboard h1,
body.cd-has-custom-dashboard h2,
body.cd-has-custom-dashboard h3,
body.cd-has-custom-dashboard h4,
body.cd-has-custom-dashboard h5,
body.cd-has-custom-dashboard h6,
body.cd-has-custom-dashboard p,
body.cd-has-custom-dashboard span,
body.cd-has-custom-dashboard a,
body.cd-has-custom-dashboard button,
body.cd-has-custom-dashboard td,
body.cd-has-custom-dashboard th,
.cd-dashboard-container,
.cd-dashboard-container *,
.cd-card,
.cd-hero-card,
.cd-progress-card,
.cd-announcement-card,
.cd-header-bar,
.cd-btn,
.cd-lesson-row,
.cd-breadcrumbs,
[class*="cd-"] {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.cd-dashboard-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 15px 40px;
    color: #1e293b;
    box-sizing: border-box;
    width: 100%;
}

.cd-dashboard-container * {
    box-sizing: border-box;
}

/* Breadcrumbs */
.cd-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}
.cd-breadcrumb-link {
    color: #0B4D3C;
    text-decoration: underline;
}
.cd-breadcrumb-link:hover {
    color: #08382c;
}
.cd-breadcrumb-sep {
    color: #64748b;
}
.cd-breadcrumb-current {
    color: #0f172a;
    text-decoration: none;
}

/* Grid Layout Rows */
.cd-grid-row {
    margin-bottom: 20px;
    width: 100%;
}
.cd-row-desc-inst,
.cd-row-three-cards,
.cd-row-lessons-cal,
.cd-row-files-res {
    display: flex;
    gap: 20px;
    width: 100%;
}

.cd-col-65 {
    flex: 0 0 calc(65% - 10px);
    max-width: calc(65% - 10px);
    width: calc(65% - 10px);
}
.cd-col-35 {
    flex: 0 0 calc(35% - 10px);
    max-width: calc(35% - 10px);
    width: calc(35% - 10px);
}
.cd-col-33 {
    flex: 0 0 calc(33.333% - 13.333px);
    max-width: calc(33.333% - 13.333px);
    width: calc(33.333% - 13.333px);
}
.cd-col-50 {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
    width: calc(50% - 10px);
}

/* Hero Section */
.cd-hero-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
}
.cd-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(8, 56, 44, 0.94) 0%, rgba(11, 77, 60, 0.84) 40%, rgba(15, 23, 42, 0.45) 100%);
    z-index: 1;
}
.cd-hero-content {
    position: relative;
    z-index: 2;
    padding: 32px;
    width: 100%;
    color: #ffffff;
}
.cd-hero-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.cd-logo-bars {
    display: inline-flex;
    gap: 5px;
    transform: skewX(-18deg);
}
.cd-logo-bars span {
    display: inline-block;
    width: 9px;
    height: 28px;
    background-color: #E5A93C;
    border-radius: 3px;
}
.cd-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.cd-logo-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.cd-logo-subtitle {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-top: 2px;
    opacity: 0.9;
}
.cd-hero-title {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px 0;
    color: #ffffff;
}
.cd-hero-subheading {
    font-size: 20px;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 16px;
    color: #e2e8f0;
}
.cd-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #e2e8f0;
    font-weight: 600;
}
.cd-meta-bullet {
    opacity: 0.7;
}

/* Buttons */
.cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    line-height: 1.2;
}
.cd-btn-forest {
    background-color: #0B4D3C;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
}
.cd-btn-forest:hover {
    background-color: #08382c;
    color: #ffffff !important;
}
.cd-btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}
.cd-btn-card {
    padding: 8px 16px;
    font-size: 13px;
    align-self: flex-start;
    margin-top: 10px;
}
.cd-btn-lesson {
    padding: 7px 16px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}
.cd-btn-arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}
.cd-btn:hover .cd-btn-arrow {
    transform: translateX(3px);
}

/* Header Bars */
.cd-header-bar {
    padding: 12px 18px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}
.cd-header-gold {
    background-color: #E5A93C;
    color: #1a202c;
}
.cd-header-olive {
    background-color: #5E8237;
    color: #ffffff;
}
.cd-header-terracotta {
    background-color: #C85A32;
    color: #ffffff;
}
.cd-header-forest {
    background-color: #0B4D3C;
    color: #ffffff;
}

/* Base Card */
.cd-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}
.cd-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}
.cd-card-text,
.cd-card-custom-content,
.cd-card-custom-content p,
.cd-card-custom-content li,
.cd-card-custom-content span,
.cd-desc-wrapper p,
.cd-desc-wrapper div,
.cd-syllabus-wrapper p,
.cd-syllabus-wrapper div,
.cd-syllabus-wrapper li {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    font-weight: 400 !important;
}

.cd-card-text {
    margin: 0 0 12px 0;
}

.cd-desc-short p,
.cd-syllabus-short p,
.cd-desc-full p,
.cd-syllabus-full p,
.cd-card-custom-content p {
    margin: 0 0 10px 0 !important;
}

.cd-desc-full p:last-child,
.cd-syllabus-full p:last-child,
.cd-card-custom-content p:last-child {
    margin-bottom: 6px !important;
}

/* Card Rich Dummy Data Styles */
.cd-card-inner-content {
    margin-bottom: 12px;
}
.cd-card-subheading {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}
.cd-card-bullets {
    margin: 0 0 12px 0;
    padding-left: 18px;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.5;
}
.cd-card-bullets li {
    margin-bottom: 4px;
}
.cd-card-meta-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
    margin: 0 0 10px 0;
}
.cd-card-stat-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.cd-card-stat-badge {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.cd-thinktank-topic {
    background-color: #f8fafc;
    border-left: 3px solid #C85A32;
    padding: 8px 10px;
    font-size: 12px;
    color: #334155;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
    line-height: 1.4;
}
.cd-gradebook-score-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fffdf4 0%, #fef9e2 100%);
    border: 1px solid #f5dfa0;
    border-radius: 8px;
}
.cd-gradebook-score-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.cd-gradebook-score-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.cd-gradebook-pct {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: #78350f;
}
.cd-gradebook-caption {
    font-size: 11.5px;
    font-weight: 600;
    color: #92400e;
}
.cd-grade-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.cd-grade-pill-good {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.cd-grade-pill-mid {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.cd-grade-pill-low {
    background-color: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}
.cd-grade-mini-track {
    width: 100%;
    height: 6px;
    background-color: rgba(180, 83, 9, 0.14);
    border-radius: 999px;
    overflow: hidden;
}
.cd-grade-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #0B4D3C 0%, #557a29 100%);
    border-radius: 999px;
    transition: width 0.35s ease;
}
.cd-gradebook-rubrics {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    font-size: 12.5px;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cd-gradebook-rubrics li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.cd-rubric-name {
    color: #334155;
    font-weight: 600;
    line-height: 1.35;
}
.cd-rubric-score-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cd-score-high {
    background-color: #dcfce7;
    color: #166534;
}
.cd-score-pending {
    background-color: #fef3c7;
    color: #92400e;
}
.cd-score-muted {
    background-color: #e2e8f0;
    color: #475569;
}
.cd-feedback-quote {
    font-style: italic;
    color: #475569;
    font-size: 11.5px;
}

/* Progress Card */
.cd-progress-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    width: 100%;
}
.cd-progress-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    max-width: 70%;
}
.cd-progress-label {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}
.cd-progress-track {
    background-color: #e2e8f0;
    border-radius: 999px;
    height: 12px;
    min-height: 12px;
    max-height: 12px;
    width: 220px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.cd-progress-fill {
    background-color: #0B4D3C;
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}
.cd-progress-number {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* Announcements */
.cd-section-announcements {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    width: 100%;
}
.cd-announcement-body {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cd-announcement-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cd-icon-megaphone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cd-announcement-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* Instructor Card */
.cd-instructor-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px 0;
}
.cd-instructor-name {
    font-size: 20px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #0f172a;
}
.cd-instructor-role-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f0f5eb;
    color: #3d5e18;
    border: 1px solid #cfe0bc;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.3;
    white-space: nowrap;
}
.cd-instructor-role {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
}
.cd-instructor-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cd-inst-action-row,
.cd-inst-hours-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.cd-inst-action-row:hover {
    background-color: #eef5f2;
    border-color: #0B4D3C;
}
.cd-inst-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: #e6f0ec;
    color: #0B4D3C;
    flex-shrink: 0;
}
.cd-inst-action-text {
    color: #0B4D3C;
    font-size: 13.5px;
    font-weight: 700;
}
.cd-inst-hours-content {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.35;
}
.cd-hours-label {
    color: #0B4D3C;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.cd-instructor-hours-value {
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}
.cd-link-forest {
    color: #0B4D3C;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.cd-link-forest:hover {
    color: #08382c;
}

/* Lessons Section */
.cd-lessons-card {
    min-height: 380px;
    width: 100%;
}
.cd-lessons-list {
    padding: 0;
    overflow-y: auto;
    max-height: 440px;
}
.cd-lesson-row {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cd-lesson-row:last-child {
    border-bottom: none;
}
.cd-lesson-info {
    flex: 1 1 auto;
    min-width: 0;
}
.cd-lesson-header-line {
    margin-bottom: 6px;
}
.cd-lesson-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}
.cd-lesson-dates {
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 4px;
    font-weight: 500;
}
.cd-date-gap {
    display: inline-block;
    width: 14px;
}
.cd-link-assignments {
    font-size: 12px;
    font-weight: 600;
    color: #0B4D3C;
    text-decoration: underline;
    cursor: pointer;
}

/* Lesson Action (Badge stacked above Open Lesson button) */
.cd-lesson-action {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    min-width: 140px !important;
}

/* Badges */
.cd-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}
.cd-badge-completed {
    background-color: #dcfce7 !important;
    color: #15803d !important;
}
.cd-badge-progress {
    background-color: #e0f2fe !important;
    color: #0284c7 !important;
}
.cd-badge-not-started {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
}
.cd-spinner-dot {
    width: 8px;
    height: 8px;
    border: 2px solid #0284c7;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cd-spin 1s linear infinite;
    display: inline-block;
}
.cd-empty-circle {
    width: 8px;
    height: 8px;
    border: 1.5px solid #64748b;
    border-radius: 50%;
    display: inline-block;
}
@keyframes cd-spin {
    to { transform: rotate(360deg); }
}

/* Course Calendar */
.cd-calendar-card {
    min-height: 380px;
    width: 100%;
}
.cd-cal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    overflow: hidden;
}
.cd-cal-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
}
.cd-cal-month-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    text-align: center !important;
    flex: 1 1 auto !important;
    line-height: 1.2 !important;
    margin: 0 8px !important;
    padding: 0 !important;
    display: block !important;
}
.cd-cal-nav-btn,
button.cd-cal-nav-btn,
.cd-card button.cd-cal-nav-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    line-height: 30px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}
.cd-cal-nav-btn:hover,
button.cd-cal-nav-btn:hover,
.cd-card button.cd-cal-nav-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0B4D3C !important;
}
.cd-cal-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    text-align: center;
    font-size: 12px;
    margin-bottom: 14px;
    table-layout: fixed !important;
}
.cd-cal-table th {
    padding: 6px 0 !important;
    font-weight: 700;
    color: #475569;
    font-size: 11px;
    width: 14.285% !important;
    text-align: center;
}
.cd-cal-table td {
    padding: 3px 0 !important;
    color: #1e293b;
    height: 30px;
    position: relative;
    width: 14.285% !important;
    text-align: center;
    vertical-align: middle;
}
.cd-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    font-weight: 500;
    margin: 0 auto;
}
.cd-has-event .cd-day-num {
    font-weight: 700;
}
.cd-event-dot {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.cd-dot-practice {
    background-color: #00a373;
}
.cd-dot-dispatch {
    background-color: #C85A32;
}

.cd-cal-legend {
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-bottom: 14px;
}
.cd-legend-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}
.cd-legend-item {
    font-size: 12px;
    color: #334155;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cd-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.cd-cal-action {
    display: flex;
    justify-content: center;
}
.cd-btn-full-cal {
    width: 100%;
    text-align: center;
    padding: 8px 14px;
    font-size: 13px;
}

/* Linked R-opportunity */
.cd-opportunity-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    width: 100%;
}
.cd-opportunity-body {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cd-opportunity-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Remove Footer */
.cd-dashboard-footer,
.cd-row-footer,
.elementor-element-sec_foot {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   BUDDYBOSS THEME OVERRIDES FOR SINGLE COURSE DASHBOARD
   (Only applies when custom dashboard is active on the course)
   ========================================================================== */
body.cd-has-custom-dashboard .bb-learndash-banner,
body.cd-has-custom-dashboard .bb-learndash-sidebar,
body.cd-has-custom-dashboard .bb-learndash-side-area,
body.cd-has-custom-dashboard .bb-learndash-content-wrap > .ld-status,
body.cd-has-custom-dashboard .bb-learndash-content-wrap > .ld-infobar,
body.cd-has-custom-dashboard .bb-course-points,
body.cd-has-custom-dashboard .bb-course-banner-info,
body.cd-has-custom-dashboard .bb-course-author-details,
body.cd-has-custom-dashboard .bb-course-items,
body.cd-has-custom-dashboard .ld-tabs-navigation,
body.cd-has-custom-dashboard div[class*="learndash-shortcode-wrap-course_content"],
body.cd-has-custom-dashboard [class*="ld-course-content-"],
body.cd-has-custom-dashboard .learndash-wrapper .ld-item-list.ld-lesson-list,
body.cd-has-custom-dashboard .learndash-wrapper .ld-section-heading,
body.cd-has-custom-dashboard .bb-ld-tabs ~ .ld-item-list,
body.cd-has-custom-dashboard .bb-ld-tabs ~ div:not(.learndash-wrapper-login-modal),
body.cd-has-custom-dashboard .ld-tab-content[id*="ld-tab-materials-"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.cd-has-custom-dashboard .bb-grid,
body.cd-has-custom-dashboard .site-content-grid {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.cd-has-custom-dashboard .bb-learndash-content-wrap {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.cd-has-custom-dashboard #primary.content-area,
body.cd-has-custom-dashboard .site-main,
body.cd-has-custom-dashboard .learndash-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.cd-has-custom-dashboard .site-content > .container {
    max-width: 1200px !important;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

body.cd-has-custom-dashboard .bb-ld-tabs,
body.cd-has-custom-dashboard .ld-tabs-content,
body.cd-has-custom-dashboard .ld-tab-content {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE STYLES (TABLET & MOBILE)
   ========================================================================== */

/* Tablet Breakpoint (max-width: 1024px) */
@media (max-width: 1024px) {
    .elementor-container,
    .cd-row-desc-inst,
    .cd-row-three-cards,
    .cd-row-lessons-cal,
    .cd-row-files-res {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 16px !important;
    }
    
    /* Support both Elementor columns and custom shortcode columns */
    .elementor-column.elementor-col-65,
    .elementor-column.elementor-col-35,
    .elementor-column.elementor-col-33,
    .elementor-column.elementor-col-50,
    .elementor-column[class*="elementor-col-"],
    .cd-col-65,
    .cd-col-35,
    .cd-col-33,
    .cd-col-50 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .cd-progress-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .cd-progress-left {
        max-width: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 14px !important;
    }
    .cd-progress-track {
        flex: 1 1 auto !important;
        width: auto !important;
        height: 12px !important;
        min-height: 12px !important;
        max-height: 12px !important;
    }

    .cd-hero-title {
        font-size: 28px !important;
    }
    .cd-hero-content {
        padding: 24px !important;
    }
}

/* Mobile Breakpoint (max-width: 767px) */
@media (max-width: 767px) {
    .cd-dashboard-container {
        padding: 12px 10px 30px !important;
    }

    /* Hero */
    .cd-logo-bars span {
        width: 7px !important;
        height: 22px !important;
    }
    .cd-logo-title {
        font-size: 18px !important;
    }
    .cd-logo-subtitle {
        font-size: 10px !important;
    }
    .cd-header-bar {
        font-size: 16.5px !important;
        padding: 10px 14px !important;
    }
    .cd-hero-card {
        min-height: auto !important;
    }
    .cd-hero-content {
        padding: 18px 14px !important;
    }
    .cd-hero-title {
        font-size: 22px !important;
        line-height: 1.25 !important;
    }
    .cd-hero-subheading {
        font-size: 14.5px !important;
        margin-bottom: 12px !important;
    }
    .cd-hero-meta {
        font-size: 12px !important;
        gap: 5px !important;
    }

    /* Progress */
    .cd-progress-card {
        padding: 14px 16px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .cd-progress-left {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 6px 12px !important;
    }
    .cd-progress-label {
        order: 1 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
    }
    .cd-progress-number {
        order: 2 !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        margin-left: auto !important;
    }
    .cd-progress-track {
        order: 3 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 12px !important;
        min-height: 12px !important;
        max-height: 12px !important;
        flex: 0 0 12px !important;
        margin-top: 4px !important;
        background-color: #e2e8f0 !important;
        border-radius: 999px !important;
        overflow: hidden !important;
    }
    .cd-progress-fill {
        height: 12px !important;
        min-height: 12px !important;
        max-height: 12px !important;
        background-color: #0B4D3C !important;
        border-radius: 999px !important;
    }
    .cd-progress-right {
        width: 100% !important;
        margin-top: 4px !important;
    }
    .cd-progress-right .cd-btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
    }

    /* Announcements */
    .cd-announcement-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 12px 14px !important;
    }
    .cd-announcement-body .cd-btn {
        width: 100% !important;
    }

    /* Lessons */
    .cd-lessons-list {
        max-height: 480px !important;
    }
    .cd-lesson-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px 14px !important;
    }
    .cd-lesson-header-line {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .cd-lesson-action {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        min-width: 0 !important;
    }
    .cd-lesson-action .cd-badge {
        flex-shrink: 0 !important;
    }
    .cd-lesson-action .cd-btn {
        width: auto !important;
        text-align: center !important;
    }

    /* Calendar */
    .cd-cal-body {
        padding: 12px !important;
    }
    .cd-cal-table th,
    .cd-cal-table td {
        font-size: 10.5px !important;
    }
    .cd-day-num {
        width: 22px !important;
        height: 22px !important;
        line-height: 22px !important;
        font-size: 11px !important;
    }

    /* Cards */
    .cd-card-body {
        padding: 14px !important;
    }
    .cd-btn-card {
        width: 100% !important;
        text-align: center !important;
    }

    /* Opportunity */
    .cd-opportunity-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px !important;
    }
    .cd-opportunity-body .cd-btn {
        width: 100% !important;
    }
}

/* Syllabus & Description Read More Button */
.cd-read-more-btn {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    background: transparent !important;
    border: none !important;
    padding: 4px 0 2px 0 !important;
    color: #174f3e !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-decoration: underline !important;
    transition: color 0.2s ease !important;
    line-height: 1.5 !important;
}

.cd-read-more-btn:hover {
    color: #0c2d23 !important;
}

.cd-read-more-btn .cd-btn-arrow {
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    line-height: 1 !important;
}

/* Think Tank v2.0 Coming Soon & Disabled Button */
.cd-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cd-header-pill {
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}
.cd-coming-soon-note {
    background-color: #f8fafc;
    border-left: 3px solid #94a3b8;
    padding: 8px 10px;
    font-size: 12.5px;
    color: #475569;
    border-radius: 0 4px 4px 0;
    margin-bottom: 10px;
}
.cd-btn-disabled,
.cd-btn-disabled:hover,
.cd-btn-disabled:focus,
button.cd-btn-disabled:disabled {
    background-color: #cbd5e1 !important;
    color: #475569 !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 6px !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Co-requisite Opportunity Badge */
.cd-opportunity-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #854d0e;
    background-color: #fef9c3;
    border: 1px solid #fde047;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* Dashboard Modals (Announcements, Course Files, Inline Syllabus) */
@keyframes cdModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes cdModalSlideUp {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.cd-modal-open {
    overflow: hidden;
}
.cd-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    animation: cdModalFadeIn 0.18s ease-out;
}
.cd-modal-backdrop *,
.cd-modal-backdrop *::before,
.cd-modal-backdrop *::after {
    box-sizing: border-box;
}
.cd-modal-dialog {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 650px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    animation: cdModalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-modal-header {
    padding: 16px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.cd-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.cd-modal-header-left > div {
    min-width: 0;
    flex: 1;
}
.cd-modal-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cd-modal-header-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}
.cd-modal-header-sub {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cd-modal-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: #ffffff !important;
    line-height: 0 !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    transition: background-color 0.18s ease, transform 0.18s ease;
}
.cd-modal-close svg {
    display: block !important;
    margin: 0 !important;
    pointer-events: none;
}
.cd-modal-close:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: rotate(90deg);
}
.cd-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #ffffff;
}
.cd-modal-body::-webkit-scrollbar {
    width: 6px;
}
.cd-modal-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 999px;
}
.cd-modal-intro {
    font-size: 14px;
    color: #475569;
    margin: 0 0 14px 0;
}
.cd-modal-empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 22px 18px;
    text-align: center;
}
.cd-modal-footer {
    padding: 12px 22px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cd-modal-footer-meta {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}
.cd-modal-footer-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cd-btn-secondary-outline {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
}
.cd-btn-secondary-outline:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Announcements Modal Items */
.cd-ann-modal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cd-ann-modal-item {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
    padding: 14px 16px;
    background-color: #ffffff;
}
.cd-ann-modal-item.cd-ann-is-latest {
    border-left-color: #D9A74A;
    background: linear-gradient(135deg, #fffdf6 0%, #ffffff 100%);
    box-shadow: 0 2px 10px rgba(217, 167, 74, 0.12);
}
.cd-ann-modal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.cd-ann-modal-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a;
}
.cd-ann-date-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}
.cd-ann-date-pill.cd-ann-date-latest {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.cd-ann-modal-empty {
    margin: 0;
    font-size: 13.5px;
    color: #64748b;
    font-style: italic;
}
.cd-ann-modal-cta {
    margin-top: 12px;
}

/* Syllabus Modal Sections */
.cd-syllabus-modal-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.cd-syllabus-modal-section:last-child {
    margin-bottom: 0;
}
.cd-syllabus-modal-section h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: #0B4D3C;
    margin: 0 0 8px 0;
}

/* Course Files Modal Items */
.cd-modal-files-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cd-modal-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.cd-modal-file-item:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.cd-modal-file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
    max-width: 100%;
}
.cd-modal-file-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    max-width: 100%;
}
.cd-file-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}
.cd-ext-default { background: #e2e8f0; color: #1e293b; }
.cd-ext-pdf     { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.cd-ext-doc     { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.cd-ext-ppt     { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.cd-ext-xls     { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.cd-modal-file-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cd-modal-file-sub {
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Student Grades Full Page (/grades/) */
.cd-grades-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cd-grades-heading {
    margin: 6px 0 0 0;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}
.cd-grades-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.cd-grades-course-filter select {
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #0f172a;
}
.cd-grades-table-wrap {
    overflow-x: auto;
}
.cd-grades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.cd-grades-table th,
.cd-grades-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.cd-grades-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
    font-size: 13px;
}
.cd-grades-table tr:last-child td {
    border-bottom: none;
}
.cd-grade-subfile {
    font-size: 12px;
    margin-top: 3px;
}
.cd-grade-subfile a {
    color: #475569;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cd-modal-backdrop {
        padding: 10px;
    }
    .cd-modal-dialog {
        max-height: 90vh;
    }
    .cd-modal-header {
        padding: 14px 16px;
    }
    .cd-modal-body {
        padding: 14px 16px;
    }
    .cd-modal-footer {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .cd-modal-file-item {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    .cd-modal-file-meta {
        flex: none;
        width: 100%;
        align-items: flex-start;
    }
    .cd-modal-file-text {
        width: 100%;
    }
    .cd-modal-file-name,
    .cd-modal-file-sub {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.35;
    }
    .cd-ann-modal-item,
    .cd-syllabus-modal-section {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .cd-modal-file-item .cd-btn {
        width: 100%;
    }
}