/* Base Styles */

body {
    font-family: 'Inter', sans-serif;
    -ms-overflow-style: none;
    overflow-y: scroll;
    margin: 0;
    padding: 0;
}

* {
    scrollbar-width: none;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    display: none;
}


/* Header Styles for Dashboard/Header Components (shared) */

.dashboard-header {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.dashboard-header .header-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .dashboard-header .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }
}

.dashboard-header .title-section {
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .dashboard-header .title-section {
        margin-bottom: 0;
    }
}

.dashboard-header h1 {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.dashboard-header .subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.dashboard-header .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .dashboard-header .actions {
        justify-content: flex-end;
    }
}

.dashboard-header .btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.dashboard-header .btn-primary {
    background-color: #7c3aed;
    color: white;
}

.dashboard-header .btn-primary:hover {
    background-color: #6d28d9;
}

.dashboard-header .btn-success {
    background-color: #2E7D31;
    color: white;
}

.dashboard-header .btn-success:hover {
    background-color: #246125;
}

.dashboard-header .btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.dashboard-header .btn-secondary:hover {
    background-color: #e5e7eb;
}

.dashboard-header .btn img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.search-bar {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 var(--scaled-30);
}

.icons-section {
    display: flex;
    align-items: center;
    gap: var(--scaled-16);
}

.vertical-line {
    height: var(--scaled-30);
    width: var(--scaled-1);
    background-color: #BDC5D3;
}

.material-icons {
    font-size: var(--scaled-16);
    cursor: pointer;
}

.active {
    background-color: #ffffff;
    color: #822C95;
    font-weight: 500;
    border-top-left-radius: var(--scaled-5);
    border-bottom-left-radius: var(--scaled-5);
}


/* Global Success Green Overrides */


/* Ensure all main green accents use the unified success green #2E7D31 */

.text-green-500,
.text-green-600,
.text-green-700 {
    color: #2E7D31 !important;
}

.bg-green-500,
.bg-green-600,
.bg-green-700 {
    background-color: #2E7D31 !important;
}

.border-green-500,
.border-green-600,
.border-green-700 {
    border-color: #2E7D31 !important;
}

.ring-green-500,
.ring-green-600,
.ring-green-700 {
    --tw-ring-color: #2E7D31 !important;
}


/* Card Styles */

.cards {
    width: var(--scaled-205);
    height: var(--scaled-80);
    color: #121315;
    font-size: var(--scaled-15);
    font-weight: 400;
    background-color: white;
    box-shadow: 0 0 0 0.5px #BDC5D3;
    border-radius: var(--scaled-7);
    padding: var(--scaled-2) var(--scaled-10) 0 var(--scaled-10);
    white-space: nowrap;
    margin-bottom: var(--scaled-16);
    position: relative;
}

.blue-line {
    position: absolute;
    left: 0;
    top: var(--scaled-30);
    background-color: #2244CA;
    width: var(--scaled-2);
    height: var(--scaled-18);
    border-top-right-radius: var(--scaled-2);
    border-bottom-right-radius: var(--scaled-2);
}

.card_small {
    font-size: var(--scaled-12);
    font-family: Inter;
    color: #4F5051;
    display: block;
    margin-top: var(--scaled-3);
}

.badge {
    background-color: #E3F5EE;
    font-family: Inter;
    color: #00AB6F;
    font-size: 8px;
    border-radius: 3px;
    width: fit-content;
    height: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 3px;
}


/* Button Styles */

.add-new {
    border-radius: var(--scaled-5);
    border: var(--scaled-p5) solid #ffffff;
    box-shadow: 0 var(--scaled-p5) var(--scaled-p5) var(--scaled-p5) #00000026;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: Inter;
    font-weight: 400;
    font-size: var(--scaled-13);
    width: var(--scaled-150);
    height: var(--scaled-30);
    margin-top: var(--scaled-12);
}

.add-learning-path {
    border-radius: var(--scaled-5);
    width: var(--scaled-193);
    height: var(--scaled-30);
    border: var(--scaled-p5) solid #ffffff;
    box-shadow: 0 var(--scaled-p5) var(--scaled-p5) var(--scaled-p5) rgba(0, 0, 0, 0.15);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: Inter;
    font-weight: 400;
    font-size: var(--scaled-13);
    line-height: 1.2;
    padding: 0 var(--scaled-10);
    height: var(--scaled-30);
    margin-top: var(--scaled-12);
}

