/* Match app-page-bg tint (emerald/teal shell) — must not override index.html / index.css with flat gray */
:root {
  --background-light: #ecfdf5;
  --background-dark: #022c22;
  --primary-500: #4f46e5;
  --primary-600: #4338ca;
}
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-light);
}
.dark body {
    background-color: var(--background-dark);
}
 /* QR Code Print Styles */
 @media print {
   @page {
     margin: 0.25in 0.5in 0.5in 0.5in; /* top right bottom left - smaller top margin */
     /* Remove default print headers and footers */
     @top-left { content: ""; }
     @top-center { content: ""; }
     @top-right { content: ""; }
     @bottom-left { content: ""; }
     @bottom-center { content: ""; }
     @bottom-right { content: ""; }
     marks: none;
   }
   
   body {
     -webkit-print-color-adjust: exact !important;
     print-color-adjust: exact !important;
     margin: 0;
     padding: 0;
     background: white !important;
   }
  
  /* Ensure root and all containers have white background */
  #root,
  #root > div {
    background: white !important;
  }
  .print-hide {
    display: none !important;
  }

  /* HIDE EVERYTHING EXCEPT THE INTENDED PRINT AREA (for QR codes only) */
  /* Only apply this rule when QR print wrappers are present */
  body > #root > div:has(.print-only-wrapper) > *:not(.print-only-wrapper) {
    display: none !important;
  }
  
  body > #root > div:has(.print-sheet-wrapper) > *:not(.print-sheet-wrapper) {
    display: none !important;
  }
  
  /* Home History Report Print Styles */
  
  /* Hide navigation and buttons when printing */
  .print-hide,
  #full-home-history-report .print-hide,
  #full-home-history-report button.print-hide,
  #full-home-history-report [class*="print-hide"] {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Hide edit buttons in section headers (Ownership & Sales History, Tax Assessment) */
  #full-home-history-report div[class*="flex"][class*="items-center"][class*="justify-between"] button[class*="bg-emerald-500"],
  #full-home-history-report div[class*="flex"][class*="items-center"][class*="justify-between"] > button {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Hide the main navigation header when printing */
  header.sticky,
  header[class*="sticky"] {
    display: none !important;
  }
  
  /* Hide all outer containers and only show the report */
  body > #root > div.min-h-screen {
    display: contents !important;
  }
  
  body > #root > div > main {
    display: contents !important;
  }
  
  body > #root > div > main > div.max-w-5xl {
    display: contents !important;
  }
  
  /* Hide the button container */
  body > #root > div > main > div > div.mb-8 {
    display: none !important;
  }
  
  /* Make the report the only visible element */
  #full-home-history-report {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    page-break-before: avoid !important;
    display: block !important;
  }
  
  /* Force light mode for print - override dark mode classes */
  #full-home-history-report,
  #full-home-history-report * {
    color: inherit !important;
  }
  
  /* Force white backgrounds and light text colors - override dark mode */
  #full-home-history-report [class*="dark:bg-slate"],
  #full-home-history-report [class*="dark:bg-gray"],
  #full-home-history-report [class*="bg-slate-800"],
  #full-home-history-report [class*="bg-slate-900"],
  #full-home-history-report [class*="dark:text-slate"] {
    background-color: white !important;
    color: #1e293b !important; /* slate-800 */
  }
  
  /* Override dark mode text colors */
  #full-home-history-report [class*="dark:text-slate-100"],
  #full-home-history-report [class*="dark:text-slate-200"],
  #full-home-history-report [class*="dark:text-slate-300"] {
    color: #1e293b !important; /* slate-800 */
  }
  
  #full-home-history-report [class*="dark:text-slate-400"],
  #full-home-history-report [class*="dark:text-slate-500"],
  #full-home-history-report [class*="dark:text-slate-600"] {
    color: #475569 !important; /* slate-600 */
  }
  
  #full-home-history-report [class*="dark:text-slate-700"] {
    color: #334155 !important; /* slate-700 */
  }
  
  /* Ensure header gradient stays visible but force light mode text */
  #full-home-history-report > header {
    background: linear-gradient(to bottom right, #10b981, #14b8a6, #06b6d4) !important;
    color: white !important;
  }
  
  /* Force light mode for right panel - keep gradient but ensure text is visible */
  #full-home-history-report > div.grid > div[class*="from-teal-600"],
  #full-home-history-report > div.grid > div[class*="bg-gradient-to-br"] {
    background: linear-gradient(to bottom right, #0d9488, #10b981, #0d9488) !important;
    color: white !important;
  }
  
  /* Override any dark mode border colors */
  #full-home-history-report [class*="dark:border-slate"] {
    border-color: #e2e8f0 !important; /* slate-200 */
  }
  
  /* Remove any auto margins from containers */
  body > #root > div > main > div.mx-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Fix blank first page - ensure no space before report */
  body > #root > div > main > div > #full-home-history-report {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    page-break-before: avoid !important;
  }
  
  /* Ensure report header starts at the very top */
  #full-home-history-report > header {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Prevent page break before any element that might cause blank page */
  body > #root > div > main > div > *:not(#full-home-history-report) {
    page-break-after: avoid !important;
  }
  
  /* Ensure report is the first printable content */
  body > #root > div > main > div > #full-home-history-report {
    position: relative !important;
  }
  
  /* Remove any backgrounds from containers that might show through */
  body > #root > div[class*="bg-gray"],
  body > #root > div[class*="bg-slate"],
  body > #root > div > main[class*="bg"],
  body > #root > div > main > div[class*="bg"] {
    background: transparent !important;
  }
  
  /* Preserve colors and backgrounds for print, but remove unwanted gradients */
  #full-home-history-report,
  #full-home-history-report * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  /* Remove gradient backgrounds from property images section */
  #full-home-history-report [class*="bg-gradient-to-b"][class*="from-slate-50"] {
    background: white !important;
  }
  
  /* Remove any slate/gray backgrounds that aren't part of the design */
  #full-home-history-report [class*="bg-slate-50"],
  #full-home-history-report [class*="bg-gray"] {
    background: white !important;
  }
  
  /* Keep the header gradient and right panel gradient, but remove others */
  /* Only remove gradients that are not part of the main design */
  
  /* Ensure images print properly and fit frame exactly */
  #full-home-history-report img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    page-break-inside: avoid;
  }
  
  /* Ensure image containers maintain aspect ratio in print */
  #full-home-history-report [style*="aspectRatio"] {
    aspect-ratio: 4/3 !important;
  }
  
  /* Ensure image containers and frames maintain exact dimensions */
  #full-home-history-report [class*="w-full"][class*="h-full"] {
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Ensure object-cover works in print to fill frame */
  #full-home-history-report [class*="object-cover"] {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Force two-column grid layout for print */
  /* Tailwind's md: breakpoint doesn't work in print media, so we need to force it */
  #full-home-history-report .grid {
    display: grid !important;
  }
  
  /* Target the split layout section - it's the first grid after header */
  /* This selector targets any grid element that is a direct child */
  #full-home-history-report > div.grid,
  #full-home-history-report > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  
  /* Also catch grids with md:grid-cols-2 class using attribute selector */
  #full-home-history-report [class*="md:grid-cols-2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  
  /* Ensure 3-column grid for images stays 3 columns */
  #full-home-history-report .grid.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  
  /* Ensure 4-column grid for property images */
  #full-home-history-report .grid[class*="grid-cols-4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  
  /* Ensure flex layouts work */
  #full-home-history-report .flex {
    display: flex !important;
  }
  
  /* Print-friendly page breaks - avoid breaking key sections */
  #full-home-history-report header {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  
  /* Avoid breaking the split layout section */
  #full-home-history-report > .grid {
    page-break-inside: avoid;
  }
  
  /* Reduce font size in property info section (right panel) for print */
  #full-home-history-report > div.grid > div[class*="from-teal-600"],
  #full-home-history-report > div.grid > div[class*="bg-gradient-to-br"] {
    font-size: 0.85em !important;
  }
  
  #full-home-history-report > div.grid > div[class*="from-teal-600"] h3,
  #full-home-history-report > div.grid > div[class*="bg-gradient-to-br"] h3 {
    font-size: 0.9em !important;
  }
  
  #full-home-history-report > div.grid > div[class*="from-teal-600"] p,
  #full-home-history-report > div.grid > div[class*="bg-gradient-to-br"] p {
    font-size: 0.85em !important;
  }
  
  /* Reduce font size in "About this report" section (left panel) for print to match property information */
  /* Target the section with border-t that comes after PROPERTY FEATURES */
  #full-home-history-report > div.grid > div[class*="bg-white"] > div[class*="border-t"][class*="pt-8"] {
    font-size: 0.85em !important;
  }
  
  #full-home-history-report > div.grid > div[class*="bg-white"] > div[class*="border-t"][class*="pt-8"] h3 {
    font-size: 0.9em !important;
  }
  
  #full-home-history-report > div.grid > div[class*="bg-white"] > div[class*="border-t"][class*="pt-8"] p {
    font-size: 0.85em !important;
  }
  
  #full-home-history-report > div.grid > div[class*="bg-white"] > div[class*="border-t"][class*="pt-8"] div[class*="text-sm"] {
    font-size: 0.75em !important;
  }
  
  /* Everything else should look exactly like the webpage */

  /* --- SINGLE QR CARD PRINTING (4x3) --- */
  .print-only-wrapper {
    @page {
      size: 4in 3in;
      margin: 0;
    }
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex !important;
    justify-content: center;
    align-items: center;
    background-color: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .print-only-wrapper > div > *:not(#qr-card-to-print) {
    display: none !important;
  }
  #qr-card-to-print {
    width: 4in;
    height: 3in;
    box-sizing: border-box !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000 !important;
    background-color: white !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    page-break-inside: avoid;
    justify-content: space-between;
  }
  #qr-card-to-print .print-card-text { color: #000000 !important; }
  #qr-card-to-print .print-card-header { padding: 0.15in !important; border-bottom: 1px solid #ccc !important; }
  #qr-card-to-print .print-card-header h2 { font-size: 14pt !important; }
  #qr-card-to-print .print-card-header svg { width: 18px !important; height: 18px !important; }
  #qr-card-to-print .print-card-body { padding: 0.1in !important; flex-grow: 1; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; }
  #qr-card-to-print .print-card-body img { width: 1.5in !important; height: 1.5in !important; }
  #qr-card-to-print .print-card-body h3 { font-size: 16pt !important; margin-top: 0.1in !important; }
  #qr-card-to-print .print-card-body div { font-size: 9pt !important; margin-top: 0.05in !important; }
  #qr-card-to-print .print-card-footer { padding: 0.1in !important; border-top: 1px solid #ccc !important; background-color: #f8f8f8 !important; }
  #qr-card-to-print .print-card-footer p { font-size: 7pt !important; }
  
  /* --- BULK QR SHEET PRINTING (2" x 1") --- */
  .print-sheet-wrapper {
    @page {
      size: letter;
      margin: 0.25in;
    }
    position: absolute !important;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: block !important;
    background: white !important;
  }
   .print-sheet-wrapper > div > *:not(#qr-sheet-to-print) {
     display: none !important;
   }
  #qr-sheet-to-print {
    display: grid !important;
    grid-template-columns: repeat(4, 2in);
    grid-template-rows: repeat(10, 1in);
    gap: 0;
    width: 8in; /* 4 * 2in */
    height: 10in; /* 10 * 1in */
    box-sizing: border-box !important;
    overflow: hidden;
    margin: auto;
  }
  /* Individual Label Style for 2" x 1" */
  .bulk-qr-card {
    width: 2in;
    height: 1in;
    box-sizing: border-box !important;
    border: 1px solid #e5e7eb !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    background-color: white !important;
    page-break-inside: avoid;
    color: #000000 !important;
  }
  .bulk-qr-card .print-card-header {
      display: flex !important;
      padding: 0.03in 0.05in !important;
      border-bottom: 1px solid #ccc !important;
      min-height: 0.12in;
  }
  .bulk-qr-card .print-card-header h2 {
      font-size: 7pt !important;
      margin: 0 !important;
  }
  .bulk-qr-card .print-card-header svg {
      width: 8px !important;
      height: 8px !important;
  }
  .bulk-qr-card .print-card-body {
      flex-direction: column !important;
      padding: 0.03in !important;
      flex-grow: 1;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 0.02in;
  }
  .bulk-qr-card .print-card-body img {
      width: 0.65in !important;
      height: 0.65in !important;
      flex-shrink: 0;
  }
  .bulk-qr-card .print-card-body h3 {
      font-size: 8pt !important;
      font-weight: bold;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0 !important;
      max-width: 100%;
  }
  .bulk-qr-card .print-card-body p {
      font-size: 6pt !important;
      margin: 0 !important;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
  }
  .bulk-qr-card .print-card-footer {
      display: flex !important;
      padding: 0.02in 0.05in !important;
      border-top: 1px solid #ccc !important;
      background-color: #f8f8f8 !important;
      min-height: 0.1in;
  }
  .bulk-qr-card .print-card-footer p {
      font-size: 5pt !important;
      margin: 0 !important;
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(15px);
}
.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
    opacity: 0;
}
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
 @keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.animate-slide-in-right {
    animation: slide-in-right 0.4s ease-out forwards;
}
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.animate-slide-in-left {
    animation: slide-in-left 0.4s ease-out forwards;
}
@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.animate-modal-enter {
    animation: modal-enter 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Animations for interactive presentation deck */
@keyframes float-long {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-20px) translateX(15px); }
  50% { transform: translateY(10px) translateX(-15px); }
  75% { transform: translateY(-10px) translateX(20px); }
}
.animate-float-long {
    animation: float-long 25s ease-in-out infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-rotate-slow {
    animation: rotate-slow 120s linear infinite;
}

@keyframes fade-in-out-varied {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.animate-fade-in-out-varied {
  animation: fade-in-out-varied 15s ease-in-out infinite;
}

/* New animation for onboarding highlight */
@keyframes highlight-pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7), 0 0 0 0 rgba(79, 70, 229, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(79, 70, 229, 0), 0 0 0 1px rgba(79, 70, 229, 0.7); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0), 0 0 0 0 rgba(79, 70, 229, 0); }
}
.animate-highlight-pulse {
  animation: highlight-pulse 2s ease-out 2;
}
/* Alert button hover animation - gentle bounce with emerald glow */
@keyframes alert-bounce-glow {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6), 0 0 20px rgba(16, 185, 129, 0.4), 0 0 0 2px rgba(16, 185, 129, 0.3);
  }
}

