/* PrivateE2EEComponent.css - Styles for private message E2EE component */

.private-e2ee-component {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.private-e2ee-component.private-e2ee-connected {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.private-e2ee-component.private-e2ee-exchanging {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.private-e2ee-component.private-e2ee-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.private-e2ee-component.private-e2ee-disabled {
  background: rgba(108, 117, 125, 0.1);
  border: 1px solid rgba(108, 117, 125, 0.3);
}

.private-e2ee-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.private-e2ee-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  transition: all 0.3s ease;
}

.private-e2ee-component.private-e2ee-connected .private-e2ee-indicator {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

/* Blockchain verified styling - more prominent and secure appearance */
.private-e2ee-component.private-e2ee-connected[data-blockchain-verified="true"] {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(0, 123, 255, 0.1));
  border: 2px solid rgba(40, 167, 69, 0.4);
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.private-e2ee-component.private-e2ee-connected[data-blockchain-verified="true"] .private-e2ee-indicator {
  background: linear-gradient(135deg, #28a745, #007bff);
  color: white;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
  animation: blockchainVerifiedPulse 2s ease-in-out infinite;
}

.private-e2ee-component.private-e2ee-connected[data-blockchain-verified="true"] .private-e2ee-status-text {
  color: #28a745;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(40, 167, 69, 0.3);
}

.private-e2ee-component.private-e2ee-exchanging .private-e2ee-indicator {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.private-e2ee-component.private-e2ee-error .private-e2ee-indicator {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.private-e2ee-component.private-e2ee-disabled .private-e2ee-indicator {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.private-e2ee-status-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  transition: color 0.3s ease;
}

.private-e2ee-component.private-e2ee-connected .private-e2ee-status-text {
  color: #28a745;
}

.private-e2ee-component.private-e2ee-exchanging .private-e2ee-status-text {
  color: #ffc107;
}

.private-e2ee-component.private-e2ee-error .private-e2ee-status-text {
  color: #dc3545;
}

.private-e2ee-component.private-e2ee-disabled .private-e2ee-status-text {
  color: #6c757d;
}

/* Encryption Enable Dialog */
.private-e2ee-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999; /* Increased z-index */
  animation: fadeIn 0.3s ease;
}

.private-e2ee-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

.private-e2ee-dialog-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #eee;
}

.private-e2ee-dialog-header i {
  font-size: 1.25rem;
  color: #007bff;
}

.private-e2ee-dialog-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
}

.private-e2ee-dialog-content {
  padding: 1.5rem;
}

.private-e2ee-dialog-content p {
  margin: 0 0 1rem 0;
  color: #666;
  line-height: 1.5;
}

.private-e2ee-dialog-benefits {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.benefit-item i {
  color: #28a745;
  font-size: 0.875rem;
}

.benefit-item span {
  font-size: 0.875rem;
  color: #495057;
}

.private-e2ee-dialog-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #eee;
  justify-content: flex-end;
}

.private-e2ee-dialog-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.private-e2ee-dialog-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.private-e2ee-dialog-btn:active {
  transform: translateY(0);
}

.private-e2ee-dialog-btn-primary {
  background: #007bff;
  color: white;
}

.private-e2ee-dialog-btn-primary:hover {
  background: #0056b3;
}

.private-e2ee-dialog-btn-secondary {
  background: #6c757d;
  color: white;
}

.private-e2ee-dialog-btn-secondary:hover {
  background: #545b62;
}

/* Notifications */
.private-e2ee-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  max-width: 300px;
  animation: slideInFromRight 0.3s ease;
}

.private-e2ee-notification.private-e2ee-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.private-e2ee-notification.private-e2ee-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.private-e2ee-notification.private-e2ee-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.private-e2ee-notification.private-e2ee-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.private-e2ee-notification i {
  font-size: 0.875rem;
}

.private-e2ee-notification span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes blockchainVerifiedPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
  }
  50% {
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.8), 0 0 20px rgba(0, 123, 255, 0.3);
  }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .private-e2ee-dialog {
    margin: 1rem;
    max-width: none;
    width: calc(100vw - 2rem);
  }

  .private-e2ee-dialog-actions {
    flex-direction: column;
  }

  .private-e2ee-dialog-btn {
    width: 100%;
    justify-content: center;
  }

  .private-e2ee-notification {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  .private-e2ee-dialog {
    background: #2d3748;
    color: #e2e8f0;
  }

  .private-e2ee-dialog-header {
    border-bottom-color: #4a5568;
  }

  .private-e2ee-dialog-actions {
    border-top-color: #4a5568;
  }

  .benefit-item {
    background: #4a5568;
  }

  .benefit-item span {
    color: #e2e8f0;
  }
}
