/**
 * Digital Tailor Cart Validation Styles
 * Modal and validation message styling
 */

/* Modal Overlay - Exact Digital Tailor styling */
.maison-cloth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999999;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.maison-cloth-modal.show {
  display: flex !important;
}

/* Specific targeting for modal ID with show class */
#maison-cloth-validation-modal.show {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure modal content is visible when shown */
#maison-cloth-validation-modal.show .maison-cloth-modal-content {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
}

/* Modal Content - Exact Digital Tailor styling */
.maison-cloth-modal-content {
  position: relative;
  width: 100%;
  max-width: 754px;
  height: calc(100vh - 120px);
  max-height: 90vh;
  margin: 20px;
  background-color: white;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 100000000 !important;
}

/* Modal Header */
.maison-cloth-modal-header {
  padding: 24px 24px 16px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.maison-cloth-modal-header h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Close Button - Minimal X Style */
.maison-cloth-close {
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  color: #666;
  transition: opacity 0.2s ease;
  font-weight: 300;
  line-height: 1;
  position: absolute;
  right: 16px;
  top: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maison-cloth-close:hover,
.maison-cloth-close:focus {
  opacity: 0.7;
}

/* Modal Body */
.maison-cloth-modal-body {
  padding: 24px;
  text-align: center;
}


.maison-cloth-modal-body .maison-cloth-main-message {
  font-size: 17px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 32px;
  font-weight: 300;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Action Button Container */
.maison-cloth-action {
  margin: 32px 0 40px;
}

/* Primary Button - GET MEASURED Style */
.maison-cloth-btn-primary {
  background: #000;
  color: #fff;
  border: none;
  padding: 16px 48px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.maison-cloth-btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.maison-cloth-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Why This Matters Section */
.maison-cloth-why-matters {
  margin-top: 60px;
  text-align: center;
}

.maison-cloth-why-matters h4 {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.maison-cloth-why-matters p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
  .maison-cloth-modal-content {
    margin: 10% auto;
    width: 95%;
    max-width: none;
  }
  
  .maison-cloth-modal-header,
  .maison-cloth-modal-body {
    padding: 20px;
  }
  
  .maison-cloth-modal-header h3 {
    font-size: 1.2rem;
    padding-right: 50px;
  }
  
  .maison-cloth-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
  
  .maison-cloth-icon {
    font-size: 2.5rem;
  }
  
  .maison-cloth-btn-primary {
    width: 100%;
    min-width: auto;
    padding: 14px 32px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .maison-cloth-modal-content {
    border: 2px solid #1a1a1a;
  }
  
  .maison-cloth-btn-primary {
    border: 2px solid #1a73e8;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .maison-cloth-modal,
  .maison-cloth-modal-content,
  .maison-cloth-close,
  .maison-cloth-btn-primary {
    animation: none;
    transition: none;
  }
}

/* Focus management for accessibility */
.maison-cloth-modal-content:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}


/* Cart validation container (hidden by default) */
.maison-cloth-cart-validation {
  position: relative;
}

/* High priority overrides for modal display */
#maison-cloth-validation-modal {
  z-index: 99999 !important;
}

/* Force display when modal is shown - highest priority */
#maison-cloth-validation-modal.show,
#maison-cloth-validation-modal[style*="display: block"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  z-index: 99999 !important;
  align-items: center !important;
  justify-content: center !important;
}