.alert-button-hover:hover {
  animation: alert-bounce-glow 0.8s ease-in-out infinite;
}

.alert-button-hover:hover svg,
.alert-button-hover:hover .animate-pulse {
  animation: none;
}

/* Avatar button hover animation - gentle scale with emerald ring glow */
@keyframes avatar-scale-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4), 0 0 0 6px rgba(16, 185, 129, 0.2);
  }
}

.avatar-button-hover:hover {
  animation: avatar-scale-glow 1.5s ease-in-out infinite;
}

.avatar-button-hover:hover > * {
  transform: scale(1.08);
}

/* Logo gradient animation */
@keyframes gradient-x {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient-x {
  animation: gradient-x 3s ease infinite;
}

/* Logo button hover glow effect */
.logo-button:focus {
  outline: none;
  ring: 2px;
  ring-color: rgba(16, 185, 129, 0.5);
  ring-offset: 2px;
}

/* Coffee machine loading animation */
@keyframes liquid {
  0% {
    height: 0px;
    opacity: 1;
  }
  10% {
    height: 62px;
    opacity: 1;
  }
  90% {
    height: 62px;
    opacity: 1;
  }
  100% {
    height: 62px;
    opacity: 0;
  }
}
@keyframes smokeOne {
  0% {
    bottom: 20px;
    opacity: 0;
  }
  40% {
    bottom: 50px;
    opacity: 0.5;
  }
  80% {
    bottom: 80px;
    opacity: 0.3;
  }
  100% {
    bottom: 80px;
    opacity: 0;
  }
}
@keyframes smokeTwo {
  0% {
    bottom: 40px;
    opacity: 0;
  }
  40% {
    bottom: 70px;
    opacity: 0.5;
  }
  80% {
    bottom: 80px;
    opacity: 0.3;
  }
  100% {
    bottom: 80px;
    opacity: 0;
  }
}

.coffee-machine-loader .coffee-loader-container {
  width: 300px;
  height: 280px;
  position: relative;
}

.coffee-machine-loader--compact {
  width: 44px;
  height: 44px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.coffee-machine-loader--compact .coffee-loader-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.16);
}

