/* Backend Unavailable Styles */

.backend-unavailable {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.backend-unavailable::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 10;
}

.backend-unavailable::before {
  content: '⚠️ Service Unavailable';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f59e0b;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 11;
  white-space: nowrap;
}

/* Form specific styles */
.backend-unavailable form {
  position: relative;
}

.backend-unavailable input,
.backend-unavailable button,
.backend-unavailable select,
.backend-unavailable textarea {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
}

/* Notification styles for backend status */
.backend-status-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.backend-status-notification.success {
  background-color: #d1fae5;
  border-left: 4px solid #10b981;
  color: #065f46;
}

.backend-status-notification.warning {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.backend-status-notification.error {
  background-color: #fee2e2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.backend-status-notification .title {
  font-weight: 600;
  margin-bottom: 5px;
}

.backend-status-notification .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
}

.backend-status-notification .close-btn:hover {
  opacity: 1;
}

/* Loading indicator for backend checks */
.backend-checking {
  position: relative;
}

.backend-checking::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translateY(-50%);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .backend-status-notification {
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .backend-unavailable::before {
    font-size: 10px;
    padding: 2px 6px;
  }
}
