/* Стили для модального окна управления доступом */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
}

.close-modal {
    margin-top: 20px;
    padding: 5px 15px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.close-modal:hover {
    background-color: #d32f2f;
}

.current-path {
    margin: 10px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 3px;
}

.access-list {
    margin: 15px 0;
}

#allowed-users-list {
    list-style: none;
    padding: 0;
}

#allowed-users-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    margin: 5px 0;
    background-color: #f5f5f5;
    border-radius: 3px;
}

#allowed-users-list button {
    background: none;
    border: none;
    cursor: pointer;
    color: #f44336;
}

#allowed-users-list li.error {
    color: #f44336;
    background-color: #ffebee;
    padding: 10px;
    text-align: center;
    font-style: italic;
}

.add-access {
    margin: 15px 0;
    display: flex;
    gap: 10px;
}

#new-user-email {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#add-access-button {
    padding: 5px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#add-access-button:hover {
    background-color: #45a049;
}

/* Стили для модального окна отправки ссылок */
.share-modal-content {
    max-width: 400px !important;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.share-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.share-option:active {
    transform: translateY(0);
}

.share-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.share-text {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.share-option[data-platform="telegram"]:hover {
    border-color: #0088cc;
    background-color: #f0f8ff;
}

.share-option[data-platform="whatsapp"]:hover {
    border-color: #25d366;
    background-color: #f0fff0;
}

.share-option[data-platform="email"]:hover {
    border-color: #ea4335;
    background-color: #fff5f5;
}

.share-option[data-platform="copy"]:hover {
    border-color: #6c757d;
    background-color: #f8f9fa;
}

.share-option[data-platform="yandex-tracker"]:hover {
    border-color: #ff0000;
    background-color: #fff5f5;
}

/* Мобильные стили для модального окна отправки ссылок */
@media (max-width: 768px) {
    .share-modal-content {
        margin: 10% auto;
        width: 90%;
        max-width: 350px;
    }
    
    .share-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .share-option {
        padding: 16px;
    }
    
    .share-icon {
        font-size: 28px;
    }
    
    .share-text {
        font-size: 13px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
}
    background-color: #45a049;
}

/* Мобильные стили для улучшения отображения */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .add-access {
        flex-direction: column;
        gap: 10px;
    }
    
    #new-user-email {
        width: 100%;
    }
    
    #add-access-button {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }
    
    .close-modal {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }
    
    .current-path {
        font-size: 14px;
        word-break: break-word;
    }
    
    #allowed-users-list li {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    #allowed-users-list button {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 4px;
        background-color: #f44336;
        color: white;
    }
}

.files-table-header .date-cell,
.files-table .date-cell {
    min-width: 120px;
    max-width: 180px;
    width: 140px;
    text-align: center;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-table-header .size-cell,
.files-table .size-cell {
    min-width: 80px;
    max-width: 120px;
    width: 100px;
    text-align: center;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} 

/* Стили для действий с файлами */
.file-actions {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.file-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.file-actions button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-icon {
    margin-right: 8px;
    font-size: 16px;
}

.file-name {
    flex-grow: 1;
    margin-right: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .file-name {
        font-size: 14px;
        line-height: 1.3;
        max-width: 100%;
        word-break: break-word;
    }
    
    /* Подсказка для обрезанных имен файлов */
    .file-name[style*="border-bottom: 1px dotted #007bff"] {
        position: relative;
    }
    
    .file-name[style*="border-bottom: 1px dotted #007bff"]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 0;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 5px 8px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        z-index: 1000;
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
} 

/* Стили для колонки удаления */
.delete-cell {
    width: 60px;
    text-align: center;
}

.delete-cell button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.delete-cell button:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.header-cell.delete-cell {
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Стили для активного файла */
.file-row.active {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3;
}

.file-row.active .file-name {
    color: #1976d2;
    font-weight: 500;
}

/* Анимация для плавного переключения */
.content {
    transition: width 0.3s ease;
}

.preview {
    transition: width 0.3s ease;
} 

.extracted-text-container {
    white-space: pre-line;
    font-family: inherit;
    font-size: 15px;
    color: #222;
    padding: 10px 0;
    min-height: 120px;
} 

/* Стили для кнопки связывания файлов из почты */
.link-email-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-left: 5px;
}

.link-email-file-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Стили для кнопки скачивания */
.download-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-left: 5px;
}

.download-file-btn:hover {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

/* Стили для кнопки управления связями */
.manage-links-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-left: 5px;
}

.manage-links-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Стили для хлебных крошек */
.breadcrumbs-container {
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
    border-radius: 5px;
}

.breadcrumbs-container a {
    color: #007bff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.breadcrumbs-container a:hover {
    background-color: #e9ecef;
    text-decoration: none;
}

.breadcrumbs-container span {
    color: #6c757d;
    margin: 0 5px;
}

/* Стили для подсветки файла */
.highlighted-file {
    background-color: #fff8dc !important;
    border: 2px solid #d4af37 !important;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6) !important;
    animation: highlight-pulse 2s ease-in-out;
    transform: scale(1.01);
}

@keyframes highlight-pulse {
    0% {
        background-color: #fff8dc;
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
    }
    50% {
        background-color: #f5f5dc;
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
    }
    100% {
        background-color: #fff8dc;
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
    }
}

/* Стили для чекбоксов выбора файлов */
.file-checkbox {
    margin-right: 8px;
    transform: scale(1.2);
    cursor: pointer;
}

.file-checkbox:hover {
    transform: scale(1.3);
}

/* Стили для секции удаления */
.delete-section {
    margin-top: 20px;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-selected-btn {
    background: transparent;
    color: inherit;
    border: none;
    padding: 4px;
    cursor: pointer;
}

.delete-selected-btn:hover { background: transparent; }

.delete-selected-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Стили для выбранных файлов */
.file-row.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.file-checkbox:checked + .file-name {
    font-weight: bold;
} 