.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo svg {
  width: 38px;
  height: 20px;
}

.app-brand-text.demo {
  font-size: 1.25rem;
  letter-spacing: 0.15px;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

.marquee-container {
  position: relative;
  width: 800px;
  height: 25px;
  margin-left: 20px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: marquee 45s linear infinite;
  font-size: 14px;
  color: #888;
  animation-play-state: running;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Стили для контейнера результатов поиска */
.search-results-container {
  position: relative;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  z-index: 1050;
  max-height: 70vh;
  overflow-y: auto;
  margin-top: 0.5rem;
  display: none;
}

.search-results.active {
  display: block;
}

.search-type-group {
  border-bottom: 1px solid #f8f9fa;
}

.search-type-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #495057;
  background-color: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 1;
}

.search-items-list {
  padding: 0.25rem 0;
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #212529;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.search-item:hover {
  background-color: #f8f9fa;
}

.search-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-ticker {
  color: #6c757d;
  font-size: 0.85em;
  margin-left: 0.25rem;
}

.search-item-price {
  font-weight: 500;
  white-space: nowrap;
  margin-left: 1rem;
}

.search-item-change {
  font-size: 0.85em;
  margin-left: 0.25rem;
}

.text-success {
  color: #28a745 !important;
}

.text-danger {
  color: #dc3545 !important;
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  color: #6c757d;
}

/* Стили для мобильной версии */
#mobileSearchModal .search-results {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 0.5rem;
  max-height: 50vh;
}

#mobileSearchModal .search-type-header {
  position: static;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 300px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/* Стили для мобильного поиска */
#mobileSearchModal .modal-dialog {
  max-width: 95%;
}

#mobileSearchModal .modal-content {
  border-radius: 12px;
}

#mobileSearchModal .form-control {
  height: 50px;
  font-size: 16px;
  border: 1px solid #dee2e6;
  border-right: none;
}

#mobileSearchModal .btn {
  height: 54px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  border-left: none;
}

/* Анимация для плавного появления */
#mobileSearchModal.modal.fade .modal-dialog {
  transform: translateY(20px);
  transition: transform 0.3s ease-out;
}

#mobileSearchModal.modal.show .modal-dialog {
  transform: translateY(0);
}

@media (min-width: 1200px) {
  .search-results {
    width: 50%; 
    min-width: 400px;
    max-width: 600px;
    left: auto; 
    right: 0;
  }
}

.layout-demo-wrapper {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1.25rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1.25rem;
}

/* Темная тема */
[data-theme="dark"] .search-results {
  background-color: #454972;
  border: 1px solid #2c2e40;
}

[data-theme="dark"] .search-type-header {
  background-color: #30334e;
  color: #c3c4d9;
}

[data-theme="dark"] .search-item {
  background-color: #454972;
  color: #f8f9fa;
}

[data-theme="dark"] .search-item:hover {
  background-color: #373b69;
}

[data-theme="dark"] .search-item-ticker {
  color: #adb5bd;
}

[data-theme="dark"] .search-no-results {
  color: #adb5bd;
}

[data-theme="dark"] .search-type-group {
    border-bottom: 1px solid #454972;
    color: #454972;
    background-color: #454972;
}

.text-heading {
  margin-top: 0;
  font-weight: 500;
  color: var(--bs-heading-color);  
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tradingview-modal-content {
    position: relative;
    background: #0F0F0F;
    border-radius: 8px;
    padding: 20px;
    max-width: 100%;
    max-height: 85%;
}

.tradingview-close {
    position: absolute;
    top: -9px;
    right: -13px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tradingview-close:hover {
    background: rgba(255, 0, 0, 0.7);
}

.graph_icon {
    transition: transform 0.2s;
}

.graph_icon:hover {
    transform: scale(1.1);
}
