/* Стили для кнопок действий */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon i {
    font-size: 1rem;
}

.btn-icon .button-text {
    display: none;
    margin-left: 0.5rem;
}

/* Показываем текст кнопок на больших экранах */
@media (min-width: 992px) {
    .btn-icon {
        padding: 0.5rem 1rem;
        min-width: auto;
        background-color: transparent !important;
        border: 1px solid !important;
    }
    
    .btn-icon .button-text {
        display: inline;
        color: #000000 !important;
    }
    

}

/* Стили для тултипов */
.tooltip {
    font-size: 0.875rem;
}







/* Стили для панели групповых действий */
.batch-actions {
    display: flex;
    gap: 8px;
}

.batch-actions .btn-icon {
    font-size: 0.875rem;
} 

/* Модальное окно выбора ключевых слов всегда поверх */
#keywordsModal {
    z-index: 20000 !important;
}

/* Исправление z-index для выпадающих меню хедера */
.dropdown-menu {
    z-index: 999999 !important;
}

/* Исправление для профильного дропдауна */
.profile-dropdown .dropdown-menu,
.btn-user + .dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 0.5rem !important;
}

/* Убеждаемся, что хедер не перекрывает дропдауны */
.top-header {
    z-index: 990 !important;
}

.bottom-header {
    z-index: 989 !important;
}

/* Исправление для всех модальных окон */
.modal {
    z-index: 20000 !important;
}

.modal-backdrop {
    z-index: 19999 !important;
} 

/* Стили для модального окна ключевых слов */
.min-height-50 {
    min-height: 50px;
}

.keyword-item {
    transition: all 0.2s ease;
    border-radius: 4px;
}

.keyword-item:hover {
    background-color: #f8f9fa !important;
    transform: translateX(2px);
}

.keyword-item.selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3 !important;
}

.keyword-tag {
    display: inline-block;
    transition: all 0.2s ease;
}

.keyword-tag:hover {
    transform: scale(1.05);
}

.remove-tag:hover {
    color: #dc3545 !important;
}

.keywords-list {
    background-color: #fafafa;
}

.keywords-list::-webkit-scrollbar {
    width: 6px;
}

.keywords-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.keywords-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.keywords-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Анимации для модального окна */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Стили для кнопок в модальном окне */
.modal-footer .btn {
    transition: all 0.2s ease;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
}

/* Стили для полей ввода */
.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
} 

/* Стили для панели действий с результатами поиска */
.search-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-actions:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #adb5bd;
}

.search-actions .btn {
    transition: all 0.2s ease;
    font-weight: 500;
    border-width: 1.5px;
}

