/*
 * ==========================================================================
 * QForm - Components Stylesheet
 * ==========================================================================
 * 
 * UI Component overrides for Radzen and MudBlazor.
 * Sections:
 *   1. Radzen Component Overrides
 *   2. MudBlazor Component Overrides
 *   3. Form Components
 *   4. Questionnaire Components
 * ==========================================================================
 */

/* ==========================================================================
   1. RADZEN COMPONENT OVERRIDES
   ========================================================================== */

/* Body */
.rz-body {
  min-height: 100vh;
  background-color: transparent;
  border: none;
}

/* Cards */
.rz-card,
.mud-paper {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur-strength));
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.rz-card:hover {
  box-shadow: 0 20px 50px -15px rgba(29, 48, 125, 0.2);
}

body.rz-appearance-dark .rz-card:hover {
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
}

.rz-card {
  background: var(--surface);
}

/* Buttons */
.rz-button,
.mud-button {
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rz-button:hover,
.rz-button:focus,
.mud-button:hover,
.mud-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -15px rgba(29, 48, 125, 0.45);
}

/* Header, Sidebar, Body borders */
.rz-header,
.rz-sidebar,
.rz-body {
  border: none;
}

/* Panel Menu */
.rz-panel-menu .rz-panel-menu-item {
  border-radius: var(--border-radius-md);
}

/* Data Grid */
.rz-grid .rz-grid-table {
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.rz-datagrid-header {
  background: rgba(75, 126, 236, 0.06);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Text Components */
.rz-text,
.rz-typography,
.rz-link {
  color: var(--text-primary);
}

.rz-text-muted {
  color: var(--text-secondary) !important;
}

/* Alerts */
.rz-alert {
  color: var(--text-primary);
}

/* ==========================================================================
   2. FORM COMPONENTS
   ========================================================================== */

.rz-textbox,
.rz-dropdown,
.rz-numeric,
.rz-password,
.rz-mask {
  border-radius: var(--border-radius-md);
  border-color: rgba(82, 104, 192, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rz-textbox:focus,
.rz-dropdown:focus,
.rz-numeric:focus,
.rz-password:focus,
.rz-mask:focus {
  border-color: rgba(75, 126, 236, 0.8);
  box-shadow: 0 0 0 3px rgba(75, 126, 236, 0.15);
}

.mud-input-root {
  border-radius: var(--border-radius-md);
}

/* ==========================================================================
   3. MUDBLAZOR OVERRIDES
   ========================================================================== */

.mud-paper.login-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 247, 255, 0.88) 100%);
}

body.rz-appearance-dark .mud-paper.login-card {
  background: linear-gradient(165deg, rgba(18, 24, 40, 0.94) 0%, rgba(12, 16, 28, 0.94) 100%);
  box-shadow: 0 28px 60px -35px rgba(7, 12, 40, 0.9);
}

.mud-snackbar-container .mud-alert {
  border-radius: var(--border-radius-md);
}

/* ==========================================================================
   4. QUESTIONNAIRE COMPONENTS
   ========================================================================== */

.qf-container {
  max-width: 820px;
  margin: 0 auto;
}

.qf-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--qf-border-color);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.qf-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qf-badge {
  display: inline-block;
  min-width: 34px;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 22px;
  text-align: center;
}

body.rz-appearance-dark .qf-badge {
  background: #312e81;
  color: #e0e7ff;
}

.qf-question-title {
  color: var(--qf-text-color);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 600;
}

.qf-progress-text {
  color: var(--qf-muted-color);
  font-size: 0.95rem;
}

.qf-options {
  display: grid;
  gap: 10px;
}

.qf-radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--qf-border-color);
  border-radius: 8px;
  background: var(--qf-surface);
}

.qf-radio-item input[type="radio"] {
  width: 16px;
  height: 16px;
}

.qf-radio-label {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #111827;
}

body.rz-appearance-dark .qf-radio-label {
  color: #e5e7eb;
}

.qf-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.qf-progress {
  margin-top: 12px;
}

/* ==========================================================================
   5. GLASS CARD EFFECT
   ========================================================================== */

.glass-card {
  transform: translateY(0);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.15);
}

body.rz-appearance-dark .glass-card:hover {
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   6. UTILITY ANIMATIONS
   ========================================================================== */

.fade-in {
  animation: fadeIn 0.45s ease-out both;
}

.slide-in-left {
  animation: slideInLeft 0.4s ease-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.6;
  }
}

@keyframes float-badge {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
