/* Dark theme */
body.dark {
  background-color: #0d1117;
  color: #c9d1d9;
}

.navbar-brand {
  color: #c9d1d9;
}

#mainNav, .footer {
  background-color: #161b22;
  border-color: #30363d;
}

.navbar .nav-link {
  color: #c9d1d9;
}
.navbar .nav-link:hover {
  color: #58a6ff;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5); /* semi-transparent white */
}

.navbar-toggler:focus,
.navbar-toggler:hover {
  border-color: rgba(255, 255, 255, 0.75); /* brighter on hover */
}

::placeholder {
  color: #6d7175!important;
  opacity: 1;
}

::-ms-input-placeholder {
  color: #6d7175!important;
}

.blog-card, .post-card {
  background-color: #161b22;
  border-color: #30363d;
}

.blog-card .card-body,
.blog-card .card-text,
.post-card .card-body,
.post-card .card-text {
  color: #c9d1d9;
}

.blog-card .card-footer,
.post-card .card-footer {
  background-color: #161b22;
  color: #8b949e!important;
  border-top: 1px solid #30363d;
}

.blog-title a,
.post-title a {
  color: #58a6ff;
}

footer {
  background-color: #0d1117;
  border-color: #30363d;
  color: #8b949e;
}

/* Form inputs */
body.dark .form-control {
  background-color: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
}

/* Buttons */
.btn-primary {
  background-color: #2ea44f;
  border-color: #2ea44f;
}
.btn-primary:hover {
  background-color: #2c974b;
  border-color: #2c974b;
}

/* Select2 dark mode overrides */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background-color: #23272e !important;
  border: 1px solid #444 !important;
  color: #f3f3f3 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  color: #f3f3f3 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
  color: #b0b8c1 !important;
}

.select2-container--default .select2-results__option {
  background-color: #23272e !important;
  color: #f3f3f3 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
  background-color: #333b45 !important;
  color: #ffd700 !important;
}

.select2-container--default .select2-dropdown {
  background-color: #23272e !important;
  border: 1px solid #444 !important;
  color: #f3f3f3 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #181c20 !important;
  color: #f3f3f3 !important;
  border: 1px solid #444 !important;
}

.text-muted {
    color: #b0b8c1!important;
}

/* Dark mode code block styling */
/* body.dark pre {
  background: #181c20;
  color: #f8f9fa;
  border-radius: 6px;
  padding: 1em;
  font-size: 1em;
  overflow-x: auto;
  margin-bottom: 1.2em;
  font-family: 'Fira Mono', 'Consolas', 'Monaco', 'monospace';
} */

.github-comment {
    background: #161b22;
    border: 1px solid #30363d;
}
.github-comment-avatar {
    background: #22272e;
    color: #c9d1d9;
}
.github-comment-body {
    color: #c9d1d9;
}
.github-comment-username {
    color: #58a6ff;
}
.github-comment-date {
    color: #8b949e;
}

iframe {
  border: 1px solid #444;
  background: #1e1e1e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Tagify dropdown for dark mode */
.tagify {
  --placeholder-color: #6d7175 !important;
}

.tags-look {
  border: 1px solid #444;
  background: #23272e!important;
  background-color: #23272e!important;
  color: #f3f3f3;
}

.tagify__dropdown__wrapper {
  background: transparent!important;
}

.tags-look .tagify__dropdown__item {
  border: 1px solid #444;
  background: #23272e;
  background-color: #23272e;
  color: #f3f3f3;
}

.tags-look .tagify__dropdown__item--active {
  color: #fff;
}

.tags-look .tagify__dropdown__item:hover {
  background: #333b45;
  border-color: #ffd700;
}

/* Select2 dropdown items for dark mode */
/* Selection box */
.select2-selection, 
.select2-search {
  background-color: #23272e !important;
  color: #f3f3f3 !important;
  border: 1px solid #3a3f47 !important;
}

/* Placeholder text */
.select2-selection__placeholder {
  color: #aaa !important;
}

/* Selected text */
.select2-selection__rendered {
  color: #f3f3f3 !important;
}

/* Dropdown options container */
.select2-results__options {
  background-color: #23272e !important;
  color: #f3f3f3 !important;
  border: 1px solid #3a3f47 !important;
}

/* Hovered option */
.select2-results__option--highlighted {
  background-color: #3a3f47 !important;
  color: #fff !important;
}

/* Selected option */
.select2-results__option[aria-selected="true"] {
  background-color: #2c313a !important;
  color: #fff !important;
}

/* Disabled option */
.select2-results__option[aria-disabled="true"] {
  color: #777 !important;
}

/* Clear (x) button */
.select2-selection__clear {
  color: #aaa !important;
}
.select2-selection__clear:hover {
  color: #fff !important;
}

/* Dropdown arrow */
.select2-selection__arrow b {
  border-color: #f3f3f3 transparent transparent transparent !important;
}

/* When focused */
.select2-container--default.select2-container--open .select2-selection {
  border-color: #5a9cff !important; /* accent color */
}

/* Search input inside dropdown */
.select2-search__field {
  background-color: #23272e !important;
  color: #f3f3f3 !important;
  border: 1px solid #3a3f47 !important;
  padding: 6px 8px;
  border-radius: 4px;
}

/* Placeholder text */
.select2-search__field::placeholder {
  color: #aaa !important;
}

/* On focus */
.select2-search__field:focus {
  outline: none !important;
  border-color: #5a9cff !important; /* accent border */
}
