/* Dark Mode Global Styles */

/* Forum Page */
.dark .forum-page {
    background: #111827;
}

.dark .forum-page__container {
    background: #111827;
}

/* Forum Breadcrumb */
.dark .forum-breadcrumb {
    background: #1f2937;
    border-color: #374151;
}

.dark .forum-breadcrumb__link {
    color: #9ca3af;
}

.dark .forum-breadcrumb__link:hover {
    color: #7bb639;
}

.dark .forum-breadcrumb__item--current {
    color: #f9fafb;
}

/* Forum Action */
.dark .forum-action {
    background: #1f2937;
    border-color: #374151;
}

.dark .forum-action__title {
    color: #f9fafb;
}

.dark .forum-action__button {
    background: #7bb639;
    color: #ffffff;
}

.dark .forum-action__button:hover {
    background: #5a9c2a;
}

/* Forum New Topic */
.dark .forum-new-topic {
    background: #1f2937;
    border-color: #374151;
}

.dark .forum-new-topic__header {
    border-color: #374151;
}

.dark .forum-new-topic__title {
    color: #f9fafb;
}

.dark .forum-new-topic__close {
    color: #9ca3af;
}

.dark .forum-new-topic__close:hover {
    color: #f9fafb;
    background: #374151;
}

/* Forum Form */
.dark .forum-form__label {
    color: #f9fafb;
}

.dark .forum-form__input,
.dark .forum-form__textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .forum-form__input:focus,
.dark .forum-form__textarea:focus {
    border-color: #7bb639;
    background: #374151;
}

.dark .forum-form__input::placeholder,
.dark .forum-form__textarea::placeholder {
    color: #6b7280;
}

.dark .forum-form__status {
    color: #9ca3af;
}

.dark .forum-form__status--error {
    color: #ef4444;
}

.dark .forum-form__status--loading {
    color: #3b82f6;
}

.dark .forum-form__submit {
    background: #7bb639;
    color: #ffffff;
}

.dark .forum-form__submit:hover {
    background: #5a9c2a;
}

.dark .forum-form__cancel {
    background: #374151;
    color: #d1d5db;
}

.dark .forum-form__cancel:hover {
    background: #4b5563;
}

/* Forum Notice */
.dark .forum-notice {
    background: #1f2937;
    border-color: #374151;
}

.dark .forum-notice--info {
    background: #1e3a5f;
    border-color: #3b82f6;
}

.dark .forum-notice__title {
    color: #f9fafb;
}

.dark .forum-notice__text {
    color: #d1d5db;
}

/* Forum Topics */
.dark .forum-topics {
    background: #1f2937;
}

.dark .forum-topics__header {
    border-color: #374151;
}

.dark .forum-topics__title {
    color: #f9fafb;
}

.dark .forum-topics__subtitle {
    color: #9ca3af;
}

/* Forum Topic Item */
.dark .forum-topic {
    background: #1f2937;
    border-color: #374151;
}

.dark .forum-topic:hover {
    background: #374151;
    border-color: #4b5563;
}

.dark .forum-topic__avatar {
    background: #374151;
    color: #7bb639;
}

.dark .forum-topic__title a {
    color: #f9fafb;
}

.dark .forum-topic__title a:hover {
    color: #7bb639;
}

.dark .forum-topic__meta {
    color: #9ca3af;
}

.dark .forum-topic__stat-value {
    color: #f9fafb;
}

.dark .forum-topic__stat-value--accent {
    color: #7bb639;
}

.dark .forum-topic__stat-label {
    color: #6b7280;
}

/* Forum Topics Empty */
.dark .forum-topics__empty {
    background: #1f2937;
    border-color: #374151;
}

.dark .forum-topics__empty-title {
    color: #f9fafb;
}

.dark .forum-topics__empty-text {
    color: #9ca3af;
}

.dark .forum-topics__empty-button {
    background: #7bb639;
    color: #ffffff;
}

.dark .forum-topics__empty-button:hover {
    background: #5a9c2a;
}

/* Topics Loading */
.dark .topics-loading {
    background: #1f2937;
}

.dark .topics-loading__text {
    color: #9ca3af;
}

/* Topics Pagination */
.dark .topics-pagination {
    background: #1f2937;
}

