/**
 * CTA Guide System - Styles
 * Non-intrusive guide overlay and tooltip styles
 */

/* Guide Overlay */
.cta-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(78, 201, 255, 0.22) 0, transparent 44%),
    radial-gradient(circle at 92% 8%, rgba(132, 242, 191, 0.16) 0, transparent 32%),
    linear-gradient(180deg, rgba(4, 8, 22, 0.84) 0%, rgba(7, 14, 36, 0.88) 45%, rgba(4, 8, 22, 0.84) 100%);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.cta-guide-overlay.fade-out {
  opacity: 0;
}

/* Tooltip Container */
.cta-guide-tooltip {
  position: fixed;
  background: linear-gradient(165deg, rgba(9, 18, 44, 0.98), rgba(6, 14, 34, 0.98));
  border-radius: 12px;
  border: 1px solid #263f76;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  max-width: 380px;
  min-width: 280px;
  animation: slideIn 0.3s ease;
}

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

/* Tooltip Header */
.cta-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid #263f76;
}

.cta-guide-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  flex: 1;
}

.cta-guide-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #a7b8de;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cta-guide-close:hover {
  background: rgba(17, 31, 67, 0.75);
  color: #4ec9ff;
}

/* Tooltip Body */
.cta-guide-body {
  padding: 12px 20px;
}

.cta-guide-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #d7e3ff;
}

/* Tooltip Footer */
.cta-guide-footer {
  padding: 16px 20px;
  border-top: 1px solid #263f76;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-guide-progress {
  font-size: 12px;
  color: #a7b8de;
  text-align: center;
}

.cta-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Buttons */
.cta-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cta-btn-primary {
  color: #06142f;
  background: linear-gradient(135deg, #4ec9ff, #7ed3ff);
  box-shadow: 0 8px 26px rgba(78, 201, 255, 0.35);
}

.cta-btn-primary:hover {
  background: linear-gradient(135deg, #55cffd, #89d9ff);
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(78, 201, 255, 0.48);
}

.cta-btn-secondary {
  color: #d7e3ff;
  border: 1px solid #31569b;
  background: rgba(17, 31, 67, 0.7);
}

.cta-btn-secondary:hover {
  background: rgba(28, 49, 96, 0.9);
  color: #ffffff;
}

.cta-btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* Button as Link */
.cta-guide-actions a.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Highlight Element */
.cta-guide-highlight {
  position: relative;
  z-index: 10000;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), 
              inset 0 0 0 1px rgba(37, 99, 235, 0.3) !important;
  border-radius: 4px;
}

/* Position Variants */
.cta-position-center {
  position: fixed;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999;
}

.cta-position-top {
  transform: translateX(-50%);
}

.cta-position-bottom {
  transform: translateX(-50%);
}

.cta-position-left {
  transform: translateY(-50%);
}

.cta-position-right {
  transform: translateY(-50%);
}

/* Completion Message */
.cta-guide-message {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(165deg, rgba(9, 18, 44, 0.98), rgba(6, 14, 34, 0.98));
  border: 1px solid #263f76;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  animation: slideInUp 0.3s ease;
  font-size: 13px;
}

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

.cta-guide-success {
  border-left: 4px solid #84f2bf;
  color: #dfffee;
}

.cta-guide-success span {
  font-weight: 500;
}

/* Restart Button */
.cta-guide-restart-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  border: none;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.cta-guide-restart-btn:hover {
  background: #1d4ed8;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.cta-guide-restart-btn:active {
  transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 640px) {
  .cta-guide-tooltip {
    max-width: calc(100vw - 32px);
    min-width: auto;
  }

  .cta-guide-actions {
    flex-direction: column;
  }

  .cta-btn {
    width: 100%;
    text-align: center;
  }

  .cta-guide-message {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    text-align: center;
  }

  .cta-guide-restart-btn {
    bottom: 16px;
    right: 16px;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .cta-guide-tooltip {
    background: linear-gradient(165deg, rgba(9, 18, 44, 0.98), rgba(6, 14, 34, 0.98));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }

  .cta-guide-header {
    border-bottom-color: #263f76;
  }

  .cta-guide-header h3 {
    color: #ffffff;
  }

  .cta-guide-close {
    color: #a7b8de;
  }

  .cta-guide-close:hover {
    background: rgba(17, 31, 67, 0.75);
    color: #4ec9ff;
  }

  .cta-guide-body p {
    color: #d7e3ff;
  }

  .cta-guide-footer {
    border-top-color: #263f76;
  }

  .cta-guide-progress {
    color: #a7b8de;
  }

  .cta-btn-secondary {
    color: #d7e3ff;
    border: 1px solid #31569b;
    background: rgba(17, 31, 67, 0.7);
  }

  .cta-btn-secondary:hover {
    background: rgba(28, 49, 96, 0.9);
    color: #ffffff;
  }

  .cta-guide-message {
    background: linear-gradient(165deg, rgba(9, 18, 44, 0.98), rgba(6, 14, 34, 0.98));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    color: #d7e3ff;
  }

  .cta-guide-success {
    border-left-color: #84f2bf;
    color: #dfffee;
  }
}
