/* ========================================
   USEJUNIOR COMPONENTS CSS
   Consolidated custom styles for maintainability
   ======================================== */

/* ========================================
   MISSING TAILWIND CLASSES
   Classes that don't exist in tailwind.min.css
   ======================================== */

/* Width classes missing from minified version */
.w-32 { width: 8rem; }      /* 128px */
.w-36 { width: 9rem; }      /* 144px */
.w-40 { width: 10rem; }     /* 160px */

/* Responsive flex classes missing from minified version */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:space-x-6 > :not([hidden]) ~ :not([hidden]) { 
    margin-left: 1.5rem; 
  }
  .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) { 
    margin-top: 0; 
  }
}

/* ========================================
   CERTIFICATION BADGES RESPONSIVE FIX
   ======================================== */

/* Force horizontal layout on screens >= 640px since sm:flex-row isn't in minified Tailwind */
@media (min-width: 640px) {
  .certification-badges {
    flex-direction: row !important;
  }
  .certification-badges .badge-spacing-y {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  .certification-badges .badge-spacing-x {
    margin-left: 1.5rem !important;
  }
  .certification-badges .badge-spacing-x:first-child {
    margin-left: 0 !important;
  }
}

/* ========================================
   NAVBAR FIXES
   ======================================== */

/* Navbar Dark Mode Fixes */
/* Fix for missing dark:text-black Tailwind class - ONLY for navbar buttons */
.dark .ud-header [class*="dark:text-black"]{color:#000!important}
.dark .ud-header a[class*="dark:text-black"]{color:#000!important}
.dark .ud-header [class*="dark:hover:text-black"]:hover{color:#000!important}
.dark .ud-header a[class*="dark:hover:text-black"]:hover{color:#000!important}

/* Ultra-specific targeting: only navbar buttons with specific background classes */
.dark .ud-header a[class*="bg-dark"][class*="dark:bg-white"]{color:#000!important}
.dark .ud-header a[class*="bg-dark"][class*="dark:bg-white"]:hover{color:#000!important}
.dark .ud-header a[class*="bg-primary"][class*="dark:bg-white"]{color:#000!important}
.dark .ud-header a[class*="bg-primary"][class*="dark:bg-white"]:hover{color:#000!important}

/* ========================================
   DEMO CAROUSEL STYLES
   ======================================== */

.demo-carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.demo-carousel-container .demo-swiper {
  position: relative;
  overflow: hidden;
}

.demo-swiper {
  width: 100%;
  height: 650px;
}

.demo-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.demo-swiper .jdemo-window-container {
  opacity: 1;
  visibility: visible;
}

/* Pagination styling */
.demo-swiper .swiper-pagination {
  bottom: -40px !important;
  text-align: center;
}

.demo-swiper .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  opacity: 1;
  margin: 0 6px;
  transition: all 0.3s ease;
}

.demo-swiper .swiper-pagination-bullet-active {
  background: #1d4ed8;
  transform: scale(1.2);
}

/* Navigation arrows */
.demo-swiper .swiper-button-next,
.demo-swiper .swiper-button-prev {
  color: #1d4ed8;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.9);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.demo-swiper .swiper-button-next:hover,
.demo-swiper .swiper-button-prev:hover {
  background: white;
  transform: scale(1.1);
}

.demo-swiper .swiper-button-next::after,
.demo-swiper .swiper-button-prev::after {
  font-size: 16px;
  font-weight: 900;
}

/* Title animation */
#carousel-title,
#carousel-subtitle {
  transition: all 0.3s ease;
}

/* ========================================
   DEMO WINDOW COMPONENTS (JDEMO)
   ======================================== */

.jdemo-body-reset {
  background: transparent;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 5px;
  text-align: left;
}

.jdemo-window-container {
  width: 640px;
  height: 650px;
  background: white;
  border: 1px solid #dadce0;
  border-radius: 16px;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Google Sans', Arial, sans-serif;
  pointer-events: none;
  text-align: left !important;
  transition: opacity 0.5s ease;
}

.jdemo-window-header {
  background: #f2f6fc;
  padding: 12px 16px;
  border-bottom: 1px solid #dadce0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jdemo-window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.jdemo-dot-red {
  background: #ff5f57;
}

.jdemo-dot-yellow {
  background: #febc2e;
}

.jdemo-dot-green {
  background: #28c840;
}

.jdemo-thread-container {
  flex: 1;
  overflow: hidden;
  padding: 24px;
  scroll-behavior: smooth;
  background: transparent;
}

.jdemo-compose-area {
  border: 1px solid #dadce0;
  border-radius: 8px;
  margin-bottom: 20px;
  background: white;
}

.jdemo-compose-header {
  padding: 16px;
  border-bottom: 1px solid #dadce0;
  background: white;
}

.jdemo-field-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-family: Arial, sans-serif;
}

.jdemo-field-label {
  width: 70px;
  color: #5f6368;
  font-size: 14px;
}

.jdemo-field-value {
  flex: 1;
  font-size: 14px;
  color: #202124;
  text-align: left !important;
}

.jdemo-email-body {
  height: 400px;
  line-height: 1.6;
  white-space: pre-wrap;
  font-family: Arial, sans-serif;
  padding: 16px;
  text-align: left !important;
  color: #202124;
  background: white;
}

.jdemo-typing-text::after {
  content: '|';
  animation: jdemo-blink 1s infinite !important;
  display: inline-block;
  width: 1px;
}

@keyframes jdemo-blink {
  50% {
    opacity: 0;
  }
}

.jdemo-compose-footer {
  padding: 12px 16px;
  border-top: 1px solid #dadce0;
  display: flex;
  align-items: center;
  background: #f9f9f9;
}

.jdemo-attachment {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #edf2fa;
  border-radius: 4px;
  margin: 0 12px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.5s ease;
  color: #444;
}

.jdemo-attachment.jdemo-visible {
  opacity: 1;
}

.jdemo-send-button {
  background: #0b57d0;
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 500;
}

.jdemo-send-button.jdemo-sent {
  background: #188038;
}

.jdemo-response-email {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 16px;
  background: white;
  text-align: left !important;
}

.jdemo-response-email.jdemo-visible {
  opacity: 1;
  transform: translateY(0);
}

.jdemo-avatar {
  width: 32px;
  height: 32px;
  background: #0b57d0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  margin-right: 12px;
}

.jdemo-sender-info {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.jdemo-sender-details {
  display: flex;
  flex-direction: column;
}

.jdemo-sender-name {
  font-weight: 500;
  color: #202124;
  font-size: 14px;
}

.jdemo-sender-email {
  color: #5f6368;
  font-size: 12px;
}

.jdemo-response-email .jdemo-email-body {
  padding: 0;
  min-height: 250px;
  height: auto;
}

.jdemo-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.jdemo-fade.jdemo-visible {
  opacity: 1;
}

/* ========================================
   CONTACT FORM & INTERACTIVE COMPONENTS
   ======================================== */

/* Contact form transitions */
.contactform-container { 
  position: relative; 
}

.contactform-form { 
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; 
}

.contactform-form.contactform-hidden { 
  opacity: 0; 
  transform: translateY(20px); 
  pointer-events: none; 
  position: absolute; 
  width: 100%; 
}

.contactform-success { 
  opacity: 0; 
  transform: translateY(20px); 
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; 
  text-align: center; 
  display: none; 
}

.contactform-success.contactform-visible { 
  opacity: 1; 
  transform: translateY(0); 
  display: block; 
}

/* Zyvid video component styles */
.zyvid-video-container { 
  position: relative; 
  width: 100%; 
  aspect-ratio: 16/9; 
  background: #000; 
}

.zyvid-main-video { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.loading-overlay { 
  position: absolute; 
  inset: 0; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: rgba(0, 0, 0, 0.5); 
  transition: opacity 0.3s; 
  z-index: 20; 
}

.progress-ring { 
  transform: rotate(-90deg); 
}

.progress-ring__circle-bg { 
  fill: none; 
  stroke: rgba(255, 255, 255, 0.2); 
  stroke-width: 4px; 
}

.progress-ring__circle { 
  fill: none; 
  stroke: white; 
  stroke-width: 4px; 
  stroke-linecap: round; 
  transition: stroke-dashoffset 0.3s; 
}

.progress-text { 
  fill: white; 
  font-size: 16px; 
  font-weight: bold; 
  text-anchor: middle; 
  dominant-baseline: middle; 
  transform: rotate(90deg); 
}

.zyvid-center-button { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  background: rgba(0, 0, 0, 0.5); 
  border: none; 
  width: 64px; 
  height: 64px; 
  border-radius: 50%; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: background-color 0.3s; 
  z-index: 10; 
}

.zyvid-center-button:hover { 
  background: rgba(0, 0, 0, 0.7); 
}

.zyvid-control-bar { 
  position: absolute; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  background: rgba(0, 0, 0, 0.5); 
  padding: 10px; 
  display: flex; 
  gap: 10px; 
  opacity: 0; 
  transition: opacity 0.3s; 
  z-index: 10; 
}

.zyvid-video-container:hover .zyvid-control-bar { 
  opacity: 1; 
}

.zyvid-control-button { 
  background: transparent; 
  border: none; 
  color: white; 
  cursor: pointer; 
  padding: 5px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border-radius: 4px; 
}

.zyvid-control-button:hover { 
  background: rgba(255, 255, 255, 0.1); 
}

.zyvid-center-button svg, .zyvid-control-button svg { 
  color: white; 
}

.zyvid-hidden { 
  display: none; 
}

.zyvid-hidden2 { 
  opacity: 0; 
  pointer-events: none; 
}

/* Thank-you page animations */
@keyframes checkmark { 
  0% { transform: scale(0); } 
  50% { transform: scale(1.2); } 
  100% { transform: scale(1); } 
}

.checkmark { 
  animation: checkmark 0.6s ease-in-out; 
}

@keyframes fadeInUp { 
  from { opacity: 0; transform: translateY(30px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.fade-in-up { 
  animation: fadeInUp 0.8s ease-out; 
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Demo carousel responsive adjustments */
@media (max-width: 768px) {
  .demo-swiper {
    height: 800px;
  }
  
  .demo-swiper .jdemo-window-container {
    max-width: 100%;
    height: 800px;
    width: 100%;
  }
  
  .demo-swiper .swiper-button-next,
  .demo-swiper .swiper-button-prev {
    width: 35px;
    height: 35px;
  }
  
  .demo-swiper .swiper-button-next::after,
  .demo-swiper .swiper-button-prev::after {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .demo-swiper {
    height: 700px;
  }
  
  .demo-swiper .jdemo-window-container {
    height: 700px;
  }
}

/* Demo window responsive adjustments */
@media (max-width: 1000px) {
  .jdemo-window-container {
    height: 800px;
  }

  .jdemo-email-body {
    height: 550px;
  }
}

@media (max-width: 768px) {
  .jdemo-window-container {
    width: 100% !important;
    height: 800px !important;
    max-width: 100% !important;
    font-size: 14px;
  }

  .jdemo-thread-container {
    padding: 16px;
  }

  .jdemo-email-body {
    height: 480px !important;
    font-size: 14px;
    padding: 12px;
  }

  .jdemo-compose-header {
    padding: 12px;
  }

  .jdemo-field-label {
    width: 60px;
    font-size: 13px;
  }

  .jdemo-field-value {
    font-size: 13px;
  }

  .jdemo-response-email .jdemo-email-body {
    min-height: 200px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .jdemo-window-container {
    width: 100% !important;
    height: 700px !important;
    max-width: 100% !important;
    min-width: 320px;
  }

  .jdemo-thread-container {
    padding: 12px;
    overflow-x: hidden;
  }

  .jdemo-email-body {
    height: 400px !important;
    font-size: 13px !important;
    padding: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .jdemo-field-label {
    width: 50px;
    font-size: 12px;
  }

  .jdemo-field-value {
    font-size: 12px;
  }

  .jdemo-response-email .jdemo-email-body {
    min-height: 150px;
    font-size: 13px;
  }

  .jdemo-compose-header {
    padding: 8px;
  }

  .jdemo-compose-footer {
    padding: 8px 12px;
  }
}