/* Стили для страницы с тикетами */
h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Таблица тикетов */
.tickets-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow-x: auto;
    display: block;
    margin-bottom: 2rem;
}

/* Контейнер для таблицы - для горизонтальной прокрутки */
.tickets-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.tickets-table th {
    background-color: #f8f9fa;
    color: #495057;
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

.tickets-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.tickets-table tr:last-child td {
    border-bottom: none;
}

.tickets-table tr:hover {
    background-color: #f8f9fa;
}

/* Статусы тикетов */
.ticket-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-new {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.status-pending-user {
    background-color: #fff8e1;
    color: #ff6f00;
}

.status-in-progress {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-archived {
    background-color: #eeeeee;
    color: #757575;
}

.status-closed {
    background-color: #ffebee;
    color: #c62828;
}

/* Кнопки действий */
.action-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
    margin-bottom: 5px;
    white-space: nowrap;
}

.action-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.view-btn {
    background-color: #3498db;
}

.edit-btn {
    background-color: #f1c40f;
    color: #2c3e50;
}

.delete-btn {
    background-color: #e74c3c;
}

.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.no-tickets-msg {
    display: block;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
    margin: 1.5rem 0;
}

/* Стили для форм поиска */
.search-container {
    margin-bottom: 1.5rem;
    width: 100%;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.search-input-field {
    flex-grow: 1;
    min-width: 250px;
}

.search-action-button {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Адаптивный дизайн для таблиц на мобильных устройствах */
@media (max-width: 1200px) {
    .tickets-table th:nth-child(5),
    .tickets-table td:nth-child(5),
    .tickets-table th:nth-child(6),
    .tickets-table td:nth-child(6) {
        display: none; /* Скрываем некоторые колонки на средних экранах */
    }
}

@media (max-width: 992px) {
    .tickets-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
        max-width: 100%;
        white-space: nowrap;
    }
    
    /* Подсказка о горизонтальной прокрутке */
    .tickets-table-container {
        position: relative;
    }
    
    .tickets-table-container::after {
        content: "←→ Свайпните для прокрутки";
        display: block;
        text-align: center;
        padding: 5px 10px;
        background-color: rgba(0,0,0,0.05);
        font-size: 0.8rem;
        color: #6c757d;
        border-radius: 0 0 8px 8px;
        animation: fadeOut 5s forwards;
    }
}

@media (max-width: 768px) {
    .tickets-table thead {
        display: none;
    }
    
    .tickets-table tbody, .tickets-table tr, .tickets-table td {
        display: block;
        width: 100%;
    }
    
    .tickets-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        position: relative;
        padding-top: 40px; /* Место для ID тикета */
    }
    
    .tickets-table tr::before {
        content: "Тикет #" attr(data-ticket-id);
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 5px 10px;
        background-color: #f8f9fa;
        font-weight: bold;
        border-bottom: 1px solid #e9ecef;
        border-radius: 8px 8px 0 0;
    }
    
    .tickets-table td {
        text-align: right;
        padding: 0.75rem;
        position: relative;
        border-bottom: 1px solid #f0f0f0;
        min-height: 50px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .tickets-table td:last-child {
        border-bottom: none;
        border-radius: 0 0 8px 8px;
    }

    .tickets-table td::before {
        content: attr(data-label);
        position: relative;
        font-weight: 600;
        color: #6c757d;
        margin-right: 10px;
        white-space: nowrap;
    }
    
    .action-buttons-container {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        width: 100%;
        gap: 8px;
    }
    
    .action-btn {
        flex: 1;
        max-width: 150px;
        text-align: center;
    }
    
    /* Улучшение отображения статуса на мобильных */
    .ticket-status {
        margin-left: auto;
    }
    
    /* Улучшения для поиска на мобильных */
    .search-form {
        flex-direction: column;
        width: 100%;
    }

    .search-input-field {
        width: 100%;
    }
    
    .search-action-button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .tickets-table tr {
        margin-bottom: 1.5rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .tickets-table td {
        padding: 0.6rem 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tickets-table td::before {
        margin-bottom: 0.3rem;
    }
    
    .action-buttons-container {
        flex-direction: column;
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
        max-width: none;
        margin-bottom: 0.5rem;
    }
    
    /* Улучшения для поиска на мобильных */
    .search-form form {
        width: 100%;
        flex-direction: column;
    }
    
    .search-action-button {
        width: 100%;
        margin-top: 5px;
        font-size: 0.9rem;
    }
    
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-container {
        overflow-x: auto;
    }
} 

/* Стили для пагинации */
.pagination-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style-type: none; /* Убираем маркеры списка */
    padding-left: 0; /* Убираем отступ слева */
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    color: #4a5568;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.pagination .page-link:hover {
    color: #2d3748;
    background-color: #edf2f7;
    border-color: #cbd5e0;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #4299e1;
    border-color: #4299e1;
}

.pagination .page-item.disabled .page-link {
    color: #a0aec0;
    pointer-events: none;
    background-color: #fff;
    border-color: #e2e8f0;
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-container {
        overflow-x: auto;
    }
} 

/* Улучшения для узких экранов */
@media (max-width: 480px) {
    .tickets-table td, .tickets-table th {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .action-btn {
        min-width: 100px;
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .tickets-table-wrapper::after {
        content: "← Свайпните для прокрутки →";
        display: block;
        text-align: center;
        padding: 5px;
        font-size: 0.75rem;
        color: #777;
        background-color: rgba(0,0,0,0.03);
        border-radius: 0 0 8px 8px;
    }
} 