.dark .topics-pagination a,
.dark .topics-pagination span {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

.dark .topics-pagination a:hover {
    background: #4b5563;
    color: #f9fafb;
}

.dark .topics-pagination .current {
    background: #7bb639;
    color: #ffffff;
    border-color: #7bb639;
}

/* Course Cards */
.dark .course-card {
    background: #1f2937;
}

.dark .course-card .bg-white {
    background: #1f2937 !important;
}

.dark .course-content {
    background: #1f2937;
}

/* Forum Cards */
.dark .forum-card {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.dark .forum-card:hover {
    box-shadow: 0 22px 48px rgba(123, 182, 57, 0.25);
}

.dark .forum-card__title {
    color: #f9fafb;
}

.dark .forum-card__description {
    color: #d1d5db;
}

.dark .forum-card__stat {
    background: #374151;
}

.dark .forum-card__stat-label {
    color: #9ca3af;
}

.dark .forum-card__meta-label {
    color: #d1d5db;
}

.dark .forum-card__icon {
    border-color: #374151;
}

/* White backgrounds */
.dark .bg-white {
    background-color: #1f2937 !important;
}

.dark .bg-gray-50 {
    background-color: #374151 !important;
}

.dark .bg-gray-100 {
    background-color: #4b5563 !important;
}

/* Text colors */
.dark .text-gray-900 {
    color: #f9fafb !important;
}

.dark .text-gray-800 {
    color: #f3f4f6 !important;
}

.dark .text-gray-700 {
    color: #e5e7eb !important;
}

.dark .text-gray-600 {
    color: #d1d5db !important;
}

.dark .text-gray-500 {
    color: #9ca3af !important;
}

/* Borders */
.dark .border-gray-100 {
    border-color: #374151 !important;
}

.dark .border-gray-200 {
    border-color: #4b5563 !important;
}

.dark .border-gray-300 {
    border-color: #6b7280 !important;
}

/* Shadows */
.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Hover states */
.dark .hover\:bg-gray-50:hover {
    background-color: #374151 !important;
}

.dark .hover\:bg-gray-100:hover {
    background-color: #4b5563 !important;
}

/* Mobile menu */
.dark #mobile-menu {
    background-color: #1f2937;
}

.dark #mobile-menu .text-gray-700 {
    color: #e5e7eb;
}

.dark #mobile-menu .hover\:bg-green-50:hover {
    background-color: rgba(123, 182, 57, 0.1);
}

/* Cards and containers */
.dark .rounded-lg,
.dark .rounded-xl {
    background-color: #1f2937;
}

/* Input fields */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="search"],
.dark textarea,
.dark select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="password"]:focus,
.dark input[type="search"]:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #7bb639;
    background-color: #374151;
}

/* Dropdown menus */
.dark .dropdown-menu,
.dark [class*="dropdown"] {
    background-color: #1f2937;
    border-color: #374151;
}

/* Tables */
.dark table {
    background-color: #1f2937;
}

.dark th {
    background-color: #374151;
    color: #f9fafb;
}

.dark td {
    border-color: #374151;
    color: #d1d5db;
}

.dark tr:hover {
    background-color: #374151;
}

/* Badges */
.dark .badge,
.dark [class*="badge"] {
    background-color: #374151;
    color: #d1d5db;
}

/* Alerts */
.dark .alert {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

/* Mini cart */
.dark #mini-cart,
.dark #mini-cart-guest {
    background-color: #1f2937;
    border-color: #374151;
}

.dark .mini-cart-item:hover {
    background-color: #374151;
}

/* Footer */
.dark footer {
    background-color: #111827;
    border-color: #374151;
}

.dark footer .text-gray-600 {
    color: #9ca3af;
}

/* Topic Page */
.dark .topic-page {
    background: #111827 !important;
}

.dark .topic-page__container {
    background: #111827 !important;
}

/* Force all white backgrounds to dark in topic page */
.dark .topic-page article,
.dark .topic-page article > *,
.dark .topic-page article div,
.dark .topic-page section,
.dark .topic-page section > *,
.dark .topic-page section div {
    background-color: transparent !important;
}

.dark .topic-page article.topic-card,
.dark .topic-page section.topic-replies,
.dark .topic-page section.topic-form,
.dark .topic-page .topic-advert {
    background-color: #1f2937 !important;
}

.dark .topic-page .topic-card__stats,
.dark .topic-page .topic-advert--empty {
    background-color: #374151 !important;
}

/* Topic Card */
.dark .topic-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

