/* Demo Progress Footer */

.demo-progress-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed, 1030);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.9) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  transition: all 0.3s ease;
}

.demo-footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Status */
.demo-footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  min-width: 160px;
}

.demo-footer-status i {
  font-size: 16px;
}

.demo-footer-success {
  color: var(--color-success, #28a745);
}

.demo-footer-error {
  color: var(--color-danger, #dc3545);
}

.demo-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Progress Bar */
.demo-footer-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.demo-footer-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}

.demo-footer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary, #4a9eff) 0%, var(--color-success, #28a745) 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.demo-footer-percentage {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary, #4a9eff);
  min-width: 35px;
  text-align: right;
}

/* Phases */
.demo-footer-phases {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.demo-footer-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: default;
}

a.demo-footer-phase {
  cursor: pointer;
}

a.demo-footer-phase:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.demo-footer-phase-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.3s ease;
}

.demo-footer-phase-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pending State */
.demo-footer-phase-pending .demo-footer-phase-icon {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
}

.demo-footer-phase-pending .demo-footer-phase-label {
  color: rgba(255, 255, 255, 0.4);
}

/* Active State */
.demo-footer-phase-active .demo-footer-phase-icon {
  background: var(--color-primary, #4a9eff);
  color: #fff;
  box-shadow: 0 0 12px rgba(74, 158, 255, 0.5);
}

.demo-footer-phase-active .demo-footer-phase-label {
  color: var(--color-primary, #4a9eff);
}

.demo-phase-spinning {
  animation: spin 2s linear infinite;
}

/* Completed State */
.demo-footer-phase-completed .demo-footer-phase-icon {
  background: var(--color-success, #28a745);
  color: #fff;
}

.demo-footer-phase-completed .demo-footer-phase-label {
  color: var(--color-success, #28a745);
}

a.demo-footer-phase-completed:hover .demo-footer-phase-icon {
  box-shadow: 0 0 12px rgba(40, 167, 69, 0.5);
}

/* Failed State */
.demo-footer-phase-failed .demo-footer-phase-icon {
  background: var(--color-danger, #dc3545);
  color: #fff;
}

.demo-footer-phase-failed .demo-footer-phase-label {
  color: var(--color-danger, #dc3545);
}

/* Action Buttons */
.demo-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.demo-footer-actions .btn {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.demo-footer-actions form {
  margin: 0;
}

/* Completed Footer State */
.demo-footer-completed {
  background: linear-gradient(to top, rgba(40, 167, 69, 0.2) 0%, rgba(0, 0, 0, 0.9) 100%);
  border-top-color: rgba(40, 167, 69, 0.3);
}

/* Failed Footer State */
.demo-footer-failed {
  background: linear-gradient(to top, rgba(220, 53, 69, 0.2) 0%, rgba(0, 0, 0, 0.9) 100%);
  border-top-color: rgba(220, 53, 69, 0.3);
}

/* Adjust main content to account for footer */
body:has(.demo-progress-footer) main {
  padding-bottom: 80px;
}

/* Responsive */
@media (max-width: 992px) {
  .demo-footer-content {
    flex-wrap: wrap;
    gap: 12px;
  }

  .demo-footer-status {
    min-width: auto;
  }

  .demo-footer-progress {
    order: 3;
    width: 100%;
  }

  .demo-footer-phases {
    order: 2;
    flex: auto;
    gap: 2px;
  }

  .demo-footer-phase {
    padding: 4px 6px;
  }

  .demo-footer-phase-label {
    display: none;
  }

  .demo-footer-actions {
    order: 1;
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  .demo-progress-footer {
    padding: 10px 12px;
  }

  .demo-footer-phase-icon {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
}
