/* ==========================================================================
   Rayashree Weaving Pvt. Ltd. - Component Stylesheet
   Modals, RFQ forms, Calculators, Spec Drawers & Alerts
   ========================================================================== */

/* ==========================================================================
   Modal Dialog (RFQ & Quick Inquire)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 17, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--gold-300);
  transform: scale(0.95) translateY(20px);
  transition: all var(--transition-normal);
}

.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  color: var(--white);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gold-500);
}

.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff !important;
}

.modal-close-btn {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--gold-400);
}

.modal-body {
  padding: 2rem;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark-800);
  margin-bottom: 0.4rem;
}

.form-label span.req {
  color: var(--danger);
}

.form-control, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--dark-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--dark-900);
  transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(10, 107, 97, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-help {
  font-size: 0.8rem;
  color: var(--dark-400);
  margin-top: 0.35rem;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--primary-900);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--gold-400);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.925rem;
  font-weight: 600;
  pointer-events: auto;
  animation: slideToast 0.35s ease forwards;
}

@keyframes slideToast {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Interactive Quote Calculator Widget
   ========================================================================== */

.calculator-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--dark-200);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.calculator-header {
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
  color: var(--white);
  padding: 2rem;
  text-align: center;
  border-bottom: 3px solid var(--gold-500);
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
}

@media (max-width: 900px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

.calculator-form-side {
  padding: 2.5rem;
}

.calculator-result-side {
  background: var(--primary-50);
  border-left: 1px solid var(--primary-100);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-summary-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--primary-100);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.calc-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--dark-200);
  font-size: 0.9rem;
}

.calc-stat-row:last-child {
  border-bottom: none;
}

.calc-stat-row .stat-bold {
  font-weight: 800;
  color: var(--primary-900);
}

/* ==========================================================================
   Product Detail Specs Table
   ========================================================================== */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--dark-200);
}

.specs-table th, .specs-table td {
  padding: 0.9rem 1.25rem;
  font-size: 0.925rem;
  text-align: left;
}

.specs-table th {
  background: var(--primary-900);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.specs-table tr:nth-child(even) {
  background: var(--dark-50);
}

.specs-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--dark-200);
}

.specs-table td:first-child {
  font-weight: 700;
  color: var(--primary-800);
  width: 35%;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--dark-400);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--primary-600);
}

.breadcrumb a:hover {
  color: var(--gold-600);
}

.breadcrumb span.current {
  color: var(--dark-700);
  font-weight: 600;
}

@media (max-width: 600px) {
  .modal-card {
    width: 94% !important;
    max-width: 94% !important;
    margin: 1rem auto !important;
    border-radius: 14px !important;
  }
  .modal-header {
    padding: 1rem 1.25rem !important;
  }
  .modal-header h3 {
    font-size: 1.1rem !important;
  }
  .modal-body {
    padding: 1.25rem !important;
  }
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  .toast {
    font-size: 0.825rem;
    padding: 0.75rem 1rem;
  }
}

/* ==========================================================================
   Divine 5-Second Intro Preloader with Animated Letters
   ========================================================================== */

.site-preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 38%, #053b36 0%, #02201d 55%, #011412 100%);
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 1.5rem;
  overflow: hidden;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.75s ease, transform 0.75s ease;
  animation: preloaderAutoExit 5.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.site-preloader.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(1.05);
  pointer-events: none !important;
  display: none !important;
}

@keyframes preloaderAutoExit {
  0%, 88% {
    opacity: 1;
    visibility: visible;
  }
  97% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
  }
}

.preloader-ambient-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 183, 116, 0.28) 0%, rgba(20, 184, 166, 0.12) 50%, transparent 70%);
  animation: preloaderHalo 4s infinite alternate ease-in-out;
  pointer-events: none;
}

.preloader-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 540px;
  width: 100%;
  z-index: 2;
}

/* God Portrait Animated Circle Container */
.god-circle-frame-container {
  position: relative;
  width: 175px;
  height: 175px;
  margin: 0 auto 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.god-rotating-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 3px dashed #dfb774;
  animation: rotateRays 14s linear infinite;
  pointer-events: none;
  box-shadow: 0 0 25px rgba(223, 183, 116, 0.4);
}

.god-outer-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 45px rgba(223, 183, 116, 0.8), 0 0 90px rgba(223, 183, 116, 0.45);
  animation: haloGlow 2.5s infinite alternate ease-in-out;
  pointer-events: none;
}

.god-circle-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #dfb774;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  background: #02201d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.god-circle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  animation: godZoomBreath 4.5s infinite alternate ease-in-out;
}

.god-mantra {
  display: inline-block;
  color: #dfb774;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 14px rgba(223, 183, 116, 0.7);
  animation: mantraGlow 2.5s infinite alternate ease-in-out;
}

/* Company Logo in Preloader */
.preloader-logo-wrap {
  margin: 0.75rem 0 0.85rem;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.4rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(223, 183, 116, 0.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.preloader-logo-img {
  max-height: 44px;
  width: auto;
  display: block;
}

/* Letter by Letter Staggered Kinetic Animation */
.animated-letters-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  color: #ffffff;
}

.animated-letters-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(0.7);
  animation: letterReveal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animated-letters-title .letter.space {
  width: 0.45em;
}

.animated-letters-title .gold-char {
  color: #dfb774;
  text-shadow: 0 0 14px rgba(223, 183, 116, 0.8);
}

.preloader-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: subFadeIn 0.8s ease 1.8s forwards;
}

/* 5-Second Progress Bar */
.preloader-progress-wrap {
  width: 250px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(223, 183, 116, 0.35);
}

.preloader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #dfb774, #f59e0b, #10b981);
  border-radius: 9999px;
  animation: progress5Sec 5s linear forwards;
  box-shadow: 0 0 10px rgba(223, 183, 116, 0.8);
}

.preloader-timer-label {
  font-size: 0.75rem;
  color: rgba(223, 183, 116, 0.8);
  margin-top: 0.5rem;
  font-weight: 600;
}

.preloader-skip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.preloader-skip-btn:hover {
  background: rgba(223, 183, 116, 0.35);
  color: #dfb774;
  border-color: #dfb774;
}

/* Keyframes */
@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes godFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes preloaderHalo {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 0.85;
  }
}

@keyframes mantraGlow {
  0% {
    text-shadow: 0 0 8px rgba(223, 183, 116, 0.4);
  }
  100% {
    text-shadow: 0 0 18px rgba(223, 183, 116, 0.9), 0 0 25px rgba(223, 183, 116, 0.5);
  }
}

@keyframes subFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes progress5Sec {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes rotateRays {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes haloGlow {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 35px rgba(223, 183, 116, 0.65), 0 0 70px rgba(223, 183, 116, 0.35);
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 55px rgba(223, 183, 116, 0.95), 0 0 110px rgba(223, 183, 116, 0.55);
  }
}

@keyframes godZoomBreath {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}
