/* ========================================
   EXE Store - Modal Styles
   Dark Glass-morphism Modals
   ======================================== */

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal__container {
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  z-index: 100;
  border: 1px solid rgba(187, 55, 55, 0.2);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(187, 55, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #f0f0f0;
  box-sizing: border-box;
}

.modal__close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s;
  padding: 4px 8px;
  border-radius: 6px;
}

.modal__close:hover {
  color: #bb3737;
  background: rgba(187, 55, 55, 0.1);
}

.modal__header .modal__close:before { content: "\2715"; }

.modal__content {
  margin-top: 2rem;
  margin-bottom: 2rem;
  line-height: 1.5;
  color: rgba(240, 240, 240, 0.8);
}

.modal__btn {
  font-size: .875rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: .5rem;
  padding-bottom: .5rem;
  background-color: #2a2a2a;
  color: rgba(240, 240, 240, 0.8);
  border-radius: 8px;
  border-style: none;
  border-width: 0;
  cursor: pointer;
  -webkit-appearance: button;
  text-transform: none;
  overflow: visible;
  line-height: 1.15;
  margin: 0;
  will-change: transform;
  -moz-osx-font-smoothing: grayscale;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal__btn:focus, .modal__btn:hover {
  -webkit-transform: scale(1.03);
  transform: scale(1.03);
  background-color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal__btn-primary {
  background: linear-gradient(135deg, #bb3737, #d44444);
  color: #fff;
  font-weight: 600;
}

.modal__btn-primary:hover {
  background: linear-gradient(135deg, #a52f2f, #bb3737);
  box-shadow: 0 4px 20px rgba(187, 55, 55, 0.3);
}


/**************************\
  Modal Animations
\**************************/
@keyframes mmfadeIn {
    from { opacity: 0; }
      to { opacity: 1; }
}

@keyframes mmfadeOut {
    from { opacity: 1; }
      to { opacity: 0; }
}

@keyframes mmslideIn {
  from { 
    transform: translateY(20px) scale(0.97); 
    opacity: 0;
  }
  to { 
    transform: translateY(0) scale(1); 
    opacity: 1;
  }
}

@keyframes mmslideOut {
  from { 
    transform: translateY(0) scale(1); 
    opacity: 1;
  }
  to { 
    transform: translateY(-15px) scale(0.97); 
    opacity: 0;
  }
}

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn .4s cubic-bezier(0.16, 1, 0.3, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut .3s cubic-bezier(0.4, 0, 1, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}