/* =========================================================
   GMR Secure Checkout Login - Premium Responsive Styling
   Version: 1.0.4
   Colors: #2a6ef5 / #0ec9a4
========================================================= */

:root {
  --gmr-blue: #2a6ef5;
  --gmr-blue-dark: #1f5fd9;
  --gmr-green: #0ec9a4;
  --gmr-dark: #101828;
  --gmr-text: #344054;
  --gmr-muted: #667085;
  --gmr-light: #f7f9fc;
  --gmr-card: #ffffff;
  --gmr-border: #e6eaf0;
  --gmr-shadow: 0 24px 70px rgba(16, 24, 40, 0.08);
}

.gmr-scl-page {
  font-family: "Poppins", Arial, sans-serif !important;
  color: var(--gmr-dark);
}

.gmr-scl-page,
body .gmr-scl-page {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  padding: 26px 18px 72px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 10% 0%, rgba(42,110,245,.08), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(14,201,164,.10), transparent 26%),
    #f7f9fc;
  font-family: "Poppins", Arial, sans-serif !important;
  overflow-x: hidden;
}

.gmr-scl-top-text {
  max-width: 1340px;
  margin: 0 auto 34px;
  color: #5d6678;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
}

.gmr-scl-layout {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: clamp(24px, 4vw, 50px);
  align-items: start;
}

.gmr-scl-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(230,234,240,.96);
  border-radius: 24px;
  box-shadow: var(--gmr-shadow);
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gmr-scl-login-card {
  min-height: 530px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 6vw, 70px) 24px;
}

.gmr-scl-login-inner {
  width: 100%;
  max-width: 390px;
  text-align: center;
}

.gmr-scl-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gmr-blue);
  background: linear-gradient(180deg, #fff, #f4f7ff);
  border: 1px solid #e3e9f7;
  box-shadow: 0 12px 30px rgba(42,110,245,.10);
}

.gmr-scl-login-inner h1 {
  font-family: "Anek Telugu", Arial, sans-serif !important;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.14;
  margin: 0 0 10px;
  color: #070b14;
  font-weight: 800;
  letter-spacing: -.02em;
}

.gmr-scl-login-inner p {
  max-width: 370px;
  margin: 0 auto 28px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--gmr-muted);
}

.gmr-scl-form {
  display: grid;
  gap: 14px;
  width: 100%;
}

.gmr-scl-form input[type="email"],
.gmr-scl-form input {
  width: 100% !important;
  height: 50px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  border: 1px solid #d9e0eb !important;
  background: #fff !important;
  color: #101828 !important;
  font-family: "Poppins", Arial, sans-serif !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.gmr-scl-form input:focus {
  border-color: var(--gmr-blue) !important;
  box-shadow: 0 0 0 4px rgba(42,110,245,.12) !important;
}

.gmr-scl-form button,
.gmr-scl-form button[type="submit"] {
  width: 100% !important;
  height: 50px !important;
  padding: 0 18px !important;
  border: none !important;
  border-radius: 5px !important;
  background: #2a6ef5 !important;
  color: #fff !important;
  font-family: "Anek Telugu", Arial, sans-serif !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 16px 34px rgba(42,110,245,.24) !important;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease !important;
}

.gmr-scl-form button:hover {
  background: #1f5fd9 !important;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(42,110,245,.30) !important;
}

.gmr-scl-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

.gmr-scl-success {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #05603a;
}

.gmr-scl-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}

/* Order summary */
.gmr-scl-summary-wrap {
  width: 100%;
  box-sizing: border-box;
}

.gmr-scl-summary {
  overflow: hidden;
}

.gmr-scl-summary-head,
.gmr-scl-item,
.gmr-scl-promo,
.gmr-scl-totals,
.gmr-scl-total {
  padding-left: 24px;
  padding-right: 24px;
}

.gmr-scl-summary-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--gmr-border);
}

.gmr-scl-summary-head strong {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.gmr-scl-summary-head span {
  font-size: 13px;
  color: var(--gmr-muted);
  white-space: nowrap;
}

.gmr-scl-items {
  width: 100%;
}

.gmr-scl-item {
  min-height: 104px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--gmr-border);
}

.gmr-scl-thumb {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14,201,164,.20), rgba(42,110,245,.10));
  border: 1px solid rgba(230,234,240,.9);
  box-sizing: border-box;
}

.gmr-scl-thumb img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

.gmr-scl-item-info {
  min-width: 0;
}

.gmr-scl-item-info h3,
.gmr-scl-item h3 {
  margin: 0 0 7px;
  font-family: "Anek Telugu", Arial, sans-serif !important;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
  word-break: break-word;
}