.add-learning-path:hover {
    background-color: #f8f8f8;
}

.my-achievements {
    border-radius: var(--scaled-5);
    width: var(--scaled-162);
    height: var(--scaled-30);
    background-color: #822C95;
    color: white;
    font-family: Inter;
    font-weight: 400;
    font-size: var(--scaled-13);
    line-height: 1.2;
    box-shadow: 0 var(--scaled-1) var(--scaled-2) rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: var(--scaled-12);
}

.create-post {
    border-radius: var(--scaled-5);
    width: var(--scaled-180);
    height: var(--scaled-50);
    background-color: #822C95;
    color: white;
    font-family: Inter;
    font-weight: 400;
    font-size: var(--scaled-13);
    line-height: 1.2;
    box-shadow: 0 var(--scaled-1) var(--scaled-2) rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: var(--scaled-12);
}

.my-achievements:hover {
    background-color: #6c227a;
}


/* Tab Styles */

.active-tab {
    color: #2244CA;
    font-weight: 400;
    position: relative;
}

.active-tab::after {
    content: "";
    position: absolute;
    left: calc(-1 * var(--scaled-15));
    right: 0;
    bottom: calc(-1 * var(--scaled-8));
    height: var(--scaled-2);
    border-radius: var(--scaled-2);
    width: auto;
    color: #2244CA;
    background-color: #2244CA;
    z-index: 5;
}

.active-tab i {
    color: #2244CA;
}

.active-btn {
    background-color: #F8F7F6;
    border-radius: var(--scaled-5) 0 0 var(--scaled-5);
}


/* Utility Classes */

.hidden {
    display: none;
}

.rotate-180 {
    transform: rotate(180deg);
}


/* Content Styles */

.button_lP {
    font-size: var(--scaled-15);
    font-weight: 400;
    padding: var(--scaled-10) var(--scaled-10);
    border-radius: var(--scaled-5);
    border: var(--scaled-1) solid #ffff;
    box-shadow: 0 var(--scaled-1) var(--scaled-1) var(--scaled-1) rgba(0, 0, 0, 0.15);
    color: #141524;
    font-family: Inter;
    cursor: pointer;
    background: white;
}

#assignUsers.active,
#assignTeams.active {
    background: #F0F0FF;
    border: var(--scaled-1) solid #822C95 !important;
}

.metadata-box {
    position: absolute;
    bottom: 0;
    width: 100%;
}


/* Special Buttons */

.btn-third,
.retake-quiz-btn {
    background-color: #822C95;
    color: white;
    padding: var(--scaled-10) var(--scaled-16);
    border-radius: var(--scaled-5);
    transition: background-color 200ms ease-in-out;
    font-size: var(--scaled-13);
    border: none;
    cursor: pointer;
}

.btn-third:hover,
.retake-quiz-btn:hover {
    background-color: #6c227a;
}


/* Ensure all buttons with non-white backgrounds have white text */


/* Blue buttons */

button[style*="background-color: #2563eb"],
button[style*="background-color:#2563eb"],
button[style*="background: #2563eb"],
button[style*="background:#2563eb"],
button[style*="background-color: #1d4ed8"],
button[style*="background-color:#1d4ed8"],
button[style*="background-color: #2244CA"],
button[style*="background-color:#2244CA"],
button[style*="background-color: #3b82f6"],
button[style*="background-color:#3b82f6"],
button[style*="background-color: #1e40af"],
button[style*="background-color:#1e40af"],
.btn[class*="bg-blue"],
button[class*="bg-blue"]:not([class*="bg-blue-50"]):not([class*="bg-blue-100"]):not([class*="bg-blue-200"]),
a[class*="bg-blue"]:not([class*="bg-blue-50"]):not([class*="bg-blue-100"]):not([class*="bg-blue-200"]) {
    color: white !important;
}


/* Green buttons */

