/* AuthHub Authentication Styles for DX NetOps Sizer */

/* Authentication Status in Header */
.auth-status {
  float: right;
  margin-top: 10px;
  margin-right: 20px;
}

.auth-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-user-name {
  color: black;
  font-size: 14px;
  font-weight: 500;
}

.auth-logout-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.auth-logout-btn:hover {
  background-color: #c82333;
}

/* Authentication Loading Spinner */
.auth-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-spinner-overlay {
  background-color: rgba(0, 0, 0, 0.7);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-spinner-content {
  background-color: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 200px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0066cc;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.auth-spinner-content p {
  margin: 0;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

/* Authentication Error Display */
.auth-error {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
}

.auth-error-content {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.auth-error-message {
  flex: 1;
  font-size: 14px;
}

.auth-retry-btn {
  background-color: #721c24;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.auth-retry-btn:hover {
  background-color: #5a161d;
}

/* Development Mode Indicator */
.dev-mode-indicator {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background-color: #ffc107;
  color: #856404;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #ffeaa7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-status {
    float: none;
    margin: 10px 0;
    text-align: center;
  }

  .auth-user-info {
    justify-content: center;
    margin: 0 10px;
  }

  .auth-error {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .auth-spinner-content {
    margin: 20px;
    padding: 30px;
  }
}

/* Integration with existing header styles */
#header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

#header .productTitle {
  flex: 1;
}

/* Ensure authentication elements don't interfere with existing layout */
@media print {
  .auth-status,
  .auth-error,
  .dev-mode-indicator,
  .auth-spinner {
    display: none !important;
  }
}