.coffee-machine-loader--default .coffee-loader-container {
  --coffee-loader-visual-scale: 0.5;
  transform: scale(var(--coffee-loader-visual-scale));
  transform-origin: center center;
  margin-top: calc(-140px * (1 - var(--coffee-loader-visual-scale)));
  margin-bottom: calc(-140px * (1 - var(--coffee-loader-visual-scale)));
  margin-left: calc(-150px * (1 - var(--coffee-loader-visual-scale)));
  margin-right: calc(-150px * (1 - var(--coffee-loader-visual-scale)));
}
.coffee-machine-loader .coffee-header {
  width: 100%;
  height: 80px;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #f2efe6;
  border-radius: 10px;
}
.coffee-machine-loader .coffee-header__buttons {
  width: 25px;
  height: 25px;
  position: absolute;
  top: 25px;
  background-color: #252528;
  border-radius: 50%;
}
.coffee-machine-loader .coffee-header__buttons::after {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  bottom: -8px;
  left: calc(50% - 4px);
  background-color: #4a4744;
}
.coffee-machine-loader .coffee-header__button-one {
  left: 15px;
}
.coffee-machine-loader .coffee-header__button-two {
  left: 50px;
}
.coffee-machine-loader .coffee-header__display {
  width: 50px;
  height: 50px;
  position: absolute;
  top: calc(50% - 25px);
  left: calc(50% - 25px);
  border-radius: 50%;
  background-color: #1a1e1c;
  border: 5px solid #5ef3a9;
  box-sizing: border-box;
  box-shadow: 0 0 10px rgba(94, 243, 169, 0.45);
}
.coffee-machine-loader .coffee-header__details {
  width: 8px;
  height: 20px;
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #5c6e65;
  box-shadow: -12px 0 0 #5c6e65, -24px 0 0 #5c6e65;
}
.coffee-machine-loader .coffee-medium {
  width: 90%;
  height: 160px;
  position: absolute;
  top: 80px;
  left: calc(50% - 45%);
  background-color: #93c5b1;
}
.coffee-machine-loader .coffee-medium:before {
  content: "";
  width: 90%;
  height: 100px;
  background-color: #6fb396;
  position: absolute;
  bottom: 0;
  left: calc(50% - 45%);
  border-radius: 20px 20px 0 0;
}
.coffee-machine-loader .coffe-medium__exit {
  width: 60px;
  height: 20px;
  position: absolute;
  top: 0;
  left: calc(50% - 30px);
  background-color: #252528;
}
.coffee-machine-loader .coffe-medium__exit::before {
  content: "";
  width: 50px;
  height: 20px;
  border-radius: 0 0 50% 50%;
  position: absolute;
  bottom: -20px;
  left: calc(50% - 25px);
  background-color: #252528;
}
.coffee-machine-loader .coffe-medium__exit::after {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  bottom: -30px;
  left: calc(50% - 5px);
  background-color: #252528;
}
.coffee-machine-loader .coffee-medium__arm {
  width: 70px;
  height: 20px;
  position: absolute;
  top: 15px;
  right: 25px;
  background-color: #252528;
}
.coffee-machine-loader .coffee-medium__arm::before {
  content: "";
  width: 15px;
  height: 5px;
  position: absolute;
  top: 7px;
  left: -15px;
  background-color: #8eb5a3;
}
.coffee-machine-loader .coffee-medium__cup {
  width: 92px;
  height: 56px;
  position: absolute;
  bottom: 0;
  left: calc(50% - 46px);
  background-color: #faf7f0;
  border-radius: 0 0 70px 70px / 0 0 110px 110px;
  overflow: hidden;
  animation: cupBounceMachine 1.6s ease-in-out infinite;
}
.coffee-machine-loader .coffee-medium__cup::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 34px;
  border-radius: 0 0 40px 40px;
  background: linear-gradient(to top, #4d002b 0 55%, #ffedda 55% 100%);
  animation: cupFillMachine 1.6s ease-in-out infinite;
}
.coffee-machine-loader .coffee-medium__cup::after {
  content: "";
  width: 20px;
  height: 20px;
  position: absolute;
  top: 6px;
  right: -13px;
  border: 5px solid #faf7f0;
  border-radius: 50%;
  animation: cupBounceMachine 1.6s ease-in-out infinite;
}

