/* ============================================================
   Café Lamhey — Premium Subscription Modal Stylesheet
   ============================================================ */

.bk-sub-backdrop {
  position: fixed;
  inset: 0;
  background: hsla(24, 50%, 6%, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bk-sub-backdrop.bk-sub-open {
  opacity: 1;
  pointer-events: auto;
}

.bk-sub-modal {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: hsl(24, 38%, 11%);
  border: 1px solid hsla(28, 35%, 45%, 0.25);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 40px 100px hsla(24, 50%, 3%, 0.95),
    inset 0 1px 0 hsla(30, 35%, 90%, 0.05);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
}

.bk-sub-backdrop.bk-sub-open .bk-sub-modal {
  transform: translateY(0) scale(1);
}

/* Close Button */
.bk-sub-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid hsla(28, 35%, 50%, 0.2);
  background: hsla(28, 30%, 18%, 0.6);
  color: hsla(30, 35%, 80%, 0.75);
  cursor: pointer;
  z-index: 20;
  transition: all 0.25s ease;
}

.bk-sub-close svg {
  width: 16px;
  height: 16px;
}

.bk-sub-close:hover {
  background: hsla(0, 60%, 45%, 0.2);
  border-color: hsla(0, 60%, 55%, 0.3);
  color: hsl(0, 65%, 75%);
  transform: scale(1.05) rotate(90deg);
}

/* Grid Layout */
.bk-sub-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  width: 100%;
}

/* Left Panel: Value Prop */
.bk-sub-left {
  position: relative;
  padding: 3rem;
  background: linear-gradient(135deg, hsl(24, 45%, 9%) 0%, hsl(24, 55%, 6%) 100%);
  border-right: 1px solid hsla(28, 35%, 45%, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bk-sub-glow {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, hsla(28, 45%, 45%, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.bk-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  background: hsla(28, 45%, 45%, 0.1);
  border: 1px solid hsla(28, 35%, 45%, 0.25);
  border-radius: 30px;
  font-size: 0.725rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(28, 45%, 65%);
  margin-bottom: 1.5rem;
}

.bk-sub-badge-dot {
  width: 5px;
  height: 5px;
  background: hsl(28, 45%, 60%);
  border-radius: 50%;
  box-shadow: 0 0 8px hsl(28, 45%, 60%);
}

.bk-sub-title {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.25;
  color: hsl(0, 0%, 96%);
  margin-bottom: 1rem;
}

.bk-sub-title em {
  font-style: italic;
  font-weight: 400;
  font-family: 'Playwrite GB S', cursive;
  color: hsl(28, 45%, 60%);
  display: inline-block;
  margin-top: 0.2rem;
}

.bk-sub-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: hsla(30, 20%, 80%, 0.75);
  margin-bottom: 2rem;
}

.bk-sub-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bk-sub-benefits li {
  display: flex;
  gap: 1rem;
}

.bk-sub-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: hsla(28, 45%, 45%, 0.15);
  border: 1px solid hsla(28, 45%, 45%, 0.3);
  color: hsl(28, 45%, 60%);
  font-size: 0.65rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.bk-sub-benefits strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(0, 0%, 94%);
  margin-bottom: 0.15rem;
}

.bk-sub-benefits span {
  font-size: 0.825rem;
  color: hsla(30, 15%, 75%, 0.6);
  line-height: 1.4;
  display: block;
}

/* Right Panel: Form */
.bk-sub-right {
  padding: 3rem;
  background: hsl(24, 38%, 11%);
  overflow-y: auto;
  display: flex;
  align-items: center;
}

.bk-sub-right-content {
  width: 100%;
}

.bk-sub-header-right {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsla(30, 20%, 75%, 0.5);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Plan Selection */
.bk-sub-plans {
  margin-bottom: 1.5rem;
}

.bk-sub-plan-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: hsla(28, 20%, 15%, 0.35);
  border: 1.5px solid hsla(28, 35%, 45%, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.bk-sub-plan-card:hover {
  background: hsla(28, 20%, 18%, 0.5);
  border-color: hsla(28, 35%, 50%, 0.35);
}

.bk-sub-plan-card.active {
  background: hsla(28, 45%, 40%, 0.08);
  border-color: hsl(28, 45%, 52%);
  box-shadow: 0 0 15px hsla(28, 45%, 45%, 0.12);
}

.bk-sub-plan-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.bk-sub-plan-details {
  display: flex;
  flex-direction: column;
}

.bk-sub-plan-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(0, 0%, 94%);
  margin-bottom: 0.15rem;
}

.bk-sub-plan-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: hsl(28, 45%, 60%);
}

.bk-sub-plan-price small {
  font-size: 0.8rem;
  font-weight: 400;
  color: hsla(30, 15%, 75%, 0.5);
}

.bk-sub-plan-checkmark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid hsla(30, 15%, 75%, 0.3);
  position: relative;
  display: inline-block;
  transition: all 0.25s ease;
}