button[style*="background-color: #2E7D31"],
button[style*="background-color:#2E7D31"],
button[style*="background: #2E7D31"],
button[style*="background:#2E7D31"],
button[style*="background-color: #246125"],
button[style*="background-color:#246125"],
button[style*="background-color: #16a34a"],
button[style*="background-color:#16a34a"],
button[style*="background-color: #15803d"],
button[style*="background-color:#15803d"],
.btn[class*="bg-green"]:not([class*="bg-green-50"]):not([class*="bg-green-100"]):not([class*="bg-green-200"]),
button[class*="bg-green"]:not([class*="bg-green-50"]):not([class*="bg-green-100"]):not([class*="bg-green-200"]),
a[class*="bg-green"]:not([class*="bg-green-50"]):not([class*="bg-green-100"]):not([class*="bg-green-200"]) {
    color: white !important;
}


/* Red buttons */

button[style*="background-color: #dc2626"],
button[style*="background-color:#dc2626"],
button[style*="background-color: #b91c1c"],
button[style*="background-color:#b91c1c"],
button[style*="background-color: #ef4444"],
button[style*="background-color:#ef4444"],
.btn[class*="bg-red"]:not([class*="bg-red-50"]):not([class*="bg-red-100"]):not([class*="bg-red-200"]),
button[class*="bg-red"]:not([class*="bg-red-50"]):not([class*="bg-red-100"]):not([class*="bg-red-200"]),
a[class*="bg-red"]:not([class*="bg-red-50"]):not([class*="bg-red-100"]):not([class*="bg-red-200"]) {
    color: white !important;
}


/* Yellow/Orange buttons */

button[style*="background-color: #eab308"],
button[style*="background-color:#eab308"],
button[style*="background-color: #ca8a04"],
button[style*="background-color:#ca8a04"],
button[style*="background-color: #f59e0b"],
button[style*="background-color:#f59e0b"],
.btn[class*="bg-yellow"]:not([class*="bg-yellow-50"]):not([class*="bg-yellow-100"]):not([class*="bg-yellow-200"]),
button[class*="bg-yellow"]:not([class*="bg-yellow-50"]):not([class*="bg-yellow-100"]):not([class*="bg-yellow-200"]),
a[class*="bg-yellow"]:not([class*="bg-yellow-50"]):not([class*="bg-yellow-100"]):not([class*="bg-yellow-200"]),
.btn[class*="bg-orange"]:not([class*="bg-orange-50"]):not([class*="bg-orange-100"]):not([class*="bg-orange-200"]),
button[class*="bg-orange"]:not([class*="bg-orange-50"]):not([class*="bg-orange-100"]):not([class*="bg-orange-200"]),
a[class*="bg-orange"]:not([class*="bg-orange-50"]):not([class*="bg-orange-100"]):not([class*="bg-orange-200"]) {
    color: white !important;
}


/* Purple buttons */

button[style*="background-color: #822C95"],
button[style*="background-color:#822C95"],
button[style*="background: #822C95"],
button[style*="background:#822C95"],
button[style*="background-color: #6c227a"],
button[style*="background-color:#6c227a"],
button[style*="background-color: #7c3aed"],
button[style*="background-color:#7c3aed"],
button[style*="background-color: #6d28d9"],
button[style*="background-color:#6d28d9"],
button[style*="background-color: #6E4FA2"],
button[style*="background-color:#6E4FA2"],
button[style*="background-color: #5a3f85"],
button[style*="background-color:#5a3f85"],
.btn[class*="bg-purple"]:not([class*="bg-purple-50"]):not([class*="bg-purple-100"]):not([class*="bg-purple-200"]),
button[class*="bg-purple"]:not([class*="bg-purple-50"]):not([class*="bg-purple-100"]):not([class*="bg-purple-200"]),
a[class*="bg-purple"]:not([class*="bg-purple-50"]):not([class*="bg-purple-100"]):not([class*="bg-purple-200"]) {
    color: white !important;
}



/* Custom Shape */

.my-custom-shape {
    width: var(--scaled-150);
    height: var(--scaled-100);
    background-color: #e5e7eb;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
}

.myshadow {
    box-shadow: 0 0 0 0.25px #BDC5D3;
}

@supports (-moz-appearance: none) {
    .myshadow {
        outline: 0.25px solid #BDC5D3;
        outline-offset: 0;
    }
}

.smallshadow {
    box-shadow: 0 0 0 0.25px #BDC5D3;
}