.coffee-machine-loader .coffee-loader {
  --size: 84px;
  --steam: rgba(255, 255, 255, 0.9);
  position: absolute;
  bottom: 0;
  left: calc(50% - 42px);
  width: var(--size);
  height: calc(var(--size) * 1.2);
  pointer-events: none;
  display: inline-block;
  filter: drop-shadow(0 0 2px rgba(8, 217, 214, 0.35));
  z-index: 3;
}

/* New Drifting Steam Design */
.coffee-machine-loader .coffee-loader .steam {
  position: absolute;
  bottom: calc(var(--size) * 0.58);
  left: 22px;
  width: 8px;
  height: 32px;
  border-radius: 999px;
  background: var(--steam);
  filter: blur(0.8px);
  opacity: 0;
  animation: steamUp 1.6s ease-in-out infinite;
}

.coffee-machine-loader .coffee-loader .steam:nth-child(2) {
  left: 36px;
  animation-delay: 0.25s;
}

.coffee-machine-loader .coffee-loader .steam:nth-child(3) {
  left: 50px;
  animation-delay: 0.5s;
}

@keyframes steamUp {
  0% {
    transform: translateY(10px) translateX(0) scaleY(0.5);
    opacity: 0;
  }
  30% {
    opacity: 0.8;
  }
  60% {
    transform: translateY(-15px) translateX(4px) scaleY(1);
    opacity: 0.4;
  }
  100% {
    transform: translateY(-35px) translateX(-2px) scaleY(1.2);
    opacity: 0;
  }
}