.dark .topic-card__header {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

.dark .topic-card__title {
    color: #f9fafb !important;
}

.dark .topic-card__meta {
    color: #9ca3af !important;
}

.dark .topic-card__meta-item {
    color: #9ca3af !important;
}

.dark .topic-card__meta-item a {
    color: #7bb639 !important;
}

.dark .topic-card__meta-item a:hover {
    color: #5a9c2a !important;
}

.dark .topic-card__author {
    color: #d1d5db !important;
}

.dark .topic-card__icon {
    background: #374151 !important;
    color: #7bb639 !important;
}

.dark .topic-card__content {
    background: #1f2937 !important;
    color: #d1d5db !important;
}

.dark .topic-card__body {
    color: #d1d5db !important;
}

.dark .topic-card__body p {
    color: #d1d5db !important;
}

.dark .topic-card__stats {
    background: #374151 !important;
    border-color: #4b5563 !important;
}

.dark .topic-card__stats-group {
    border-color: #4b5563 !important;
}

.dark .topic-stat {
    background: transparent !important;
}

.dark .topic-stat__label {
    color: #9ca3af !important;
}

.dark .topic-stat__value {
    color: #f9fafb !important;
}

.dark .topic-card__freshness {
    color: #9ca3af !important;
}

.dark .topic-card__freshness-value {
    color: #7bb639 !important;
}

.dark .topic-card__freshness-value a {
    color: #7bb639 !important;
}

.dark .topic-card__freshness-label {
    color: #9ca3af !important;
}

/* Topic Breadcrumb */
.dark .topic-breadcrumb {
    background: #1f2937;
    border-color: #374151;
}

.dark .topic-breadcrumb__link {
    color: #9ca3af;
}

.dark .topic-breadcrumb__link:hover {
    color: #7bb639;
}

.dark .topic-breadcrumb__item--current {
    color: #f9fafb;
}

/* Topic Status Badges */
.dark .topic-status {
    background: #374151;
    color: #d1d5db;
}

.dark .topic-status--sticky {
    background: #7bb639;
    color: #ffffff;
}

.dark .topic-status--locked {
    background: #ef4444;
    color: #ffffff;
}

/* Topic Badges */
.dark .topic-card__badges {
    background: transparent;
}

/* Topic Replies */
.dark .topic-replies {
    background: #1f2937;
}

.dark .topic-replies__header {
    background: #1f2937;
    border-color: #374151;
}

.dark .topic-replies__title {
    color: #f9fafb;
}

.dark .topic-replies__count {
    color: #7bb639;
}

.dark .topic-replies__icon {
    background: #374151;
    color: #7bb639;
}

.dark .topic-replies__empty {
    background: #374151;
    color: #9ca3af;
}

/* Topic Reply */
.dark .topic-reply {
    background: #1f2937;
    border-color: #374151;
}

.dark .topic-reply:hover {
    background: #374151;
}

.dark .topic-reply__avatar {
    background: #374151;
    color: #7bb639;
}

.dark .topic-reply__header {
    border-color: #374151;
}

.dark .topic-reply__author {
    color: #f9fafb;
}

.dark .topic-reply__time {
    color: #9ca3af;
}

.dark .topic-reply__content {
    color: #d1d5db;
}

.dark .topic-reply__badge {
    background: #374151;
    color: #d1d5db;
}

.dark .topic-reply__badge--master {
    background: #7bb639;
    color: #ffffff;
}

.dark .topic-reply__badge--apprentice {
    background: #3b82f6;
    color: #ffffff;
}

.dark .topic-reply__badge--junior {
    background: #f59e0b;
    color: #ffffff;
}

/* Topic Form */
.dark .topic-form {
    background: #1f2937;
    border-color: #374151;
}

.dark .topic-form__header {
    border-color: #374151;
}

.dark .topic-form__title {
    color: #f9fafb;
}

.dark .topic-form__label {
    color: #f9fafb;
}

.dark .topic-form__textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .topic-form__textarea:focus {
    border-color: #7bb639;
    background: #374151;
}

.dark .topic-form__submit {
    background: #7bb639;
    color: #ffffff;
}

.dark .topic-form__submit:hover {
    background: #5a9c2a;
}

/* Topic Notice */
.dark .topic-notice {
    background: #1f2937;
    border-color: #374151;
}

.dark .topic-notice--info {
    background: #1e3a5f;
    border-color: #3b82f6;
}

.dark .topic-notice--warning {
    background: #78350f;
    border-color: #f59e0b;
}

.dark .topic-notice--error {
    background: #7f1d1d;
    border-color: #ef4444;
}

.dark .topic-notice__title {
    color: #f9fafb;
}

.dark .topic-notice__text {
    color: #d1d5db;
}

.dark .topic-notice__button {
    background: #7bb639;
    color: #ffffff;
}

.dark .topic-notice__button:hover {
    background: #5a9c2a;
}

.dark .topic-notice__icon {
    color: #9ca3af;
}

/* Topic Advert */
.dark .topic-advert {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

.dark .topic-advert--empty {
    background: #374151 !important;
}

.dark .topic-advert__content {
    color: #d1d5db !important;
    background: transparent !important;
}

.dark .topic-advert__badge {
    background: #7bb639 !important;
    color: #ffffff !important;
}

.dark .topic-advert__headline {
    color: #f9fafb !important;
}

.dark .topic-advert__line {
    color: #d1d5db !important;
}

.dark .topic-advert__line a {
    color: #7bb639 !important;
}

.dark .topic-advert__line a:hover {
    color: #5a9c2a !important;
}

.dark .topic-advert__icon {
    color: #9ca3af !important;
}

.dark .topic-advert__title {
    color: #f9fafb !important;
}

.dark .topic-advert__text {
    color: #9ca3af !important;
}

.dark .topic-advert__button {
    background: #7bb639 !important;
    color: #ffffff !important;
}

.dark .topic-advert__button:hover {
    background: #5a9c2a !important;
}

/* Responsive images */
.dark img {
    opacity: 0.9;
}

.dark img:hover {
    opacity: 1;
}
