/**
 * DeMV Platform - Document Manager Styling
 * Enhanced cyberpunk styling for document management system
 * Animations disabled to reduce CPU usage
 * Optimized for performance with modern visual design
 */

/* Remove all animated elements to reduce CPU usage */
.scanline,
.glitch-effect,
.glitch-overlay,
.modal#document-modal .modal-content:before,
.modal#document-modal .modal-content:after,
.modal#document-upload-modal .modal-content:before,
.modal#document-upload-modal .modal-content:after {
  display: none !important;
}

/* Enhanced Document Manager Modal Styling */
.document-manager-modal {
  background: linear-gradient(135deg, rgba(20, 21, 35, 0.95) 0%, rgba(30, 31, 50, 0.95) 100%) !important;
  border: 2px solid #00eeff !important;
  box-shadow: 0 0 20px rgba(0, 238, 255, 0.4) !important;
  border-radius: 8px !important;
  max-width: 800px !important;
  width: 90% !important;
  overflow: hidden !important;
  max-height: 90vh !important;
}

/* Document Modal Header */
.document-modal-header {
  background: rgba(0, 238, 255, 0.1) !important;
  border-bottom: 1px solid rgba(0, 238, 255, 0.3) !important;
  padding: 15px 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.document-modal-header .header-content {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.document-modal-header h3 {
  margin: 0 !important;
  color: #00eeff !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
}

.document-modal-header .document-icon {
  color: #00eeff !important;
  font-size: 1.4rem !important;
}

.document-modal-header .close-modal {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(0, 238, 255, 0.3) !important;
  color: #00eeff !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

/* Document Modal Body */
.document-modal-body {
  padding: 20px !important;
  overflow-y: auto !important;
  max-height: calc(90vh - 70px) !important;
}

.document-upload-intro {
  margin-bottom: 20px !important;
  padding: 12px 15px !important;
  background: rgba(0, 238, 255, 0.05) !important;
  border-left: 3px solid #00eeff !important;
  border-radius: 0 4px 4px 0 !important;
}

.document-upload-intro p {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}

/* Form Styling */
.document-form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 15px !important;
  margin-bottom: 15px !important;
}

@media (max-width: 768px) {
  .document-form-grid {
    grid-template-columns: 1fr !important;
  }
}

.document-upload-form .form-group {
  margin-bottom: 20px !important;
}

.document-upload-form .cyberpunk-label {
  display: block !important;
  margin-bottom: 8px !important;
  color: #00eeff !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
}

.document-upload-form .cyberpunk-input,
.document-upload-form .cyberpunk-select {
  width: 100% !important;
  padding: 10px 12px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(0, 238, 255, 0.3) !important;
  border-radius: 4px !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
}

.document-upload-form .cyberpunk-input:focus,
.document-upload-form .cyberpunk-select:focus {
  border-color: #00eeff !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0, 238, 255, 0.2) !important;
}

/* File Upload Styling */
.file-upload-group {
  margin-bottom: 25px !important;
}

.file-upload-container {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.file-upload-label {
  background: linear-gradient(90deg, #0088aa, #00eeff) !important;
  color: #000 !important;
  padding: 8px 15px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.file-name {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.9rem !important;
  padding: 5px 10px !important;
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 4px !important;
  max-width: 200px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Blockchain Options Styling */
.blockchain-options {
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 6px !important;
  padding: 15px !important;
  margin-bottom: 25px !important;
  border: 1px solid rgba(0, 238, 255, 0.2) !important;
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.05) !important;
}

.blockchain-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 15px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(0, 238, 255, 0.2) !important;
}

.blockchain-header i {
  color: #00eeff !important;
  font-size: 1.2rem !important;
}

.blockchain-label {
  color: #00eeff !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

/* Checkbox styling that matches the actual DOM structure */
.checkbox-group {
  background: rgba(0, 238, 255, 0.05) !important;
  border-radius: 6px !important;
  padding: 15px !important;
  border: 1px solid rgba(0, 238, 255, 0.15) !important;
  margin-bottom: 20px !important;
}

.checkbox-container {
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  margin-bottom: 10px !important;
}

.checkbox-container input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  border: 2px solid rgba(0, 238, 255, 0.5) !important;
  border-radius: 4px !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  margin-right: 12px !important;
  position: relative !important;
  cursor: pointer !important;
  outline: none !important;
  flex-shrink: 0 !important;
}

.checkbox-container input[type="checkbox"]:checked {
  background-color: rgba(0, 238, 255, 0.2) !important;
  border-color: #00eeff !important;
}

.checkbox-container input[type="checkbox"]:checked::after {
  content: '\2713' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #00eeff !important;
  font-size: 14px !important;
  font-weight: bold !important;
}

.checkbox-label {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
}

.checkbox-description {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  margin-left: 32px !important;
  margin-top: 5px !important;
}

.option-icon {
  background: rgba(0, 238, 255, 0.15) !important;
  border: 1px solid rgba(0, 238, 255, 0.4) !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #00eeff !important;
  flex-shrink: 0 !important;
}

.option-content {
  flex: 1 !important;
}

.option-title {
  color: #ffffff !important;
  font-weight: 600 !important;
  margin-bottom: 5px !important;
}

.option-description {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
}

.blockchain-toggle-container {
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 4px !important;
  padding: 12px !important;
  margin-top: 15px !important;
}

.blockchain-settings-header {
  color: #00eeff !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  margin-bottom: 10px !important;
}

.settings-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 15px !important;
}

@media (max-width: 768px) {
  .settings-row {
    grid-template-columns: 1fr !important;
  }
}

.setting-group {
  margin-bottom: 10px !important;
}

.setting-label {
  display: block !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.85rem !important;
  margin-bottom: 5px !important;
}

/* Form Actions */
.form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 20px !important;
}

.upload-btn {
  background: linear-gradient(90deg, #0088aa, #00eeff) !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  border-radius: 4px !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 1rem !important;
}

.upload-btn i {
  font-size: 1.1rem !important;
}

/* Document Modal Styling */
.modal#document-modal .modal-content {
    background: linear-gradient(135deg, rgba(20, 21, 35, 0.95) 0%, rgba(40, 41, 55, 0.95) 100%);
    border: 1px solid #00eeff;
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.5), inset 0 0 10px rgba(0, 238, 255, 0.2);
    border-radius: 5px;
    max-width: 900px;
    width: 90%;
    position: relative;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal#document-modal .modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 60px);
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #00eeff rgba(0, 238, 255, 0.1);
}

.modal#document-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal#document-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 238, 255, 0.1);
}