.gmr-scl-item-info small,
.gmr-scl-item small {
  color: var(--gmr-muted);
  font-size: 12px;
}

.gmr-scl-item > strong {
  font-size: 17px;
  color: #05070b;
  font-weight: 800;
  white-space: nowrap;
}

.gmr-scl-promo {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  border-bottom: 1px solid var(--gmr-border);
}

.gmr-scl-promo strong {
  font-size: 14px;
  font-weight: 700;
}

.gmr-scl-totals {
  padding-top: 18px;
  padding-bottom: 18px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--gmr-border);
}

.gmr-scl-totals div,
.gmr-scl-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.gmr-scl-totals span {
  color: #5f6878;
  font-size: 13px;
}

.gmr-scl-totals strong {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.gmr-scl-free {
  color: #079455 !important;
}

.gmr-scl-total {
  padding-top: 19px;
  padding-bottom: 24px;
}

.gmr-scl-total strong {
  font-size: 19px;
  font-weight: 900;
  color: #070b14;
}

.gmr-scl-secure {
  height: 46px;
  margin-top: 16px;
  border: 1px solid rgba(230,234,240,.96);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 14px 34px rgba(16,24,40,.05);
}

.gmr-scl-empty {
  padding: 24px;
  margin: 0;
  color: var(--gmr-muted);
}

.gmr-scl-shortcode-redirect a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 5px;
  background: #2a6ef5;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* Tablet */
@media (max-width: 1100px) {
  .gmr-scl-layout {
    grid-template-columns: 1fr !important;
    max-width: 760px;
    gap: 24px;
  }

  .gmr-scl-login-card {
    min-height: auto;
  }

  .gmr-scl-summary-wrap {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .gmr-scl-page,
  body .gmr-scl-page {
    padding: 18px 12px 42px !important;
  }

  .gmr-scl-top-text {
    margin-bottom: 18px;
    padding: 0 2px;
    font-size: 13px;
  }

  .gmr-scl-card {
    border-radius: 18px;
  }

  .gmr-scl-login-card {
    padding: 42px 16px !important;
  }

  .gmr-scl-login-inner {
    max-width: 100%;
  }

  .gmr-scl-icon {
    width: 54px;
    height: 54px;
  }

  .gmr-scl-login-inner h1 {
    font-size: 24px;
  }

  .gmr-scl-login-inner p {
    font-size: 12.5px;
    margin-bottom: 22px;
  }

  .gmr-scl-summary-head,
  .gmr-scl-item,
  .gmr-scl-promo,
  .gmr-scl-totals,
  .gmr-scl-total {
    padding-left: 16px;
    padding-right: 16px;
  }

  .gmr-scl-summary-head {
    min-height: 64px;
  }

  .gmr-scl-item {
    min-height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .gmr-scl-thumb {
    width: 58px;
    height: 58px;
    border-radius: 12px;
  }

  .gmr-scl-item h3 {
    font-size: 14px;
  }

  .gmr-scl-item > strong {
    font-size: 14px;
  }

  .gmr-scl-totals div,
  .gmr-scl-total {
    align-items: flex-start;
  }

  .gmr-scl-secure {
    height: 44px;
  }
}

/* Small mobile */
@media (max-width: 430px) {
  .gmr-scl-page,
  body .gmr-scl-page {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .gmr-scl-layout {
    gap: 16px;
  }

  .gmr-scl-form input,
  .gmr-scl-form button {
    height: 47px !important;
  }

  .gmr-scl-summary-head,
  .gmr-scl-item,
  .gmr-scl-promo,
  .gmr-scl-totals,
  .gmr-scl-total {
    padding-left: 14px;
    padding-right: 14px;
  }

  .gmr-scl-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .gmr-scl-item > strong {
    grid-column: 2;
    justify-self: start;
    margin-top: -3px;
  }

  .gmr-scl-thumb {
    width: 54px;
    height: 54px;
  }

  .gmr-scl-total strong {
    font-size: 17px;
  }
}


/* Final update: plugin content only, do not hide website header/footer */
.gmr-scl-page {
  isolation: isolate;
}

.gmr-scl-page * {
  box-sizing: border-box;
}

.gmr-scl-form button,
.gmr-scl-form button[type="submit"] {
  background: #2a6ef5 !important;
  border-radius: 5px !important;
}

.gmr-scl-success {
  text-align: center;
  font-weight: 600;
}


/* =========================================================
   Final Class-Based Checkout Visibility
   User classes:
   .checkout-for-non-logged-in-user
   .checkout-for-logged-in-user
========================================================= */

/* Default: protect both sections until WordPress body class decides */
.checkout-for-non-logged-in-user,
.checkout-for-logged-in-user {
  transition: opacity .2s ease;
}

/* Logged-out users: show secure form section, hide normal checkout sections */
body:not(.logged-in) .checkout-for-logged-in-user {
  display: none !important;
}

body:not(.logged-in) .checkout-for-non-logged-in-user {
  display: block !important;
}

/* Logged-in users: show normal checkout sections, hide secure form section */
body.logged-in .checkout-for-non-logged-in-user {
  display: none !important;
}

body.logged-in .checkout-for-logged-in-user {
  display: block !important;
}

/* Shortcode output should not force full page dependency */
.gmr-scl-page {
  width: 100%;
  max-width: 100%;
  min-height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  font-family: "Poppins", Arial, sans-serif !important;
  overflow-x: hidden;
}

/* Keep existing form/order summary layout clean inside Elementor checkout section */
.gmr-scl-layout {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
}

/* Remove product thumbnail from order summary */
.gmr-scl-thumb {
  display: none !important;
}

.gmr-scl-item {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

/* Button remains as requested */
.gmr-scl-form button,
.gmr-scl-form button[type="submit"] {
  background: #2a6ef5 !important;
  border-radius: 5px !important;
}

/* Avoid theme/Elementor button conflicts */
.gmr-scl-form input,
.gmr-scl-form button {
  box-sizing: border-box !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .gmr-scl-layout {
    grid-template-columns: 1fr !important;
    max-width: 760px;
  }
}

@media (max-width: 767px) {
  .gmr-scl-layout {
    gap: 18px !important;
  }

  .gmr-scl-login-card {
    padding: 42px 16px !important;
  }

  .gmr-scl-item {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
  }

  .gmr-scl-item > strong {
    grid-column: auto !important;
    justify-self: end !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 430px) {
  .gmr-scl-item {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .gmr-scl-item > strong {
    grid-column: 1 !important;
    justify-self: start !important;
    margin-top: 2px !important;
  }
}


/* =========================================================
   Final responsive polish - order summary + product title
   Keeps all functionality unchanged
========================================================= */

.gmr-scl-page,
.gmr-scl-page * {
  box-sizing: border-box !important;
}

.gmr-scl-page {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Better desktop responsive layout */
.gmr-scl-layout {
  width: 100% !important;
  max-width: 1340px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px) !important;
  gap: clamp(24px, 3.5vw, 48px) !important;
  align-items: start !important;
}

/* Make cards fit properly */
.gmr-scl-login-card,
.gmr-scl-summary-wrap,
.gmr-scl-summary,
.gmr-scl-card {
  width: 100% !important;
  max-width: 100% !important;
}

/* Order summary product title: black + requested font */
.gmr-scl-item h3,
.gmr-scl-item-info h3,
.gmr-scl-summary .gmr-scl-item h3,
.gmr-scl-summary .gmr-scl-item-info h3 {
  color: #000000 !important;
  font-family: "Anek Telugu", Arial, sans-serif !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin: 0 0 6px !important;
}

/* Order summary clean alignment without thumbnail */
.gmr-scl-item {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: center !important;
}

.gmr-scl-thumb {
  display: none !important;
}

.gmr-scl-item-info {
  min-width: 0 !important;
}

.gmr-scl-item > strong {
  white-space: nowrap !important;
  text-align: right !important;
}

/* Laptop / small desktop */
@media (max-width: 1200px) {
  .gmr-scl-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px) !important;
    gap: 28px !important;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .gmr-scl-layout {
    grid-template-columns: 1fr !important;
    max-width: 760px !important;
    gap: 24px !important;
  }

  .gmr-scl-login-card {
    min-height: auto !important;
  }

  .gmr-scl-summary-wrap {
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .gmr-scl-layout {
    max-width: 100% !important;
    gap: 18px !important;
  }

  .gmr-scl-login-card {
    padding: 38px 16px !important;
  }

  .gmr-scl-summary-head,
  .gmr-scl-item,
  .gmr-scl-promo,
  .gmr-scl-totals,
  .gmr-scl-total {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .gmr-scl-item {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }

  .gmr-scl-item h3,
  .gmr-scl-item-info h3 {
    font-size: 14px !important;
  }

  .gmr-scl-item > strong {
    font-size: 14px !important;
    justify-self: end !important;
  }
}

/* Small mobile */
@media (max-width: 430px) {
  .gmr-scl-login-card {
    padding: 34px 14px !important;
  }

  .gmr-scl-summary-head,
  .gmr-scl-item,
  .gmr-scl-promo,
  .gmr-scl-totals,
  .gmr-scl-total {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .gmr-scl-item {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  .gmr-scl-item > strong {
    justify-self: start !important;
    text-align: left !important;
    margin-top: 0 !important;
  }
}
