/* Dashboard Theme Colors - Dynamic CSS Variables */
/* These colors are set dynamically from dashboard settings */

:root {
    --dashboard-primary: #696cff;
    --dashboard-secondary: #8592a3;
    --dashboard-success: #71dd37;
    --dashboard-info: #03c3ec;
    --dashboard-warning: #ffab00;
    --dashboard-danger: #ff3e1d;
}

/* Override Bootstrap primary color if needed */
/* Note: This will be applied via inline styles in head.blade.php for better control */

/* Select dropdown - Use accent-color for hover and selection */
.form-select {
    accent-color: var(--bs-secondary) !important;
}

/* Select dropdown selection color */
.form-select option:checked,
.form-select option[selected] {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* Select dropdown hover and focus */
.form-select:hover {
    border-color: var(--bs-secondary) !important;
}

.form-select:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

/* Select dropdown option styles - Force override browser defaults - Light theme only */
:root:not([data-bs-theme="dark"]) select.form-select option {
    background-color: #fff !important;
    color: var(--bs-body-color) !important;
}

:root:not([data-bs-theme="dark"]) select.form-select option:checked,
:root:not([data-bs-theme="dark"]) select.form-select option[selected] {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* Force hover color with maximum specificity - Use secondary for hover - Light theme only */
:root:not([data-bs-theme="dark"]) select.form-select option:hover,
:root:not([data-bs-theme="dark"]) .form-select option:hover,
:root:not([data-bs-theme="dark"]) option:hover {
    background-color: var(--bs-secondary) !important;
    background: var(--bs-secondary) !important;
    color: #fff !important;
}

/* For WebKit browsers (Chrome, Safari, Edge) - Force override - Light theme only */
:root:not([data-bs-theme="dark"]) select.form-select option:focus,
:root:not([data-bs-theme="dark"]) select.form-select option:active,
:root:not([data-bs-theme="dark"]) .form-select option:focus,
:root:not([data-bs-theme="dark"]) .form-select option:active {
    background-color: var(--bs-secondary) !important;
    background: var(--bs-secondary) !important;
    color: #fff !important;
}

/* Additional override for all browsers - Light theme only */
:root:not([data-bs-theme="dark"]) select option:hover {
    background-color: var(--bs-secondary) !important;
    background: var(--bs-secondary) !important;
    color: #fff !important;
}

/* Buttons - Light Theme */
:root:not([data-bs-theme="dark"]) .btn-primary {
    box-shadow: 0 0.125rem 0.25rem 0 color-mix(in sRGB, var(--bs-primary) 40%, transparent);
    transition: all 0.2s ease-in-out;
}

:root:not([data-bs-theme="dark"]) .btn-primary:hover {
    box-shadow: 0 0.25rem 0.5rem 0 color-mix(in sRGB, var(--bs-primary) 50%, transparent);
    transform: translateY(-1px);
}

:root:not([data-bs-theme="dark"]) .btn-primary:active,
:root:not([data-bs-theme="dark"]) .btn-primary:focus {
    box-shadow: 0 0.125rem 0.25rem 0 color-mix(in sRGB, var(--bs-primary) 40%, transparent);
}

:root:not([data-bs-theme="dark"]) .btn-outline-primary {
    box-shadow: 0 0.125rem 0.25rem 0 color-mix(in sRGB, var(--bs-primary) 20%, transparent);
    transition: all 0.2s ease-in-out;
}

:root:not([data-bs-theme="dark"]) .btn-outline-primary:hover {
    box-shadow: 0 0.25rem 0.5rem 0 color-mix(in sRGB, var(--bs-primary) 50%, transparent);
    transform: translateY(-1px);
}

:root:not([data-bs-theme="dark"]) .btn-outline-primary:active,
:root:not([data-bs-theme="dark"]) .btn-outline-primary:focus {
    box-shadow: 0 0.125rem 0.25rem 0 color-mix(in sRGB, var(--bs-primary) 40%, transparent);
}

/* Breadcrumbs - Light Theme */
:root:not([data-bs-theme="dark"]) .breadcrumb-item a {
    color: var(--bs-primary);
    transition: color 0.2s ease-in-out;
}

:root:not([data-bs-theme="dark"]) .breadcrumb-item a:hover,
:root:not([data-bs-theme="dark"]) .breadcrumb-item a:focus {
    color: color-mix(in sRGB, #000 20%, var(--bs-primary)) !important;
}

/* Sidebar Menu Link Hover - Light Theme */
:root:not([data-bs-theme="dark"]) .menu-item > .menu-link:hover,
:root:not([data-bs-theme="dark"]) .menu-item > .menu-link:focus {
    color: var(--bs-primary) !important;
}

:root:not([data-bs-theme="dark"]) .menu-sub .menu-item > .menu-link:hover,
:root:not([data-bs-theme="dark"]) .menu-sub .menu-item > .menu-link:focus {
    color: var(--bs-primary) !important;
}

/* Sidebar Menu Link Active - Light Theme */
:root:not([data-bs-theme="dark"]) .menu-item.active > .menu-link {
    color: var(--bs-primary) !important;
}

:root:not([data-bs-theme="dark"]) .menu-item.open > .menu-link,
:root:not([data-bs-theme="dark"]) .menu-item.active.open > .menu-link {
    color: var(--bs-primary) !important;
}

:root:not([data-bs-theme="dark"]) .menu-item.open > .menu-link.menu-toggle,
:root:not([data-bs-theme="dark"]) .menu-item.active.open > .menu-link.menu-toggle {
    color: var(--bs-primary) !important;
}

:root:not([data-bs-theme="dark"]) .menu-item.open > .menu-link .menu-icon,
:root:not([data-bs-theme="dark"]) .menu-item.active.open > .menu-link .menu-icon,
:root:not([data-bs-theme="dark"]) .menu-item.open > .menu-link .text-truncate,
:root:not([data-bs-theme="dark"]) .menu-item.active.open > .menu-link .text-truncate {
    color: var(--bs-primary) !important;
}

:root:not([data-bs-theme="dark"]) .menu-sub .menu-item.active > .menu-link {
    color: var(--bs-primary) !important;
}

/* ============================================
   Modern Card Styles - Reusable Components
   ============================================ */

/* Modern Card with Hover Effect */
.modern-card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Icon Wrapper with Gradients */
.icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary-gradient {
    background: linear-gradient(135deg, #696cff 0%, #5a5fcf 100%);
}

.bg-info-gradient {
    background: linear-gradient(135deg, #03c3ec 0%, #02a8c4 100%);
}

.bg-secondary-gradient {
    background: linear-gradient(135deg, #697a8d 0%, #5a6878 100%);
}

.bg-success-gradient {
    background: linear-gradient(135deg, #71dd37 0%, #5fc02a 100%);
}

/* Section Label */
.section-label {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(105, 108, 255, 0.1) 0%, rgba(105, 108, 255, 0.15) 100%);
    color: #696cff;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Language Content Box */
.lang-content-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 100px;
    transition: all 0.3s ease;
}

.lang-content-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--bs-primary);
}

.lang-ar {
    border-left: 3px solid #696cff;
}

.lang-en {
    border-left: 3px solid #03c3ec;
}

/* Info Card Modern */
.info-card-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
}

/* Service Icon Modern */
.service-icon-modern {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(105, 108, 255, 0.1) 0%, rgba(105, 108, 255, 0.2) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #696cff;
    font-size: 1.5rem;
}

/* Empty State Modern */
.empty-state-modern {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-icon-modern {
    font-size: 3rem;
    color: #c4c4c4;
    margin-bottom: 1rem;
}

/* Timeline Modern */
.timeline-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item-modern {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.timeline-icon-modern {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.timeline-content-modern {
    flex-grow: 1;
    padding-top: 0.25rem;
}

/* Badge Modern */
.badge-modern {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
}

.bg-primary-subtle {
    background-color: rgba(105, 108, 255, 0.1) !important;
    color: #696cff !important;
}

.bg-info-subtle {
    background-color: rgba(3, 195, 236, 0.1) !important;
    color: #03c3ec !important;
}

/* Dark Mode Support */
[data-bs-theme="dark"] .lang-content-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .lang-content-box:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(105, 108, 255, 0.2);
}

[data-bs-theme="dark"] .info-card-modern {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .section-label {
    background: linear-gradient(135deg, rgba(105, 108, 255, 0.2) 0%, rgba(105, 108, 255, 0.25) 100%);
    color: #a8abff;
}

[data-bs-theme="dark"] .service-icon-modern {
    background: linear-gradient(135deg, rgba(105, 108, 255, 0.2) 0%, rgba(105, 108, 255, 0.3) 100%);
    color: #a8abff;
}

[data-bs-theme="dark"] .empty-icon-modern {
    color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .bg-primary-subtle {
    background-color: rgba(105, 108, 255, 0.2) !important;
    color: #a8abff !important;
}

[data-bs-theme="dark"] .bg-info-subtle {
    background-color: rgba(3, 195, 236, 0.2) !important;
    color: #4dd4f0 !important;
}

/* Related Items Container */
.related-items-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-item-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.related-item-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateX(4px);
}

.related-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.02);
}

.related-item-link:hover .related-item {
    background: rgba(var(--bs-primary-rgb), 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.related-item-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-body-color);
    margin-right: 0.5rem;
}

.related-item-link:hover .related-item-label {
    color: var(--bs-primary);
}

/* Related Item Card Styles */
.related-item-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--bs-body-color);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.related-item-card:hover {
    background: rgba(var(--bs-primary-rgb), 0.08);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
    transform: translateX(4px);
    text-decoration: none;
    color: var(--bs-body-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-size: 1.125rem;
    flex-shrink: 0;
    position: relative;
}

.related-item-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--bs-danger);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.related-item-text {
    font-size: 0.875rem;
    font-weight: 500;
    flex-grow: 1;
}

.related-item-card:hover .related-item-icon {
    background: rgba(var(--bs-primary-rgb), 0.15);
    transform: scale(1.05);
}

/* Specific colors for different item types */
.related-item-projects .related-item-icon {
    background: rgba(105, 108, 255, 0.1);
    color: #696cff;
}

.related-item-blogs .related-item-icon {
    background: rgba(3, 195, 236, 0.1);
    color: #03c3ec;
}

.related-item-faqs .related-item-icon {
    background: rgba(113, 221, 55, 0.1);
    color: #71dd37;
}

.related-item-outputs .related-item-icon {
    background: rgba(255, 171, 0, 0.1);
    color: #ffab00;
}

.related-item-methodology .related-item-icon {
    background: rgba(133, 146, 163, 0.1);
    color: #8592a3;
}

/* Dark Mode Support for Related Items */
[data-bs-theme="dark"] .related-item {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .related-item-link:hover .related-item {
    background: rgba(105, 108, 255, 0.2);
}

[data-bs-theme="dark"] .related-item-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .related-item-card:hover {
    background: rgba(105, 108, 255, 0.15);
    border-color: rgba(105, 108, 255, 0.3);
}

[data-bs-theme="dark"] .related-item-icon {
    background: rgba(105, 108, 255, 0.15);
    color: #a8abff;
}

[data-bs-theme="dark"] .related-item-projects .related-item-icon {
    background: rgba(105, 108, 255, 0.15);
    color: #a8abff;
}

[data-bs-theme="dark"] .related-item-blogs .related-item-icon {
    background: rgba(3, 195, 236, 0.15);
    color: #4dd4f0;
}

[data-bs-theme="dark"] .related-item-faqs .related-item-icon {
    background: rgba(113, 221, 55, 0.15);
    color: #8ee85a;
}

[data-bs-theme="dark"] .related-item-outputs .related-item-icon {
    background: rgba(255, 171, 0, 0.15);
    color: #ffc233;
}

[data-bs-theme="dark"] .related-item-methodology .related-item-icon {
    background: rgba(133, 146, 163, 0.15);
    color: #a8b5c4;
}

