/**
 * Deployment Blueprint Modal - Full Screen
 * Animated console & system architecture visualization
 */

/* Modal Overlay */
.deployment-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.deployment-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Backdrop */
.deployment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

/* Modal Content Container */
.deployment-modal-content {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  max-width: 1400px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deployment-modal-overlay.open .deployment-modal-content {
  transform: scale(1);
}

/* Close Button */
.deployment-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deployment-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Grid Layout */
.deployment-modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  height: 90vh;
  max-height: 900px;
}

/* Left: Visual Section */
.deployment-visual-section {
  padding: 3rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.deployment-header {
  margin-bottom: 3rem;
}

.deployment-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.deployment-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
}

/* Deployment Flow Visualization */
.deployment-flow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.deployment-flow-line {
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, 
    rgba(99, 102, 241, 0.3) 0%, 
    rgba(99, 102, 241, 0.8) 50%, 
    rgba(99, 102, 241, 0.3) 100%);
  transform: translateX(-50%);
}

.deployment-flow-animation {
  position: absolute;
  top: 15%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #6366f1;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  transform: translateX(-50%);
  animation: flowPulse 3s ease-in-out infinite;
}

@keyframes flowPulse {
  0% { 
    top: 15%; 
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }
  10% { 
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  90% { 
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% { 
    top: 85%; 
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }
}

/* Deployment Nodes */
.deployment-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 200px;
  text-align: center;
}

.deployment-node-agent {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-color: rgba(99, 102, 241, 0.4);
  transform: scale(1.15);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.deployment-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}

.deployment-node-label {
  font-weight: 700;
  color: white;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.deployment-node-sublabel {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* Deployment Specs */
.deployment-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.deployment-spec-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.deployment-spec-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.deployment-spec-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.deployment-spec-value {
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
}

/* Right: Console Section */
.deployment-console-section {
  background: rgba(0, 0, 0, 0.4);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.deployment-console-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.deployment-console-output {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}

.console-log,
.console-log-success {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.75rem;
  animation: consoleFadeIn 0.3s ease;
}

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

.console-time {
  color: rgba(255, 255, 255, 0.4);
}

.console-text {
  color: rgba(255, 255, 255, 0.8);
}

.console-log-success .console-text {
  color: #10b981;
  font-weight: 600;
}

.console-cursor {
  display: inline-block;
  color: #10b981;
  animation: cursorBlink 1s step-end infinite;
  margin-top: 0.5rem;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* Pricing Section */
.deployment-pricing {
  padding: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.deployment-pricing-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1.5rem;
}

.deployment-pricing-title svg {
  color: rgba(255, 255, 255, 0.5);
}

.deployment-pricing-items {
  margin-bottom: 1.5rem;
}

.deployment-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.deployment-pricing-contact {
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.95rem;
}

.deployment-pricing-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.75rem 0;
}

.deployment-pricing-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  padding-top: 1rem;
}

.deployment-pricing-total .deployment-pricing-contact {
  color: #6366f1;
  font-size: 1.2rem;
}

.deployment-pricing-cta {
  display: block;
  width: 100%;
  padding: 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  text-align: center;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.deployment-pricing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Body Lock when Modal Open */
body.modal-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
  .deployment-modal-grid {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  .deployment-visual-section,
  .deployment-console-section {
    padding: 2rem;
    max-height: 50vh;
    overflow-y: auto;
  }

  .deployment-title {
    font-size: 2rem;
  }

  .deployment-flow {
    gap: 2rem;
  }

  .deployment-specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .deployment-modal-content {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .deployment-visual-section,
  .deployment-console-section {
    padding: 1.5rem;
  }

  .deployment-title {
    font-size: 1.75rem;
  }

  .deployment-node {
    min-width: 150px;
    padding: 1rem;
  }

  .deployment-modal-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Scrollbar Styling */
.deployment-visual-section::-webkit-scrollbar,
.deployment-console-output::-webkit-scrollbar {
  width: 8px;
}

.deployment-visual-section::-webkit-scrollbar-track,
.deployment-console-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.deployment-visual-section::-webkit-scrollbar-thumb,
.deployment-console-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.deployment-visual-section::-webkit-scrollbar-thumb:hover,
.deployment-console-output::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