.search-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.search-actions .btn:active {
    transform: translateY(0);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .search-actions {
        padding: 8px;
    }
    
    .search-actions .d-flex {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }
    
    .search-actions .btn {
        margin-bottom: 0 !important;
        width: auto !important;
        min-width: 32px !important;
        height: 32px !important;
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
    
    .search-actions .text-muted {
        margin-bottom: 0 !important;
        text-align: center !important;
        font-size: 10px !important;
        margin-right: 4px !important;
        white-space: nowrap !important;
    }
}

/* Стили для ключевых слов в модальном окне */
.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.keyword-item:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.keyword-text {
    font-weight: 500;
    color: #495057;
    flex-grow: 1;
    margin-right: 10px;
}



/* Стили для выбранных ключевых слов */
.selected-keyword {
    display: inline-flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 6px 12px;
    margin: 4px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.selected-keyword .keyword-text {
    color: white;
    margin-right: 8px;
}

.remove-keyword-btn {
    background: none;
    border: none;
    color: white;
    padding: 0;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.remove-keyword-btn:hover {
    opacity: 1;
    color: #ffc107;
}

/* Стили для блока выбранных ключевых слов */
#selected-keywords-display {
    min-height: 50px;
    padding: 10px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
    margin-bottom: 15px;
}

#selected-keywords-display:empty::before {
    content: "Выбранные ключевые слова появятся здесь";
    color: #6c757d;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 20px;
}

/* Стили для кнопок в модальном окне */
.keywords-modal .btn {
    margin: 0 5px;
}

.keywords-modal .btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert {
    animation: slideIn 0.3s ease-out;
}

/* Улучшенные стили для панели действий с результатами */
.search-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-actions .btn {
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 60px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 1.5px;
}

.search-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-actions .btn:active {
    transform: translateY(0);
}

/* Мобильная адаптация для панели действий */
@media (max-width: 767.98px) {
    .search-actions {
        padding: 8px;
    }
    
    .search-actions .btn {
        min-width: 40px;
        height: 36px;
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .search-actions .btn i {
        font-size: 14px;
    }
    
    .search-actions .text-muted {
        font-size: 12px;
        margin-right: 6px;
    }
    
    .search-actions .d-flex {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }
    
    /* Исправление для кнопок фильтра, поиска и сохранения */
    .action-buttons {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }
    
    .action-buttons .btn-icon {
        min-width: 45px;
        height: 40px;
        font-size: 12px;
        padding: 6px 8px;
        background-color: transparent !important;
        border: 1px solid !important;
    }
    

    
    .action-buttons .button-text {
        display: none;
    }
}

/* Планшетная адаптация */
@media (min-width: 768px) and (max-width: 991.98px) {
    .search-actions .btn {
        min-width: 55px;
        height: 40px;
    }
}

/* Десктопная версия */
@media (min-width: 992px) {
    .search-actions .btn {
        min-width: 70px;
        height: 40px;
    }
    
    .search-actions .btn span {
        margin-left: 5px;
    }
}

/* Стили для аналитики исполнителей */
.analytics-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.analytics-section:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.analytics-section h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.analytics-table {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.analytics-table .table {
    margin-bottom: 0;
}

.analytics-table .table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.analytics-table .table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Стили для карточек рекомендаций */
.recommendations-section .alert {
    border-left: 4px solid #17a2b8;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
}

.recommendations-section .alert-heading {
    color: #0c5460;
    font-weight: 600;
}

.recommendations-section ul li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Стили для карточек маржинальности */
.profitability-section .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.profitability-section .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profitability-section .card-header {
    font-weight: 600;
    border-bottom: none;
}

/* Стили для таблиц конкуренции */
.competition-analytics .table-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

.competition-analytics .table-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
}

.competition-analytics .table-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

/* Стили для платежеспособности */
.payment-reliability .table-success {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
}

.payment-reliability .table-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
}

.payment-reliability .table-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

/* Адаптивность для аналитики */
@media (max-width: 768px) {
    .analytics-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .analytics-section {
        padding: 1rem;
    }
    
    .analytics-table .table {
        font-size: 0.8rem;
    }
    
    .profitability-section .row {
        flex-direction: column;
    }
    
    .profitability-section .col-md-6 {
        margin-bottom: 1rem;
    }
} 

/* --- Стили, перенесённые из шаблона my_searches.html --- */
/* Стили для поля ввода ключевых слов */
#basic_keywords {
    white-space: pre-wrap !important;
    overflow: hidden !important;
    resize: none !important;
    min-height: 58px !important;
    max-height: none !important;
    height: auto !important;
}

.form-group.position-relative {
    position: relative;
}

/* Стили для модального окна оплаты (специфичные) */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.payment-modal .modal-dialog {
    position: relative;
    width: auto;
    margin: 0 auto;
    max-width: 500px;
    pointer-events: auto;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.payment-modal.active .modal-dialog {
    transform: translateY(0);
}

.payment-modal .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.payment-modal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
}

.payment-modal .modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 500;
}

.payment-modal-close {
    padding: 0.5rem 0.75rem;
    background-color: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    cursor: pointer;
}

.payment-modal-close:hover {
    opacity: 0.75;
}

.payment-modal .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

#searchHelpModal {
    z-index: 99999 !important;
}

#searchHelpModal.show {
    display: block !important;
    opacity: 1 !important;
}

#searchHelpModal .modal-dialog {
    z-index: 100000 !important;
}

.payment-widget-container {
    min-height: 300px;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
} 

