/* ==========================================================================
   Milica Pre-Checkout Modal (FINAL GOLD MASTER - BIG THUMBNAIL VERSION)
   ========================================================================== */

/* --- 1. WRAPPER & BACKDROP --- */
.mlc-modal[hidden] { display: none; }
.mlc-modal { position: fixed; inset: 0; z-index: 99999; }
.mlc-backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 30, 35, 0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

/* --- 2. MAIN CARD --- */
.mlc-dialog {
  position: relative; max-width: 500px; margin: 8vh auto;
  /* Lux Gradient Border */
  background: linear-gradient(#ffffff, #ffffff) padding-box, 
              linear-gradient(135deg, #b08d3b 0%, #f3e6c8 50%, #c5a44d 100%) border-box;
  border: 1px solid transparent; border-radius: 24px; 
  padding: 45px 40px;
  box-shadow: 0 30px 90px rgba(197, 164, 77, 0.15);
  font-family: 'Karla', sans-serif; color: #2c3e50;
  animation: mlcFadeInUp 0.4s ease-out;
}
@keyframes mlcFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 3. CLOSE BUTTON --- */
.mlc-close {
  position: absolute; top: 15px; right: 15px;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: transparent; color: transparent !important; font-size: 0;
  cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden;
}
.mlc-close::before, .mlc-close::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 18px; height: 1.5px;
  background-color: #a0a0a0; transition: background-color 0.3s ease;
}
.mlc-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.mlc-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.mlc-close:hover { background: #fcfcfc; transform: rotate(90deg); }
.mlc-close:hover::before, .mlc-close:hover::after { background-color: #c5a44d; }

/* --- 4. TYPOGRAPHY --- */
.mlc-modal-title {
  font-family: 'Lora', serif !important; font-size: 28px; font-weight: 600;
  color: #111; 
  margin: 10px 0 10px; 
  text-align: center; letter-spacing: -0.5px;
}
.mlc-modal-sub {
  font-family: 'Karla', sans-serif; font-size: 15px; color: #666;
  text-align: center; margin: 0 0 30px; line-height: 1.5;
}

/* --- 5. ORDER SUMMARY (HERO THUMBNAIL VERSION) --- */
.mlc-order-summary[hidden] { display: none !important; }
.mlc-order-summary:not([hidden]) {
  display: block; margin-bottom: 30px; padding: 15px 20px;
  background-color: #fdfbf7; border: 1px solid #eaddc5; border-radius: 12px;
}

/* SKRIVAMO LABELU "ORDER SUMMARY" */
.mlc-order-summary-label { display: none !important; }

/* Red za proizvod */
.mlc-order-summary-row {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 20px; /* Veći razmak jer je slika ogromna */
  font-family: 'Karla', sans-serif; 
  font-size: 16px; 
  color: #2c3e50; 
  line-height: 1.4;
}

/* HERO SLIKA (80px) */
.mlc-order-thumb {
  display: block; 
  width: 80px;    /* OGROMNA SLIKA */
  height: 80px;
  border-radius: 12px; /* Malo veći radius za veću sliku */
  object-fit: cover;   
  border: 1px solid rgba(0,0,0,0.08);
  flex: 0 0 80px; /* Fiksna širina */
  background-color: #f0f0f0; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Dodao sam i malu senku za dubinu */
}

.mlc-order-title { 
  font-weight: 700; 
  font-size: 17px; /* Malo veći font */
  margin-right: auto; 
  padding-right: 15px; 
}

.mlc-order-price { 
  font-weight: 700; 
  color: #111; 
  white-space: nowrap; 
  font-size: 18px; /* Cena mora da "prati" veličinu slike */
}

/* --- 6. LOGGED IN BOX --- */
.mlc-logged-in-box {
  margin: 0 0 25px; padding: 15px 20px; border-radius: 12px;
  background: #fffbf2; border: 1px dashed #d1b88e;
  font-size: 15px; color: #555; text-align: center;
}
.mlc-logged-in-sub { margin-top: 5px; font-size: 13px; color: #888; }

/* --- 7. INPUT FIELDS --- */
.mlc-field { margin-bottom: 22px; }
.mlc-field label { 
  display: block; font-family: 'Karla', sans-serif;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: #999; margin-bottom: 8px; 
}
.mlc-field input {
  width: 100%; padding: 16px 18px; background-color: #fff;
  border: 1px solid #e0e0e0; border-radius: 12px;
  font-family: 'Karla', sans-serif; font-size: 16px; color: #333;
  outline: none; transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01); box-sizing: border-box; 
}
.mlc-field input:focus {
  background-color: #fff; border-color: #c5a44d;
  box-shadow: 0 0 0 4px rgba(197, 164, 77, 0.15);
}

/* --- 8. NEWSLETTER --- */
.mlc-optin {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.5; color: #555;
  margin: 15px 0 30px; cursor: pointer;
}

/* --- 8b. PROMO CODE (UX only) --- */
.mlc-promo { margin: -18px 0 22px; text-align: center; }
.mlc-promo-toggle {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #c5a44d;
  text-decoration: none;
}
.mlc-promo-toggle:hover { text-decoration: underline; }
.mlc-promo-body { margin-top: 12px; }
.mlc-promo-note { font-size: 12px; color: #777; text-align: center; margin-top: -2px; }
.mlc-optin input {
  margin-top: 3px; appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border: 1px solid #dcdcdc; border-radius: 4px;
  background: #fff; cursor: pointer; flex-shrink: 0; transition: all 0.2s; position: relative;
}
.mlc-optin input:checked { background-color: #c5a44d; border-color: #c5a44d; }
.mlc-optin input:checked::before {
  content: ''; position: absolute; top: 45%; left: 50%; width: 4px; height: 8px;
  border: solid white; border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg); display: block;
}

/* --- 9. CTA BUTTON (THEME DEFAULT) --- */
.mlc-submit {
  width: 100%; 
  display: block;
  cursor: pointer;
  margin-bottom: 0;
  /* Pustamo Kadence temu da stilizuje */
}
.mlc-submit.is-loading { opacity: 0.7; cursor: wait; }

/* --- 10. TRUST BADGE --- */
.mlc-trust-badge {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 18px; font-size: 12px; color: #9ca3af;
  font-family: 'Karla', sans-serif !important; opacity: 0.8;
}
.mlc-lock-icon { width: 10px; height: 10px; color: #9ca3af; margin-top: -1px; }
.mlc-trust-badge strong { font-weight: 700; color: #6b7280; }

/* --- 11. LOGIN HINT --- */
.mlc-login-hint {
  background-color: transparent !important; border: none !important; padding: 0 !important;
  margin: 30px 0 0 0 !important;
  text-align: center; font-size: 14px; color: #888; line-height: 1.5;
}
.mlc-login-hint strong {
  display: block !important; width: 100%;
  font-family: 'Lora', serif !important; font-size: 16px; font-style: italic; font-weight: 600;
  color: #444; margin-bottom: 4px;
}
.mlc-login-hint a {
  color: #c5a44d; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid transparent; transition: all 0.2s;
}
.mlc-login-hint a:hover { border-bottom-color: #c5a44d; }

/* --- 12. MESSAGES --- */
.mlc-msg { margin-top: 15px; font-size: 14px; text-align: center; min-height: 20px; font-weight: 500; }
.mlc-msg.is-error { color: #c0392b; }
.mlc-msg.is-ok { color: #27ae60; }
body.mlc-modal-open { overflow: hidden; }

/* --- 13. ALREADY OWNED STATE (Sakriva dugme ako već imaju kurs) --- */
.mlc-precheckout.mlc-owned .mlc-submit,
.mlc-precheckout.mlc-owned .mlc-optin,
.mlc-precheckout.mlc-owned .mlc-trust-badge {
  display: none !important;
}

/* --- 14. LOADING MESSAGE (NOVO) --- */
.mlc-access-loading {
  margin-top: 10px;
  font-size: 14px;
  opacity: .75;
  text-align: center; /* Opciono: da bude centrirano kao i ostale poruke */
}

/* ==========================================================================
   MOBILE OPTIMIZATION (COMPACT & TIGHT)
   ========================================================================== */
@media (max-width: 520px) {
  .mlc-dialog {
    margin: 4vh 15px;
    padding: 25px 20px;
    border-radius: 20px;
  }
  
  /* Naslov */
  .mlc-modal-title { font-size: 24px; margin: 15px 0 10px; }
  .mlc-modal-sub { font-size: 14px; margin-bottom: 15px; }
  
  /* ZATEZANJE RAZMAKA */
  .mlc-order-summary:not([hidden]) { 
      margin-bottom: 10px !important; 
      padding: 12px 15px; 
  }
  .mlc-order-summary-row { font-size: 14px; }
  
  /* Polja za unos */
  .mlc-field { 
      margin-bottom: 10px !important; 
  }
  .mlc-field input { padding: 14px; }
  
  /* Optin Newsletter */
  .mlc-optin { 
      margin: 5px 0 15px !important;
      font-size: 13px; 
  }
  
  /* Dugme */
  .mlc-submit { 
      padding: 12px 5px !important; 
      font-size: 13px !important; 
      min-height: 44px;
      letter-spacing: 0.5px !important;
  }
  
  .mlc-login-hint { margin-top: 15px !important; }
}