/* ========================================
   GLOBAL STYLES & RESET
   ======================================== */

* {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

html {
  touch-action: manipulation;
  scroll-behavior: smooth;
}

/* ========================================
   ANGULAR ANIMATIONS
   ======================================== */

.ng-enter,
.ng-leave {
  transition: all 0.3s ease-in-out;
}

.ng-enter {
  opacity: 0;
  transform: translateY(10px);
}

.ng-enter-active {
  opacity: 1;
  transform: translateY(0);
}

.ng-leave {
  opacity: 1;
  transform: translateY(0);
}

.ng-leave-active {
  opacity: 0;
  transform: translateY(-10px);
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slideUp {
  animation: slideUp 0.3s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.3s ease-out;
}

/* ========================================
   MEDICAL BACKGROUND PATTERN
   ======================================== */

#bg-pattern {
  background-image: 
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="130" height="130" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="110" height="110" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path d="M18 2l4 4-6 6-4-4 6-6z M19 9l-3 3-4-4 3-3 4 4z M8 20.3c-.8.8-2 1-3.4 0-1-1-1-2.5 0-3.4L15 5.9l4 4L8 20.3z"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="125" height="125" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="145" height="145" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path d="M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-6-6 19.79 19.79 0 01-3.07-8.67A2 2 0 014.11 2h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 16.92z"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="135" height="135" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="155" height="155" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2"><path d="M19 21l-7-5-7 5V5a2 2 0 012-2h10a2 2 0 012 2z"/></svg>');
  background-size: 120px 120px, 140px 140px, 130px 130px, 150px 150px, 110px 110px, 160px 160px, 125px 125px, 145px 145px, 135px 135px, 155px 155px;
  background-position: 0 0, 200px 100px, 400px 50px, 100px 300px, 500px 200px, 300px 400px, 600px 150px, 50px 450px, 450px 350px, 250px 250px;
  background-repeat: repeat;
}

/* ========================================
   UTILITIES & HELPER CLASSES
   ======================================== */

.hidden {
  display: none !important;
}

.translate-y-full {
  transform: translateY(100%);
}

.translate-y-0 {
  transform: translateY(0);
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

#scroll-to-top {
  left: 2rem !important;
  right: auto !important;
  transition: all 0.3s ease;
}

#scroll-to-top:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  #scroll-to-top {
    left: 1rem !important;
    bottom: 1rem;
  }
}

/* ========================================
   FORM STYLES
   ======================================== */

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

input[type="tel"] {
  font-family: 'Courier New', monospace;
}

/* Custom file input styling */
input[type="file"] {
  padding: 0.75rem 1rem;
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

input[type="file"]:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

/* Azerbaijani form styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #1f2937;
  background: white;
  transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   MODAL STYLES
   ======================================== */

#modal {
  backdrop-filter: blur(4px);
}

/* ========================================
   COOKIE NOTICE
   ======================================== */

#cookie-notice.show {
  transform: translateY(0);
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */

button,
a {
  transition: all 0.3s ease;
}

/* ========================================
   REVIEWS CARDS
   ======================================== */

.review-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

/* ========================================
   LANGUAGE BUTTONS
   ======================================== */