.modal#document-modal .modal-body::-webkit-scrollbar-thumb {
    background-color: #00eeff;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 238, 255, 0.5);
}

/* Cyberpunk Glitch Effect */
.modal#document-modal .modal-content:before {
    content: '';
    position: absolute;
    top: 0;
}

.modal#document-modal .modal-content:after {
    display: none; /* Remove animated scanline */
}

.modal#document-modal .modal-header {
    border-bottom: 1px solid rgba(0, 238, 255, 0.3);
    padding: 15px 20px;
    position: relative;
    z-index: 2;
}

.modal#document-modal .gradient-text {
    background: linear-gradient(90deg, #00eeff, #734dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    text-shadow: 0 0 5px rgba(0, 238, 255, 0.5);
}

.modal#document-modal .gradient-text:after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(0, 238, 255, 0.2);
    z-index: -1;
    /* Animation removed to reduce CPU usage */
    opacity: 0;
}

@keyframes glitchText {
    0%, 90%, 100% {
        opacity: 0;
        transform: translate(0);
    }
    92% {
        opacity: 1;
        transform: translate(2px, -2px);
    }
    94% {
        transform: translate(-2px, 2px);
    }
    96% {
        transform: translate(1px, -1px);
    }
    98% {
        transform: translate(-1px, 1px);
    }
}

/* Document List Styling */
.document-list-container {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 238, 255, 0.3);
    position: relative;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3), inset 0 0 5px rgba(0, 238, 255, 0.1);
}

.document-list-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    background: rgba(0, 238, 255, 0.1);
    padding: 10px 15px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #00eeff;
    border-bottom: 1px solid rgba(0, 238, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.document-list-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00eeff, transparent);
}

.document-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00eeff rgba(0, 238, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.document-list::-webkit-scrollbar {
    width: 6px;
}

.document-list::-webkit-scrollbar-track {
    background: rgba(0, 238, 255, 0.1);
}

.document-list::-webkit-scrollbar-thumb {
    background-color: #00eeff;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 238, 255, 0.5);
}

/* Document Item Styling */
.document-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 238, 255, 0.1);
    position: relative;
}

.document-item:hover {
    background-color: rgba(0, 238, 255, 0.05);
    /* Removed transform for performance */
    box-shadow: -3px 0 0 #00eeff;
}

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

.document-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.document-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #fff;
}

.document-title i {
    color: #00eeff;
    font-size: 1.1rem;
}

.document-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Blockchain Badge Styling */
.blockchain-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.3);
    width: fit-content;
    position: relative;
    overflow: hidden;
}

.blockchain-badge.verified {
    background: linear-gradient(90deg, rgba(0, 238, 255, 0.2), rgba(115, 77, 255, 0.2));
    border: 1px solid rgba(0, 238, 255, 0.5);
}

.blockchain-badge i {
    color: #00eeff;
}

