/* -------------------- styles.css ЧАСТЬ 1 -------------------- */

/* -------- ОБЩИЕ НАСТРОЙКИ -------- */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5f6fa;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

header {
    text-align: center;
    margin-bottom: 20px;
}
/* -------- ОБЩИЕ НАСТРОЙКИ -------- */


/* -------- ФОРМА ЗАГРУЗКИ -------- */
.upload-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.upload-form input[type="file"] {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.upload-form button {
    background-color: #4a90e2;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

.upload-form button:hover {
    background-color: #357ab8;
}
/* -------- ФОРМА ЗАГРУЗКИ -------- */


/* -------- КОЛОНКИ И ПАНЕЛИ -------- */
.three-columns {
    display: flex;
    gap: 20px;
}

.panel {
    flex: 1;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    min-height: 200px;
}

.panel h2 {
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 10px;
}
/* -------- КОЛОНКИ И ПАНЕЛИ -------- */

/* -------------------- styles.css ЧАСТЬ 1 -------------------- */


/* -------------------- styles.css ЧАСТЬ 2 -------------------- */

/* -------- ИСТОРИЯ ЗАГРУЗОК -------- */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list li {
    margin-bottom: 10px;
}

.upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 6px;
}

.upload-item:hover {
    background-color: #f0f8ff;
}

.file-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #4a90e2;
    flex-shrink: 0;
}

.item {
    display: flex;
    align-items: center;
    flex-grow: 1;
    cursor: pointer;
}

.item .file-name {
    font-weight: bold;
}

.upload-date {
    font-size: 12px;
    color: #888;
    text-align: right;
    white-space: nowrap;
    padding-left: 10px;
}
/* -------- ИСТОРИЯ ЗАГРУЗОК -------- */


/* -------- JSON-ДОКУМЕНТЫ -------- */
#analysis-list .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: white;
    margin-bottom: 8px;
}

.doc-name {
    font-weight: bold;
    font-size: 14px;
}

#analysis-list .item a {
    font-size: 14px;
    color: #0077cc;
    text-decoration: underline;
    margin-left: 12px;
}
/* -------- JSON-ДОКУМЕНТЫ -------- */


/* -------- КНОПКИ -------- */
#download-btn, #delete-btn {
    padding: 8px 16px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 10px 6px 0;
}

#download-btn {
    background-color: #4a90e2;
    color: white;
}

#download-btn:hover {
    background-color: #357ab8;
}

#delete-btn {
    background-color: #e74c3c;
    color: white;
}

#delete-btn:hover {
    background-color: #c0392b;
}
/* -------- КНОПКИ -------- */


/* -------- ПРОГРЕСС -------- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.progress-box {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    border: 1px solid #ccc;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#progress-bar {
    width: 300px;
    height: 20px;
    border-radius: 10px;
    background: #eee;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

#progress-fill {
    height: 100%;
    width: 0;
    background: #4caf50;
    transition: width 0.3s ease;
}
/* -------- ПРОГРЕСС -------- */


/* -------- СТАТУС -------- */
#status-panel p {
    margin: 0 0 10px 0;
}

#status-panel ul {
    padding-left: 18px;
    margin: 0;
}

#status-panel li {
    margin-bottom: 4px;
}

.error {
    color: red;
    font-weight: bold;
}
/* -------- СТАТУС -------- */

/* -------------------- styles.css ЧАСТЬ 2 -------------------- */

/* -------------------- styles.css ЧАСТЬ 3 -------------------- */

/* -------- OCR ПРОГРЕСС -------- */
#ocr-bar {
    width: 300px;
    height: 20px;
    border-radius: 10px;
    background: #ddd;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

#ocr-fill {
    height: 100%;
    width: 0;
    background: #2196f3;
    transition: width 0.3s ease;
}

#ocr-text {
    font-weight: bold;
    margin-top: 10px;
    color: #333;
}
/* -------- OCR ПРОГРЕСС -------- */


/* -------- СКРЫТЫЕ ЭЛЕМЕНТЫ -------- */
#filter-user {
    display: none !important;
}

#username {
    display: none !important;
}
/* -------- СКРЫТЫЕ ЭЛЕМЕНТЫ -------- */


/* -------- ВЫБОР ФАЙЛА -------- */
.custom-file-btn {
    display: inline-block;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    background-color: #218c74;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
    vertical-align: middle;
    user-select: none;
    text-align: center;
    white-space: nowrap;
}

.custom-file-btn:hover {
    background-color: #1e7e66;
}

#file-chosen {
    margin-left: 12px;
    font-size: 14px;
    color: #444;
    vertical-align: middle;
}
/* -------- ВЫБОР ФАЙЛА -------- */


/* -------- КНОПКА "ОЧИСТИТЬ ВСЁ" -------- */
#clear-all-btn {
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: 10px;
}

#clear-all-btn:hover {
    background-color: #c0392b;
}
/* -------- КНОПКА "ОЧИСТИТЬ ВСЁ" -------- */

/* -------------------- styles.css ЧАСТЬ 3 -------------------- */


/* -------- Переключатель краткого анализа -------- */
.toggle-box {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}
.toggle-box input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 6px;
}
/* -------- Переключатель краткого анализа -------- */


/* -------- МОДАЛЬНОЕ JSON-ОКНО -------- */
pre {
    word-break: break-word;
    white-space: pre-wrap;
}
/* -------- МОДАЛЬНОЕ JSON-ОКНО -------- */


/* -------- Тумблер (галочка "Промт 2") -------- */
.toggle-box {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.switch-label {
    font-size: 14px;
    vertical-align: middle;
}
/* -------- Тумблер (галочка "Промт 2") -------- */


/* -------- КНОПКА "ОТПРАВИТЬ В LEXWARE" -------- */
.send-to-lexware-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.send-to-lexware-btn:hover {
    background-color: #27ae60;
}

.send-to-lexware-btn i {
    font-style: normal;
}
/* -------- КНОПКА "ОТПРАВИТЬ В LEXWARE" -------- */