@keyframes cupFillMachine {
  0%,
  100% {
    background: linear-gradient(to top, #4d002b 0 35%, #ffedda 35% 100%);
  }
  50% {
    background: linear-gradient(to top, #4d002b 0 75%, #ffedda 75% 100%);
  }
}

@keyframes cupBounceMachine {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.coffee-machine-loader .coffee-medium__liquid {
  width: 6px;
  height: 63px;
  opacity: 0;
  position: absolute;
  top: 50px;
  left: calc(50% - 3px);
  background-color: #8f4f38;
  animation: liquid 2.2s linear infinite;
}
.coffee-machine-loader .coffee-medium__smoke {
  width: 8px;
  height: 20px;
  position: absolute;
  border-radius: 5px;
  background-color: #e5ebe6;
}
.coffee-machine-loader .coffee-medium__smoke-one {
  opacity: 0;
  bottom: 50px;
  left: 102px;
  animation: smokeOne 3s linear infinite;
}
.coffee-machine-loader .coffee-medium__smoke-two {
  opacity: 0;
  bottom: 70px;
  left: 118px;
  animation: smokeTwo 3s linear infinite;
}
.coffee-machine-loader .coffee-medium__smoke-three {
  opacity: 0;
  bottom: 65px;
  right: 118px;
  animation: smokeTwo 3s linear infinite;
}
.coffee-machine-loader .coffee-medium__smoke-for {
  opacity: 0;
  bottom: 50px;
  right: 102px;
  animation: smokeOne 3s linear infinite;
}
.coffee-machine-loader .coffee-footer {
  width: 95%;
  height: 15px;
  position: absolute;
  bottom: 25px;
  left: calc(50% - 47.5%);
  background-color: #41bdad;
  border-radius: 10px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}
.coffee-machine-loader .coffee-footer::after {
  content: "";
  width: 106%;
  height: 26px;
  position: absolute;
  bottom: -25px;
  left: -8px;
  background-color: #1e1e22;
}