.blockchain-badge span {
    color: rgba(255, 255, 255, 0.9);
}

/* Document Status Styling */
.document-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.status-badge.verified {
    background: rgba(0, 238, 255, 0.1);
    border: 1px solid rgba(0, 238, 255, 0.3);
    color: #00eeff;
}

.status-badge.unverified {
    background: rgba(255, 87, 51, 0.1);
    border: 1px solid rgba(255, 87, 51, 0.3);
    color: #ff5733;
}

.status-badge i {
    font-size: 0.9rem;
}

/* Document Actions Styling */
.document-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.document-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.document-btn:hover {
    color: #fff;
    background: rgba(0, 238, 255, 0.1);
}

.cyberpunk-button-small {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 238, 255, 0.3);
    padding: 5px 8px;
    border-radius: 3px;
    color: #00eeff;
    position: relative;
    overflow: hidden;
}

.cyberpunk-button-small:hover {
    background: rgba(0, 238, 255, 0.1);
    border-color: #00eeff;
    box-shadow: 0 0 8px rgba(0, 238, 255, 0.5);
}

.cyberpunk-button-small:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 238, 255, 0.4) 0%, transparent 50%);
    opacity: 0.2;
}

.cyberpunk-button-small:active {
    transform: translateY(0);
    box-shadow: 0 0 5px rgba(0, 238, 255, 0.3);
}

.view-document {
    color: #00eeff;
}

.download-document {
    color: #734dff;
}

.delete-document {
    color: #ff5733;
}

/* Blockchain Info Section */
.blockchain-info-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 238, 255, 0.2);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.blockchain-info-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%2300eeff" stroke-width="0.5" stroke-opacity="0.1"/><line x1="0" y1="0" x2="100" y2="100" stroke="%2300eeff" stroke-width="0.5" stroke-opacity="0.1"/><line x1="100" y1="0" x2="0" y2="100" stroke="%2300eeff" stroke-width="0.5" stroke-opacity="0.1"/></svg>');
    opacity: 0.1;
}

.blockchain-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #00eeff;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.blockchain-info-header i {
    font-size: 1.2rem;
}

.blockchain-info-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.verification-status {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.status-item i.verified {
    color: #00eeff;
}

.status-item i.unverified {
    color: #ff5733;
}

/* Document Upload Button */
.document-upload-button-container {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.upload-document-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(90deg, rgba(0, 238, 255, 0.1), rgba(115, 77, 255, 0.1));
    border: 1px solid #00eeff;
    color: #00eeff;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.upload-document-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.upload-document-btn:hover:before {
    left: 100%;
}

.upload-document-btn:hover {
    background: linear-gradient(90deg, rgba(0, 238, 255, 0.2), rgba(115, 77, 255, 0.2));
    box-shadow: 0 0 10px rgba(0, 238, 255, 0.5), 0 0 20px rgba(0, 238, 255, 0.3);
}

.upload-document-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 5px rgba(0, 238, 255, 0.3);
}

.upload-document-btn i {
    color: #00eeff;
    margin-right: 5px;
}

/* Storage Options Styling */
.storage-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.storage-option {
    position: relative;
}

.storage-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.storage-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.storage-label.blockchain {
    border-color: rgba(0, 238, 255, 0.3);
}

.storage-label.local {
    border-color: rgba(255, 255, 255, 0.2);
}

.storage-radio:checked + .storage-label.blockchain {
    background: rgba(0, 238, 255, 0.1);
    border-color: #00eeff;
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.3);
}

.storage-radio:checked + .storage-label.local {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.option-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.storage-label.blockchain .option-icon {
    background: rgba(0, 238, 255, 0.1);
    color: #00eeff;
    border: 1px solid rgba(0, 238, 255, 0.3);
}

.storage-label.local .option-icon {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.storage-radio:checked + .storage-label.blockchain .option-title {
    color: #00eeff;
}

.option-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Blockchain Settings */
.blockchain-settings-header {
    font-weight: bold;
    color: #00eeff;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 238, 255, 0.2);
}

.blockchain-settings-content {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 15px;
    border: 1px solid rgba(0, 238, 255, 0.2);
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.setting-input {
    width: 100%;
}

@media (max-width: 768px) {
    .settings-row {
        grid-template-columns: 1fr;
    }
}

/* Empty Document List */
.document-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.document-list-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: rgba(0, 238, 255, 0.3);
}

.document-list-empty p {
    font-size: 1.1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .document-list-header,
    .document-item {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    .document-date {
        display: none;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .blockchain-badge span {
        display: none;
    }
}

@media (max-width: 480px) {
    .document-list-header,
    .document-item {
        grid-template-columns: 1fr 80px;
    }
    
    .document-status {
        display: none;
    }
    
    .document-actions {
        flex-direction: row;
    }
}
