/* ===================================
   Upload & Results Sections
   =================================== */

/* Upload Section */
.upload-section {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.upload-section.hidden {
    display: none;
}

#loading {
    margin-top: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#loading img {
    width: 60px;
    margin-bottom: 15px;
}

#loading-text {
    font-size: 16px;
    font-weight: bold;
    color: #002855;
}

.stage {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    padding: 8px;
    border-radius: 5px;
    background-color: #f8faff;
}

.stage span {
    margin-left: 10px;
}

.checkmark {
    color: green;
    font-weight: bold;
    font-size: 18px;
}

.file-input {
    margin: 20px 0;
    padding: 10px;
    border: 2px dashed #002855;
    border-radius: 5px;
    background-color: #f8faff;
}

.btn {
    background-color: #002855;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 0 10px;
}

.btn:hover {
    background-color: #004080;
}

.btn.demo {
    background-color: #28a745;
}

.btn.demo:hover {
    background-color: #218838;
}

/* Results Section */
.results-section {
    display: none;
    height: calc(100vh - 32px);
}

.results-section.show {
    display: block;
}

.split-container {
    display: flex;
    height: 100%;
    position: relative;
}

/* Horizontal layout for larger screens */
.pdf-pane {
    width: 40%;
    height: 100%;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.table-pane {
    width: 60%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.resize-handle {
    width: 4px;
    height: 100%;
    background-color: #dee2e6;
    cursor: col-resize;
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: background-color 0.2s;
}

.resize-handle:hover {
    background-color: #002855;
}

/* Vertical layout for smaller screens */
@media (max-width: 1199px) {
    .split-container {
        flex-direction: column;
    }
    
    .pdf-pane {
        width: 100%;
        height: 35%;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .table-pane {
        width: 100%;
        height: 65%;
    }
    
    .resize-handle {
        width: 100%;
        height: 4px;
        cursor: row-resize;
        position: relative;
        top: auto;
        bottom: auto;
    }
}

/* Floating Action Button */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
}

.floating-actions.show {
    display: block;
}

.approve-fab {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
    justify-content: center;
}

.approve-fab:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.approve-fab:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(16, 185, 129, 0.4);
}

.fab-icon {
    font-size: 16px;
    font-weight: bold;
}

.fab-text {
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Responsive FAB */
@media (max-width: 768px) {
    .floating-actions {
        bottom: 20px;
        right: 20px;
    }
    
    .approve-fab {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .fab-text {
        display: none;
    }
    
    .approve-fab {
        min-width: 50px;
        border-radius: 50%;
        padding: 15px;
    }
}

/* Loading state for FAB */
.approve-fab.loading {
    pointer-events: none;
    opacity: 0.7;
}

.approve-fab.loading .fab-icon {
    animation: spin 1s linear infinite;
}
