/* Стили для кнопок PDF и элементов интерфейса */

.pdf-buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center; /* Центрирование кнопок */
}

.pdf-button {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pdf-button i {
    margin-right: 8px;
}

.pdf-button-primary {
    background-color: #007bff;
    border: 1px solid #0069d9;
    color: white;
}

.pdf-button-primary:hover {
    background-color: #0069d9;
}

.pdf-button-secondary {
    background-color: #6c757d;
    border: 1px solid #5a6268;
    color: white;
}

.pdf-button-secondary:hover {
    background-color: #5a6268;
}

/* Индикатор загрузки */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 90%;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-message {
    font-size: 16px;
    color: #333;
}

/* Стили для всплывающих уведомлений */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.custom-alert.active {
    opacity: 1;
    visibility: visible;
}

.alert-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.alert-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-title {
    font-size: 18px;
    font-weight: 500;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.close-btn:hover {
    color: #343a40;
}

.alert-body {
    padding: 20px;
}

.alert-body p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.alert-footer {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #dee2e6;
}

.close-alert-btn {
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.close-alert-btn:hover {
    background-color: #0069d9;
}

/* Стили для кнопки экспорта PDF на десктопах */
@media (min-width: 769px) {
    #new-pdf-button {
        min-width: 300px; /* Минимальная ширина кнопки на ПК */
        padding: 10px 20px; /* Увеличенные отступы для лучшего вида */
        font-size: 16px; /* Увеличенный размер шрифта */
    }
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .alert-content {
        max-width: 90%;
    }
    
    .pdf-buttons-container {
        flex-direction: column;
    }
}