@supports (-moz-appearance: none) {
    .smallshadow {
        outline: 0.5px solid #6A5E5E;
        outline-offset: 0;
    }
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.chart-placeholder {
    background: linear-gradient(45deg, #e2e8f0 25%, transparent 25%), linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e2e8f0 75%), linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}


/* Collapse Button */

#collapse-btn {
    position: absolute;
    left: -12px;
    top: 20px;
    background-color: var(--color-nav-bg);
    border: 1px solid var(--color-nav-border);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 4px;
}


/* Arrow Icon - Default state (expanded sidebar) */

.toggle-arrow {
    width: 16px;
    height: 16px;
    stroke: var(--color-sidebar-buttons);
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

#right-sidebar.collapsed .toggle-arrow {
    transform: rotate(180deg);
}


/* Right sidebar positioning fix */

#right-sidebar {
    transition: all 0.3s ease;
    position: relative;
}


/* When collapsed, anchor to the right */

#right-sidebar.collapsed {
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-start;
}


/* Ensure proper flex behavior for the main container */

.flex.flex-col.lg\:flex-row {
    align-items: flex-start;
}


/* Additional positioning for collapsed state */

#right-sidebar.collapsed #sidebar-content {
    margin-left: 0;
    margin-right: 0;
}


/* Ensure the collapsed circles are properly positioned */

#right-sidebar.collapsed #collapsed-circles {
    justify-content: center;
    align-items: center;
    width: 100%;
}

.toggle-arrow {
    transform: rotate(0deg);
}

.sidebar-collapsed .toggle-arrow {
    transform: rotate(180deg);
}

[dir="rtl"] .toggle-arrow {
    transform: rotate(180deg);
}

[dir="rtl"] .sidebar-collapsed .toggle-arrow {
    transform: rotate(0deg);
}


/* Right Sidebar Collapse Styles */

#right-sidebar {
    transition: all 0.3s ease;
    position: relative;
}

#right-sidebar.collapsed {
    width: 60px !important;
    min-width: 60px;
}

#right-sidebar.collapsed #right-sidebar-content {
    display: none;
}

#right-sidebar.collapsed #right-sidebar-collapsed {
    display: flex !important;
}

#right-sidebar.collapsed .toggle-arrow {
    transform: rotate(180deg);
}

#right-sidebar-toggle {
    transition: all 0.3s ease;
}

#right-sidebar-toggle:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}


/* Responsive behavior for right sidebar */

@media (max-width: 1024px) {
    #right-sidebar.collapsed {
        display: none;
    }
}


/* Collapse Button Styles */

.sidebar-toggle-btn {
    position: absolute;
    top: 30px;
    right: -12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--color-nav-bg);
    border: 1px solid var(--color-nav-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    overflow: visible;
}


/* RTL support - flip to left side in RTL */

[dir="rtl"] .sidebar-toggle-btn {
    right: auto;
    left: -12px;
}


/* Exception: Keep button and border on right side for course detail sidebar in RTL */

html[dir="rtl"] #right-sidebar {
    border-left: none !important;
    border-right: 1px solid #C5CCD8 !important;
}

html[dir="rtl"] #right-sidebar #collapse-btn.sidebar-toggle-btn,
html[dir="rtl"] #right-sidebar .sidebar-toggle-btn#collapse-btn {
    right: -12px !important;
    left: auto !important;
}


/* Icon styles */

.collapse-icon {
    font-size: 20px;
    color: var(--color-sidebar-text);
    transition: transform 0.3s ease;
}


/* Default state (expanded) - arrow points left */

.sidebar-container:not(.collapsed) .collapse-icon {
    transform: rotate(0deg);
}


/* Collapsed state - arrow points right */

.sidebar-container.collapsed .collapse-icon {
    transform: rotate(180deg);
}


/* RTL arrow directions */

[dir="rtl"] .sidebar-container:not(.collapsed) .collapse-icon {
    transform: rotate(180deg);
}

[dir="rtl"] .sidebar-container.collapsed .collapse-icon {
    transform: rotate(0deg);
}


/* Horizontal line styles */

.sidebar-horizontal-line {
    border: none;
    height: 1px;
    background-color: #dee3eb;
    transition: width 0.3s ease;
    transform: translateY(4px);
}


/* Expanded state width */

.sidebar-container:not(.collapsed) .sidebar-horizontal-line {
    width: var(--scaled-255) !important;
}


