/* Contract Consultant Specific Styles */

/* Upload Section */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 80px;
    color: var(--primary-blue-light);
}

.upload-box {
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-box.drag-over {
    border-color: var(--primary-blue);
    background: rgba(0, 123, 255, 0.05);
}

.upload-content {
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-content:hover {
    transform: scale(1.02);
}

.file-preview {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Analysis Table */
.analysis-table-bubble {
    max-width: 90%;
    overflow-x: auto;
}

.contract-analysis-table {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.contract-analysis-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.contract-analysis-table th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.contract-analysis-table td {
    vertical-align: middle;
    padding: 8px;
}

.contract-analysis-table tbody tr:hover {
    background: rgba(0, 123, 255, 0.05);
}

/* Contract Info Card */
.contract-info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.contract-info-card small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* System Messages */
.system-message {
    animation: fadeIn 0.5s ease;
    transition: opacity 0.3s ease;
}

.system-message small {
    background: #f8f9fa;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}
.contract-item{
    margin-top: 12px;
    cursor: pointer;
    border-radius: 10px;
    padding: 5px 10px;
    border: solid #c9c9c9 2px;
    transition: all 0.3s ease;
}
.contract-item:hover{
    background: rgba(41, 39, 39, 0.05);
    transform: translateY(-5px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contract History */
.contract-history-container {
    /*max-height: 300px;*/
    overflow-y: auto;
}

.contract-history-container::-webkit-scrollbar {
    width: 6px;
}

.contract-history-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.contract-history-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.contract-history-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Perspective Toggle */
.perspective-toggle .btn-check:checked + .btn {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Loading Animation for Analysis */
.analysis-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.analysis-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.data-stream-container {
    max-height: 400px;
    overflow-y: auto;
}

.data-property {
    transition: background-color 0.3s ease;
}

.data-property:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.analysis-table-bubble {
    animation: slideInFromRight 0.5s ease;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.contract-analysis-table {
    font-size: 0.85rem;
    min-width: 800px;
}

.contract-analysis-table th,
.contract-analysis-table td {
    padding: 0.5rem 0.3rem;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
}

.contract-analysis-table th:first-child,
.contract-analysis-table td:first-child {
    min-width: 120px;
    max-width: 150px;
}

.contract-analysis-table th:nth-child(2),
.contract-analysis-table td:nth-child(2) {
    min-width: 150px;
    max-width: 200px;
}

.contract-analysis-table th:nth-child(3),
.contract-analysis-table td:nth-child(3) {
    min-width: 140px;
    max-width: 180px;
}

.contract-analysis-table th:nth-child(4),
.contract-analysis-table td:nth-child(4) {
    min-width: 100px;
    text-align: center;
}

.contract-analysis-table th:nth-child(5),
.contract-analysis-table td:nth-child(5) {
    min-width: 150px;
    max-width: 200px;
}

.contract-analysis-table th:nth-child(6),
.contract-analysis-table td:nth-child(6) {
    min-width: 120px;
    max-width: 160px;
}

.contract-analysis-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.analysis-table-bubble {
    max-width: 95vw;
}
.analysis-table-message .message-bubble {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.analysis-table-message .bot-avatar {
    display: none !important;
}
.table-actions button:nth-of-type(2) {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-container {
        max-width: 100%;
    }

    .upload-box {
        padding: 20px;
    }

    .upload-icon {
        font-size: 60px;
    }

    .analysis-table-bubble {
        max-width: 100%;
    }

    .contract-analysis-table {
        font-size: 0.75rem;
    }

    .contract-history-container {
        max-height: 200px;
    }
}