.bk-sub-plan-card.active .bk-sub-plan-checkmark {
  border-color: hsl(28, 45%, 52%);
  background: hsl(28, 45%, 52%);
}

.bk-sub-plan-card.active .bk-sub-plan-checkmark::after {
  content: '';
  position: absolute;
  top: 4.5px;
  left: 4.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(24, 38%, 11%);
}

/* Billing Form */
.bk-sub-form-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsla(30, 20%, 75%, 0.5);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  border-top: 1px solid hsla(28, 30%, 45%, 0.12);
  padding-top: 1.25rem;
}

.bk-sub-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  width: 100%;
}

.bk-sub-input-group label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsla(30, 15%, 80%, 0.6);
}

.bk-sub-input-group input {
  padding: 0.75rem 1rem;
  background: hsla(28, 20%, 15%, 0.4);
  border: 1px solid hsla(28, 25%, 45%, 0.18);
  border-radius: 8px;
  color: hsl(0, 0%, 94%);
  font-size: 0.9rem;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.bk-sub-input-group input:focus {
  outline: none;
  border-color: hsl(28, 45%, 50%);
  background: hsla(28, 20%, 18%, 0.6);
  box-shadow: 0 0 10px hsla(28, 45%, 45%, 0.15);
}

.bk-sub-card-input-wrapper {
  position: relative;
  width: 100%;
}

.bk-sub-card-input-wrapper input {
  padding-right: 2.5rem;
}

.bk-sub-card-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsla(30, 15%, 75%, 0.4);
  font-size: 1rem;
}

.bk-sub-row {
  display: flex;
  gap: 1rem;
}

/* Submit Button */
.bk-sub-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, hsl(28, 45%, 50%) 0%, hsl(24, 50%, 42%) 100%);
  border: none;
  border-radius: 8px;
  color: hsl(0, 0%, 96%);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 15px hsla(24, 50%, 5%, 0.3);
  margin-top: 1rem;
  transition: all 0.25s ease;
}

.bk-sub-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px hsla(28, 45%, 45%, 0.25),
    0 0 15px hsla(28, 45%, 45%, 0.15);
  background: linear-gradient(135deg, hsl(28, 45%, 54%) 0%, hsl(24, 50%, 46%) 100%);
}

.bk-sub-submit-btn:active {
  transform: translateY(1px);
}

/* Loading Spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bkSubSpin 0.8s infinite linear;
}

@keyframes bkSubSpin {
  to { transform: rotate(360deg); }
}

.bk-sub-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: hsla(30, 10%, 75%, 0.4);
  margin-top: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Success Animation Overlay */
.bk-sub-success-overlay {
  position: absolute;
  inset: 0;
  background: hsl(24, 38%, 11%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  animation: bkSubFadeIn 0.4s ease forwards;
}

@keyframes bkSubFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bk-sub-success-content {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bk-sub-success-content h3 {
  font-size: 1.75rem;
  font-family: 'Playfair Display', serif;
  color: hsl(0, 0%, 94%);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.bk-sub-success-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: hsla(30, 15%, 85%, 0.7);
}

/* Circular green checkmark animated */
.bk-checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid hsl(142, 65%, 42%);
  display: inline-block;
  position: relative;
  animation: bkCheckCircle 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.bk-checkmark-draw {
  position: absolute;
  content: '';
  top: 40px;
  left: 20px;
  width: 15px;
  height: 30px;
  border-right: 4px solid hsl(142, 65%, 42%);
  border-bottom: 4px solid hsl(142, 65%, 42%);
  transform: rotate(45deg);
  transform-origin: 0% 100%;
  animation: bkCheckDraw 0.6s cubic-bezier(0.19, 1, 0.22, 1) 0.3s forwards;
  opacity: 0;
}

@keyframes bkCheckCircle {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bkCheckDraw {
  0% { height: 0; width: 0; opacity: 1; }
  40% { height: 0; width: 15px; opacity: 1; }
  100% { height: 30px; width: 15px; opacity: 1; }
}

/* Responsive Queries */
@media (max-width: 850px) {
  .bk-sub-modal {
    max-width: 500px;
    max-height: 95vh;
  }
  
  .bk-sub-grid {
    grid-template-columns: 1fr;
  }
  
  .bk-sub-left {
    display: none; /* Hide value prop on mobile to save vertical space */
  }
  
  .bk-sub-right {
    padding: 2rem;
  }
}
