/* methods.css - Реестр методик поверки */

/* Общие стили страницы */
body {
    background: #f0f2f5;
}

/* Общие стили контейнера */
.methods-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== ХЕДЕР ========== */
.methods-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.methods-title-section h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.methods-title-section h1 i {
    color: #3498db;
}

.methods-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}

/* Статистика */
.methods-stats {
    display: flex;
    gap: 20px;
}

.methods-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.methods-stats .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.methods-stats .stat-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.methods-stats .stat-icon i {
    color: white;
    font-size: 1.2rem;
}

.methods-stats .stat-info {
    text-align: right;
}

.methods-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.methods-stats .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== ПОИСК ========== */
.search-box {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-icon {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    color: #6c757d;
}

.search-field {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.search-field:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.search-button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

.search-tools {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.clear-search {
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.clear-search:hover {
    color: #c0392b;
    text-decoration: underline;
}

.search-results-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.search-results-info strong {
    color: #2c3e50;
}

/* ========== ТАБЛИЦА ========== */
.methods-table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.table-responsive {
    overflow-x: auto;
}

.methods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
}

.methods-table th {
    text-align: left;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.methods-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    background: white;
}

.methods-table tbody tr:hover td {
    background: #f8f9fa;
}

/* Ячейки */
.cell-id {
    color: #6c757d;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.cell-number .copy-btn,
.cell-method-desig .copy-btn {
    background: #f1f3f4;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2c3e50;
    display: inline-block;
}

.cell-number .copy-btn:hover,
.cell-method-desig .copy-btn:hover {
    background: #3498db;
    color: white;
}

.cell-number .copy-btn.copied,
.cell-method-desig .copy-btn.copied {
    background: #27ae60;
    color: white;
}

.cell-method-desig .copy-btn {
    background: #e8f0fe;
    color: #1a73e8;
    font-family: 'Courier New', monospace;
}

.si-name, .method-name {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #2c3e50;
}

.method-name {
    font-size: 0.85rem;
    color: #495057;
}

/* ========== ПАГИНАЦИЯ ========== */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.85rem;
}

.pagination-info strong {
    color: #2c3e50;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.page-prev, .page-next, .page-number {
    padding: 8px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.page-number.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.page-prev:hover, .page-next:hover, .page-number:hover:not(.active) {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* ========== ИНФО ПАНЕЛЬ ========== */
.info-panel {
    display: flex;
    gap: 30px;
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    flex-wrap: wrap;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 1.1rem;
}

.info-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.85rem;
    color: #2c3e50;
}

.info-value code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #e74c3c;
}

/* ========== ПУСТОЕ СОСТОЯНИЕ ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

/* ========== ТУЛТИП ========== */
.copy-tooltip {
    background: #2c3e50;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.copy-tooltip.show {
    opacity: 1;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
    .methods-container {
        padding: 15px;
    }
    
    .methods-table th,
    .methods-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .methods-header {
        flex-direction: column;
    }
    
    .methods-stats {
        width: 100%;
        justify-content: center;
    }
    
    .methods-stats .stat-item {
        flex: 1;
        justify-content: center;
    }
    
    .search-input-group {
        flex-wrap: wrap;
    }
    
    .search-field {
        min-width: 200px;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .info-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-item {
        width: 100%;
    }
    
    .methods-table {
        font-size: 0.8rem;
    }
    
    .methods-table th,
    .methods-table td {
        padding: 8px 10px;
    }
    
    .cell-number .copy-btn,
    .cell-method-desig .copy-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .si-name, .method-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .methods-stats {
        flex-direction: column;
    }
    
    .methods-stats .stat-item {
        justify-content: space-between;
    }
    
    .methods-stats .stat-info {
        text-align: left;
    }
    
    .table-responsive {
        margin: 0 -15px;
    }
    
    /* Скрываем колонку ID на мобильных */
    .methods-table th:first-child,
    .methods-table td:first-child {
        display: none;
    }
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.methods-table tbody tr {
    animation: fadeInUp 0.3s ease forwards;
}

/* Стили для скроллбара */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}