/* Collapsed state width */

.sidebar-container.collapsed .sidebar-horizontal-line {
    position: relative;
    width: var(--scaled-73) !important;
}

.sidebar-line-container {
    overflow: hidden;
    width: 100%;
    /* Takes full width of its parent */
    position: relative;
}

.sidebar-horizontal-line2 {
    position: relative;
    top: 5px;
    border: none;
    height: 1px;
    background-color: #dee3eb;
    margin: 0 auto;
    transition: width 0.3s ease;
}


/* Expanded state width */

.sidebar-container:not(.collapsed) .sidebar-horizontal-line2 {
    width: var(--scaled-255) !important;
}


/* Collapsed state width */

.sidebar-container.collapsed .sidebar-horizontal-line2 {
    width: var(--scaled-73) !important;
}


/* Module Video View Styles */

.sidebar-collapsed {
    width: 0;
    overflow: hidden;
}

.content-expanded {
    width: 100%;
}


/* Text Content Styling */

.content-text {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.content-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-text h1:first-child {
    margin-top: 0;
}

.content-text h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.content-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.content-text p {
    margin-bottom: 1rem;
    color: #374151;
}

.content-text ul,
.content-text ol {
    margin-bottom: 1rem;
    margin-left: 1.5rem;
}

.content-text li {
    margin-bottom: 0.5rem;
}

.content-text code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #7c3aed;
}

.content-text pre {
    background-color: #1f2937;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.content-text pre code {
    background-color: transparent;
    color: #e5e7eb;
    padding: 0;
}

.content-text blockquote {
    border-left: 4px solid #7c3aed;
    padding-left: 1rem;
    font-style: italic;
    color: #6b7280;
    margin-bottom: 1rem;
}

.content-text img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    max-width: 100%;
    height: auto;
}

.content-text table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.content-text th,
.content-text td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.content-text th {
    background-color: #f9fafb;
    font-weight: 600;
}

.content-text a {
    color: #7c3aed;
    text-decoration: underline;
}

.content-text a:hover {
    color: #6d28d9;
}

.content-text strong {
    font-weight: 600;
    color: #111827;
}

.content-text em {
    font-style: italic;
}


/* MODAL TEMPLATE UTILITIES
   Reusable styling patterns for all modals
   Provides consistent spacing, colors, and interactions
*/


/* Modal animations */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.animate-in {
    animation: fadeIn 0.2s ease-out;
}

.fade-in {
    animation: fadeIn 0.2s ease-out;
}

.zoom-in-95 {
    animation: zoomIn 0.2s ease-out;
}

.animate-out {
    animation: fadeOut 0.2s ease-out;
}

.fade-out {
    animation: fadeOut 0.2s ease-out;
}

.duration-200 {
    animation-duration: 0.2s;
}


/* Modal structure classes */

.modal-overlay {
    --tw-backdrop-blur: blur(4px);
    backdrop-filter: var(--tw-backdrop-blur);
}

.modal-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .modal-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}


/* Modal header spacing */

.modal-header {
    gap: 0.75rem;
}


/* Modal body scrolling */

.modal-body {
    overscroll-behavior: contain;
}


/* Button styles within modals */

.modal-footer .btn-secondary {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #e2e8f0;
    color: #0f172a;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.modal-footer .btn-secondary:hover {
    background-color: #cbd5e1;
}

.dark .modal-footer .btn-secondary {
    background-color: #334155;
    color: #f1f5f9;
}

.dark .modal-footer .btn-secondary:hover {
    background-color: #475569;
}

.modal-footer .btn-primary {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #2563eb;
    color: white;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.modal-footer .btn-primary:hover {
    background-color: #1d4ed8;
}


/* Focus and accessibility */

.modal-close:focus-visible,
.modal-footer button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

.dark .modal-close:focus-visible,
.dark .modal-footer button:focus-visible {
    box-shadow: 0 0 0 2px #3b82f6;
}


/* Responsive modal sizing */

@media (max-width: 640px) {
    .modal-container {
        max-width: calc(100vw - 2rem);
    }
    .modal-body {
        max-height: calc(90vh - 160px);
    }
}


/* Scroll bar styling in modal body */

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

.dark .modal-body::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
}

.dark .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.7);
}