/* 
 * MAAZDIACARE.COM - Unified Premium Healthcare Styling System
 * Author: Antigravity AI
 * Copyright: maazdiacare / Designed By ❤️ Dextigo Technology Private Limited
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Poppins:wght@600;700&family=Plus+Jakarta+Sans:wght@600&display=swap');

/* ==========================================
   1. DESIGN TOKENS & VARIABLES
   ========================================== */
:root {
  /* Brand Palette */
  --primary-green: #1b5e3f;
  --dark-green: #0d3420;
  --gold: #f59e0b;
  --light-gold: #fef3c7;
  --soft-green: #F6FBF8;
  --bg-white: #FFFFFF;
  --light-gray: #f3f4f6;
  --border-color: #E8ECEF;
  --text-dark: #1f2937;
  --text-muted: #666666;
  
  /* Status Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;

  /* Typography */
  --font-headings: 'Poppins', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-accent: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Elevation (Soft Shadows) */
  --shadow-sm: 0 2px 8px rgba(15, 93, 70, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 93, 70, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 93, 70, 0.1);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-gold: 0 8px 24px rgba(200, 162, 78, 0.15);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* ==========================================
   2. RESET & GLOBAL SETUP
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--light-gray);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--dark-green);
}

/* Base Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--dark-green);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--gold);
}

/* Selection Highlight */
::selection {
  background-color: var(--light-gold);
  color: var(--dark-green);
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 236, 239, 0.6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Premium Buttons */
.btn-premium {
  font-family: var(--font-headings);
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-back);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  z-index: -1;
  transition: opacity var(--transition-fast);
}

.btn-premium-primary {
  color: var(--bg-white);
  box-shadow: var(--shadow-md);
}

.btn-premium-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 93, 70, 0.2);
  color: var(--bg-white);
}

.btn-premium-secondary {
  background: transparent;
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
}

.btn-premium-secondary::before {
  opacity: 0;
}

.btn-premium-secondary:hover {
  background: var(--primary-green);
  color: var(--bg-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-premium-secondary:hover::before {
  opacity: 1;
}

.btn-premium-gold {
  background: var(--gold);
  color: var(--bg-white);
  box-shadow: var(--shadow-gold);
}

.btn-premium-gold::before {
  background: linear-gradient(135deg, var(--gold), #b38b39);
}

.btn-premium-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(200, 162, 78, 0.3);
  color: var(--bg-white);
}

/* Animations & Micro-interactions */
.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--soft-green);
  color: var(--primary-green);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(15, 93, 70, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: inherit;
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0; }
}

.animate-float {
  animation: float-y 5s ease-in-out infinite alternate;
}

.animate-float-delayed {
  animation: float-y 6s ease-in-out infinite alternate-reverse;
  animation-delay: 1.5s;
}

@keyframes float-y {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-15px); }
}

.hover-zoom-img {
  overflow: hidden;
}

.hover-zoom-img img {
  transition: transform var(--transition-slow);
}

.hover-zoom-img:hover img {
  transform: scale(1.08);
}

.hover-lift {
  transition: transform 0.4s var(--ease-out-back), box-shadow 0.4s var(--ease-out-back);
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Custom Cursor */
.custom-cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-green);
  position: fixed;
  border-radius: 50%;
  z-index: 10000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  display: none;
}

.custom-cursor-outline {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold);
  position: fixed;
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s, height 0.3s, border-color 0.3s;
  display: none;
}

body.cursor-active .custom-cursor-dot,
body.cursor-active .custom-cursor-outline {
  display: block;
}

/* Preloader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-white);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--soft-green);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Dextigo link hover-glow requirements */
a.dextigo-link {
  transition: all 0.3s ease;
}
a.dextigo-link:hover {
  text-decoration: underline !important;
  filter: brightness(1.2);
  text-shadow: 0 0 8px rgba(245,158,11,0.5);
}

/* Slide-up Transition for Sticky Header Top Utility Bar */
#topBar {
  transition: all 0.3s ease-in-out;
  max-height: 40px;
  overflow: hidden;
}
#topBar.hidden-topbar {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  opacity: 0;
}

/* ==========================================
   8. AI HEALTH CHATBOT LAYOUTS & ANIMATIONS
   ========================================== */
#aiChatbot.active {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.chat-message {
  display: flex;
  margin-bottom: 0.75rem;
  width: 100%;
}

.chat-message-bot {
  justify-content: flex-start;
}

.chat-message-user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.65rem 1rem;
  border-radius: 16px;
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.chat-message-bot .chat-bubble {
  background-color: var(--light-gray);
  color: var(--text-dark);
  border-top-left-radius: 4px;
}

.chat-message-user .chat-bubble {
  background-color: var(--primary-green);
  color: var(--bg-white);
  border-top-right-radius: 4px;
}

/* Typing Indicator */
.dot-bounce {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
  animation: dot-bounce 1.4s infinite ease-in-out both;
}

.dot-bounce.delay-1 {
  animation-delay: 0.2s;
}

.dot-bounce.delay-2 {
  animation-delay: 0.4s;
}

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Suggestion Chips styling */
.chat-suggested-chips::-webkit-scrollbar {
  display: none;
}
.chat-suggested-chips {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* AI Chatbot Active Toggle state overrides */
#aiChatbot.active {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ==========================================
   9. WEBCAM CAPTURE, OTP & UPLOAD PREVIEWS
   ========================================== */
.webcam-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--primary-green);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 4/3;
  margin-top: 8px;
}
.webcam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.webcam-controls {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}
.webcam-btn {
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.webcam-btn-capture {
  background: var(--gold);
  color: #fff;
}
.webcam-btn-capture:hover {
  background: #d97706;
}
.webcam-btn-close {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.webcam-btn-close:hover {
  background: rgba(0, 0, 0, 0.8);
}
.preview-thumbnail {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--light-gray);
  box-shadow: var(--shadow-sm);
}
.preview-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-thumbnail-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--text-dark);
  font-weight: bold;
}
.preview-thumbnail-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--color-danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.preview-thumbnail-delete:hover {
  transform: scale(1.1);
  background: #dc2626;
}
.upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.btn-upload-choice {
  font-size: 10px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px dashed var(--border-color);
}
.btn-upload-choice:hover {
  background: var(--soft-green);
  border-color: var(--primary-green);
}
.otp-feedback {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.otp-feedback-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}
.otp-feedback-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

/* Webcam/Live Camera Overlay Styling */
.webcam-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  margin-bottom: 10px;
}
.webcam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