/* --- Стили для модального окна улучшения тарифа (upgradePlanModal) --- */
#upgradePlanModal .modal-content {
  border-radius: 1rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  padding: 0.5rem 0.5rem 0 0.5rem;
}
#upgradePlanModal .premium-features {
  font-size: 1rem;
  padding: 0.5rem 0;
}
#upgradePlanModal .premium-features li {
  font-size: 0.98em;
  padding: 0.35em 0;
  border: none;
  background: none;
}
#upgradePlanModal .modal-title, #upgradePlanModal h4, #upgradePlanModal h3 {
  font-weight: 600;
}
#upgradePlanModal .pricing-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2em;
}
#upgradePlanModal .modal-body {
  padding-bottom: 0.5rem;
}
@media (max-width: 576px) {
  #upgradePlanModal .modal-content {
    padding: 0.2rem 0.2rem 0 0.2rem;
  }
  #upgradePlanModal .premium-features {
    font-size: 0.92rem;
  }
  #upgradePlanModal .premium-features li {
    font-size: 0.9em;
    padding: 0.2em 0;
  }
  #upgradePlanModal .modal-title, #upgradePlanModal h4, #upgradePlanModal h3 {
    font-size: 1.1rem;
  }
  #upgradePlanModal .pricing-info h3 {
    font-size: 1.1rem;
  }
  #upgradePlanModal .modal-body {
    padding-bottom: 0.2rem;
  }
}
#upgradePlanModal .modal-header {
  background: linear-gradient(90deg, #28a745 0%, #43e97b 100%);
  color: #fff;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  text-align: center;
  justify-content: center;
  position: relative;
  min-height: 46px;
  padding: 0.22rem 0.2rem 0.22rem 0.2rem;
  display: flex;
  align-items: center;
}
#upgradePlanModal .modal-header .modal-title {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1.1;
  gap: 0.5em;
}
#upgradePlanModal .modal-header .modal-title .crown-icon {
  font-size: 1.5rem;
  color: #fffbe6;
  text-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 0;
  margin-right: 0.3em;
}
#upgradePlanModal .modal-header .modal-title .header-main {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  line-height: 1.1;
  display: block;
}
#upgradePlanModal .modal-header .modal-title .header-sub {
  font-size: 0.85rem;
  font-weight: 400;
  color: #fffbe6;
  margin-top: 0.1em;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
  display: block;
}
#upgradePlanModal .btn-close {
  background: none;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  min-height: 1.1rem;
  font-size: 0.8rem;
  opacity: 0.95;
  position: absolute;
  right: 0.2rem;
  top: 0.2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
}
#upgradePlanModal .btn-close svg,
#upgradePlanModal .btn-close:before,
#upgradePlanModal .btn-close:after {
  color: #fff !important;
  background: none !important;
  filter: none !important;
}
#upgradePlanModal .btn-close:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}
@media (max-width: 576px) {
  #upgradePlanModal .modal-dialog {
    max-width: 99vw;
    width: 99vw;
  }
  #upgradePlanModal .modal-header {
    min-height: 29px;
    padding: 0.12rem 0.1rem 0.12rem 0.1rem;
  }
  #upgradePlanModal .modal-header .modal-title {
    font-size: 0.95rem;
    gap: 0.3em;
  }
  #upgradePlanModal .modal-header .modal-title .crown-icon {
    font-size: 1.1rem;
    margin-right: 0.15em;
  }
  #upgradePlanModal .modal-header .modal-title .header-main {
    font-size: 0.95rem;
  }
  #upgradePlanModal .modal-header .modal-title .header-sub {
    font-size: 0.7rem;
  }
  #upgradePlanModal .btn-close {
    right: 0.08rem;
    top: 0.08rem;
    width: 0.7rem;
    height: 0.7rem;
    min-width: 0.7rem;
    min-height: 0.7rem;
    font-size: 0.5rem;
  }
}
#upgradePlanModal .modal-dialog {
  max-width: 420px;
  width: 99vw;
  margin: 0 auto;
  display: flex;
  align-items: center;
  min-height: unset;
  height: auto;
}
#upgradePlanModal .modal-content {
  border-radius: 1.2rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  padding: 0.2rem 0.2rem 0 0.2rem;
}
#upgradePlanModal .modal-header {
  background: linear-gradient(90deg, #28a745 0%, #43e97b 100%);
  color: #fff;
  border-top-left-radius: 1.2rem;
  border-top-right-radius: 1.2rem;
  text-align: center;
  justify-content: center;
  position: relative;
  min-height: 46px;
  padding: 0.22rem 0.2rem 0.22rem 0.2rem;
  display: flex;
  align-items: center;
}
#upgradePlanModal .modal-header .modal-title {
  width: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1.1;
  gap: 0.4em;
}
#upgradePlanModal .modal-header .modal-title .crown-icon {
  font-size: 1.2rem;
  color: #fffbe6;
  text-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 0;
  margin-right: 0.2em;
}
#upgradePlanModal .modal-header .modal-title .header-main {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  line-height: 1.1;
  display: block;
}
#upgradePlanModal .modal-header .modal-title .header-sub {
  font-size: 0.85rem;
  font-weight: 400;
  color: #fffbe6;
  margin-top: 0.08em;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
  display: block;
}
#upgradePlanModal .btn-close {
  background: none;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 0.9rem;
  height: 0.9rem;
  min-width: 0.9rem;
  min-height: 0.9rem;
  font-size: 0.7rem;
  opacity: 0.95;
  position: absolute;
  right: 0.12rem;
  top: 0.12rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
}
#upgradePlanModal .btn-close svg,
#upgradePlanModal .btn-close:before,
#upgradePlanModal .btn-close:after {
  color: #fff !important;
  background: none !important;
  filter: none !important;
}
#upgradePlanModal .btn-close:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}
#upgradePlanModal .modal-body {
  padding-bottom: 0.1rem;
}
#upgradePlanModal .text-center.mb-3 {
  margin-bottom: 0.3rem !important;
}
#upgradePlanModal .premium-features.mb-2 {
  margin-bottom: 0.1rem !important;
}
#upgradePlanModal .modal-footer {
  margin-top: 0 !important;
  padding-top: 0.1rem !important;
  border: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.5rem;
}
#upgradePlanModal .modal-footer .circle-btn {
  border-radius: 50px;
  padding: 0.45em 1.5em;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: none;
  transition: background 0.2s, color 0.2s;
}
#upgradePlanModal .modal-footer .circle-btn.cancel {
  background: #28a745;
  color: #fff;
  min-width: 120px;
  justify-content: center;
}
#upgradePlanModal .modal-footer .circle-btn.cancel:hover {
  background: #218838;
  color: #fff;
}
#upgradePlanModal .modal-footer .circle-btn.connect {
  background: linear-gradient(90deg, #28a745 0%, #43e97b 100%);
  color: #fff;
}
#upgradePlanModal .modal-footer .circle-btn.connect:hover {
  background: linear-gradient(90deg, #43e97b 0%, #28a745 100%);
  color: #fff;
}
@media (max-width: 576px) {
  #upgradePlanModal .modal-dialog {
    max-width: 99vw;
    width: 99vw;
    min-height: unset;
    height: auto;
  }
  #upgradePlanModal .modal-header {
    min-height: 29px;
    padding: 0.12rem 0.1rem 0.12rem 0.1rem;
  }
  #upgradePlanModal .modal-header .modal-title {
    font-size: 0.8rem;
    gap: 0.2em;
  }
  #upgradePlanModal .modal-header .modal-title .crown-icon {
    font-size: 0.8rem;
    margin-right: 0.08em;
  }
  #upgradePlanModal .modal-header .modal-title .header-main {
    font-size: 0.8rem;
  }
  #upgradePlanModal .modal-header .modal-title .header-sub {
    font-size: 0.6rem;
  }
  #upgradePlanModal .btn-close {
    right: 0.04rem;
    top: 0.04rem;
    width: 0.5rem;
    height: 0.5rem;
    min-width: 0.5rem;
    min-height: 0.5rem;
    font-size: 0.4rem;
  }
  #upgradePlanModal .modal-footer .circle-btn {
    font-size: 0.9rem;
    padding: 0.35em 1.1em;
  }
  #upgradePlanModal .modal-footer .circle-btn.cancel {
    min-width: 90px;
  }
}
#limitReachedModal .modal-dialog,
#upgradePlanModal .modal-dialog {
  max-width: 420px;
  width: 99vw;
  margin: 0 auto;
  display: flex;
  align-items: center;
  min-height: unset;
  height: auto;
}
#limitReachedModal .modal-content,
#upgradePlanModal .modal-content {
  margin: 0 auto;
}
@media (max-width: 576px) {
  #limitReachedModal .modal-dialog,
  #upgradePlanModal .modal-dialog {
    max-width: 99vw;
    width: 99vw;
    min-height: unset;
    height: auto;
  }
}

