/*
* Файл cbr-adaptive.css - добавить в директорию /css/
* Подключить в index.php добавив:
* <link rel="stylesheet" href="/css/cbr-adaptive.css">
*/

/* Общие улучшения */
body {
    scroll-behavior: smooth;
}

.card {
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card:hover.hover-effect {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px);
}

/* Улучшенные стили для табов */
.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 0.75rem 1rem;
    font-weight: 500;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 0.25rem 0.25rem 0 0;
}

.nav-tabs .nav-link:hover:not(.active) {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
    border-bottom: 2px solid rgba(13, 110, 253, 0.3);
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: transparent;
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

/* Улучшенные подписи в графиках */
.chart-label {
    font-weight: 600;
    color: #495057;
}

.chart-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Стили для валютных карточек */
.currency-card {
    transition: all 0.3s ease;
}

.currency-card:hover {
    transform: translateY(-5px);
}

.currency-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Улучшенные стили для таблицы */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Стили для поиска */
.search-container {
    position: relative;
}

.search-container .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

.search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 10px;
    color: #6c757d;
}

.search-container .form-control {
    padding-left: 35px;
}

/* Стили для информационных блоков */
.info-block {
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
}

.info-block h3 {
    margin-bottom: 1rem;
    color: #0d6efd;
}

/* Улучшенные иконки */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* Адаптивный дизайн для различных устройств */
@media (max-width: 1200px) {
    .chart-container {
        height: 45vh;
    }
}

@media (max-width: 992px) {
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .chart-container {
        height: 40vh;
    }

    .display-4 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }

    .chart-container {
        height: 35vh;
    }

    .display-4 {
        font-size: 2rem;
    }

    .currency-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .chart-container {
        height: 30vh;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Стили для печати */
@media print {
    .nav-tabs, .card, .btn {
        display: none !important;
    }

    .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
    }

    .chart-container {
        height: auto !important;
        page-break-inside: avoid;
    }

    .table {
        border-collapse: collapse !important;
    }

    .table td, .table th {
        background-color: #fff !important;
        border: 1px solid #ddd !important;
    }
}

/* Переключатель темы (опционально) */
.theme-switch {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-switch:hover {
    transform: scale(1.1);
}