/* Document Management Styles - Animations disabled to reduce CPU usage */

/* Global animation and transition disabling */
#document-modal *,
#document-upload-modal *,
.document-item,
.document-actions button,
.document-upload-modal,
.document-upload-content,
.document-upload-header,
.close-document-upload,
.document-upload-body,
.document-upload-form * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Ensure immediate visibility without transitions */
.document-upload-modal.show {
    opacity: 1 !important;
}

.vehicle-documents {
    margin-top: 15px;
}

/* Ensure modals are hidden by default */
#document-modal.hidden,
#document-upload-modal.hidden {
    display: none;
}

.document-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 5px;
    padding: 10px;
    background: rgba(26, 26, 37, 0.5);
}

/* Remove highlight animation */
.highlight-section {
    border-radius: 5px;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.document-item:last-child {
    border-bottom: none;
}

.document-item:hover {
    background: rgba(108, 99, 255, 0.1);
}

.document-item::before {
    display: none; /* Remove animated gradient bar */
}

.document-item:hover::before {
    display: none;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.document-icon {
    font-size: 24px;
    color: var(--secondary-color);
    width: 40px;
    text-align: center;
    position: relative;
}

.document-icon .blockchain-verified {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 12px;
    color: #00e676;
}

.document-details {
    flex: 1;
}

.document-name {
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.document-name .blockchain-badge {
    margin-left: 8px;
    font-size: 0.7rem;
    padding: 2px 5px;
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    border-radius: 3px;
    font-weight: normal;
}

.document-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.document-meta .verified {
    color: #00e676;
}

.document-meta .unverified {
    color: #ff6b6b;
}

.document-blockchain-info {
    font-size: 0.75rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.document-blockchain-info .hash {
    font-family: monospace;
    background: rgba(26, 26, 37, 0.5);
    padding: 2px 4px;
    border-radius: 3px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-blockchain-info .timestamp {
    white-space: nowrap;
}

.document-actions {
    display: flex;
    gap: 8px;
}

.document-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.document-btn:hover {
    background: rgba(108, 99, 255, 0.2);
}

.document-btn.view-btn:hover {
    color: var(--primary-color);
}

.document-btn.download-btn:hover {
    color: var(--secondary-color);
}

.document-btn.delete-btn:hover {
    color: var(--accent-color);
}

.document-edit-mode .document-item .edit-document-btn {
    display: block;
}

.document-edit-mode .document-item .document-btn {
    opacity: 0.7;
}

.document-edit-mode .document-item .document-btn:hover {
    opacity: 1;
}

.document-edit-mode .document-item {
    position: relative;
}

.document-edit-mode .document-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
}

/* Document Viewer Modal */
.document-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-viewer-modal.show {
    opacity: 1;
}

.document-viewer-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background-color: var(--bg-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.document-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    background: linear-gradient(90deg, rgba(26, 26, 37, 0.8) 0%, rgba(108, 99, 255, 0.1) 100%);
}

.document-viewer-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-document-viewer {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.close-document-viewer:hover {
    color: var(--primary-color);
}

.document-viewer-body {
    display: flex;
    padding: 20px;
    gap: 20px;
    overflow-y: auto;
    flex: 1;
}

@media (max-width: 768px) {
    .document-viewer-body {
        flex-direction: column;
    }
}

/* Document Upload Modal */
.document-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-upload-modal.show {
    opacity: 1;
}

.document-upload-content {
    width: 90%;
    max-width: 600px;
    background-color: var(--bg-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.document-upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    background: linear-gradient(90deg, rgba(26, 26, 37, 0.8) 0%, rgba(108, 99, 255, 0.1) 100%);
}

.document-upload-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-document-upload {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.close-document-upload:hover {
    color: var(--primary-color);
}

.document-upload-body {
    padding: 20px;
}

.document-upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-upload-form .form-group {
    margin-bottom: 0;
}

.document-upload-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.document-upload-form .upload-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: linear-gradient(45deg, #0d47a1, #1976d2);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.document-upload-form .upload-btn:hover {
    background: linear-gradient(45deg, #1976d2, #0d47a1);
}