/* ===== КАСТОМНЫЕ КНОПКИ ===== */

/* Контейнер для кнопок */
.custom-buttons-container {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding: 0;
}

/* Базовые стили для всех кастомных кнопок */
.custom-search-btn,
.custom-save-btn {
    /* Сброс всех Bootstrap стилей */
    all: unset;
    
    /* Основные стили */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: auto;
    justify-content: center;
    text-decoration: none;
    user-select: none;
    position: relative;
    overflow: hidden;
}

/* Кнопка поиска */
.custom-search-btn {
    background: transparent;
    color: #000000;
    border: 1px solid #adb5bd;
    box-shadow: none;
}

.custom-search-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: #4a90e2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.custom-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(74, 144, 226, 0.2);
}

/* Кнопка сохранения */
.custom-save-btn {
    background: transparent;
    color: #000000;
    border: 1px solid #adb5bd;
    box-shadow: none;
}

.custom-save-btn:hover {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.custom-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

/* Иконки в кнопках */
.custom-search-btn i,
.custom-save-btn i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.custom-search-btn i {
    color: #4a90e2;
}

.custom-save-btn i {
    color: #28a745;
}

.custom-search-btn:hover i,
.custom-save-btn:hover i {
    transform: scale(1.1);
}

/* Текст кнопок */
.custom-search-btn .button-text,
.custom-save-btn .button-text {
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #000000;
}

/* Состояние загрузки */
.custom-search-btn.loading,
.custom-save-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.custom-search-btn.loading i,
.custom-save-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность - стили перенесены в mobile_my_searches.css */

/* Фокус для доступности */
.custom-search-btn:focus,
.custom-save-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Отключенное состояние */
.custom-search-btn:disabled,
.custom-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== КОМПАКТНОЕ МОДАЛЬНОЕ ОКНО СОВЕТА ===== */

/* Компактное модальное окно */
.compact-help-modal {
    max-width: 480px !important;
    width: 90%;
    max-height: 70vh;
}

/* Заголовок совета */
.help-header {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.help-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.help-title i {
    color: #ff8f00;
    font-size: 1.1rem;
}

/* Тело совета */
.help-body {
    padding: 1.25rem;
    max-height: 50vh;
    overflow-y: auto;
}

/* Загрузка */
.help-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
}

.help-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ffc107;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.help-loading p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Содержимое совета */
.help-body h5 {
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e9ecef;
}

.help-body h5:first-child {
    margin-top: 0;
}

.help-body table {
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.help-body table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem;
}

.help-body table td {
    padding: 0.5rem;
    vertical-align: top;
}

.help-body code {
    background: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

/* Футер совета */
.help-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
}

.help-close-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-close-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.help-close-btn:active {
    transform: translateY(0);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .compact-help-modal {
        max-width: 95% !important;
        max-height: 80vh;
    }
    
    .help-header {
        padding: 0.75rem 1rem;
    }
    
    .help-title {
        font-size: 0.9rem;
    }
    
    .help-body {
        padding: 1rem;
        max-height: 60vh;
    }
    
    .help-footer {
        padding: 0.75rem 1rem;
    }
    
    .help-close-btn {
        padding: 0.4rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* ===== СТИЛИ ДЛЯ КНОПКИ ПРОКРУТКИ ВВЕРХ ===== */

/* Стили для кнопки прокрутки вверх */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* Анимация появления */
.scroll-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для мобильной навигации */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
} 

 

 