.lang-btn-active {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.lang-btn-inactive {
  background-color: #e5e7eb;
  color: #374151;
}

.lang-btn-inactive:hover {
  background-color: #d1d5db;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  #bg-pattern {
    background-size: 60px 60px, 80px 80px, 70px 70px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  header,
  footer,
  #scroll-to-top,
  #cookie-notice,
  #modal {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  #bg-pattern {
    display: none !important;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ========================================
   STAR RATING
   ======================================== */

.star {
  color: #facc15;
  fill: #facc15;
}

/* ========================================
   GRADIENT BACKGROUNDS
   ======================================== */

.gradient-blue {
  background: linear-gradient(to right, #3b82f6, #4f46e5);
}

.gradient-purple {
  background: linear-gradient(to right, #9333ea, #db2777);
}

.gradient-green {
  background: linear-gradient(to bottom right, #f0fdf4, #ecfdf5);
}

.gradient-amber {
  background: linear-gradient(to right, #fffbeb, #fff7ed);
}

/* ========================================
   SHADOW EFFECTS
   ======================================== */

.shadow-soft {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ========================================
   TEXT SELECTION
   ======================================== */

::selection {
  background-color: #3b82f6;
  color: white;
}

::-moz-selection {
  background-color: #3b82f6;
  color: white;
}

/* ========================================
   CHAT WIDGET STYLES
   ======================================== */

#chat-widget {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
}

#chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  animation: chatButtonFloat 3s ease-in-out infinite;
}

@keyframes chatButtonFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#chat-button:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6);
}

#chat-button:active {
  transform: scale(0.95);
}

#chat-button .online-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
}

@keyframes pulse {
  0% { 
    opacity: 1; 
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% { 
    opacity: 0.7; 
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% { 
    opacity: 1; 
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

#chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 550px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: chatWindowSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes chatWindowSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#chat-window.open {
  display: flex;
}

#chat-header {
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  color: white;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#chat-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Doctor Status Indicator */
.doctor-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s;
  cursor: help;
}

.doctor-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-green 2s infinite;
}

.doctor-status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

#chat-header h3::before {
  font-size: 1.25rem;
}

#chat-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

#chat-messages-area {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
  scroll-behavior: smooth;
}

.chat-message {
  margin-bottom: 1rem;
  display: flex;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message-content {
  max-width: 75%;
  padding: 0.875rem 1.125rem;
  border-radius: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: transform 0.2s;
}

.chat-message-content:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.chat-message.user .chat-message-content {
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  color: white;
  border-bottom-right-radius: 0.375rem;
}

.chat-message.doctor .chat-message-content {
  background: white;
  color: #1f2937;
  border-bottom-left-radius: 0.375rem;
  border: 1px solid #e5e7eb;
}

#chat-input-form {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.625rem;
  background: white;
}

#chat-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  outline: none;
  transition: all 0.2s;
  background: white !important;
  color: #1f2937 !important;
  font-family: 'Inter', sans-serif;
}

#chat-input:focus {
  border-color: #3b82f6;
  background: white !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#chat-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* Ensure input text is always visible */
#chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#chat-send {
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 0.875rem 0.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

#chat-send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#chat-send:active:not(:disabled) {
  transform: translateY(0);
}

#chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#chat-name-prompt {
  padding: 2rem 1.5rem;
  text-align: center;
}

#chat-name-prompt h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

#chat-name-prompt p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

#chat-name-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  outline: none;
  transition: all 0.2s;
}

#chat-name-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#chat-name-submit {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

#chat-name-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#chat-name-submit:active {
  transform: translateY(0);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  #chat-widget {
    right: 1rem;
    bottom: 1rem;
  }
  
  #chat-window {
    width: calc(100vw - 2rem);
    max-width: 400px;
    height: calc(100vh - 150px);
    max-height: 600px;
    right: 0;
  }
  
  #chat-button {
    width: 56px;
    height: 56px;
  }
}

/* Icon Stethoscope */
.icon-stethoscope {
  width: 2rem;
  height: 2rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%233b82f6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.8 2.3A.3.3 0 1 0 5 2H4a2 2 0 0 0-2 2v5a6 6 0 0 0 6 6v0a6 6 0 0 0 6-6V4a2 2 0 0 0-2-2h-1a.2.2 0 1 0 .3.3"/><path d="M8 15v1a6 6 0 0 0 6 6v0a6 6 0 0 0 6-6v-4"/><circle cx="20" cy="10" r="2"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
}

@media (min-width: 768px) {
  .icon-stethoscope {
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* ========================================
   BLOG STYLES
   ======================================== */

/* Blog card hover effect */
#blog-container a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#blog-container a:hover {
  transform: translateY(-4px);
}

/* Circular view counter */
#blog-container .w-10 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


