/* ============================================================
   Auth popups — Login & Signup centred modals  (layout 2)
   Field, button and signup-map rules are the layout 9 panel's; the
   shell below turns its slide-in sidebar into a modal.
   ============================================================ */

/* ── Overlay ── */
.v2-auth-overlay {
   display: none;
   position: fixed;
   inset: 0;
   background: rgba(10, 18, 30, 0.72);
   backdrop-filter: blur(2px);
   -webkit-backdrop-filter: blur(2px);
   z-index: 10000;
   transition: opacity 0.28s;
}
.v2-auth-overlay.is-active {
   display: block;
}

/* ── Modal shell ── */
.v2-auth-panel {
   position: fixed;
   top: 50%;
   left: 50%;
   width: 460px;
   max-width: calc(100vw - 24px);
   max-height: calc(100vh - 32px);
   background: #fff;
   z-index: 10001;
   display: flex;
   flex-direction: column;
   overflow: hidden;
   border-radius: 20px;
   box-shadow: 0 24px 70px rgba(10, 28, 18, 0.28);
   opacity: 0;
   visibility: hidden;
   pointer-events: none;
   transform: translate(-50%, -46%) scale(0.97);
   transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.3s;
}
.v2-auth-panel.is-open {
   opacity: 1;
   visibility: visible;
   pointer-events: auto;
   transform: translate(-50%, -50%) scale(1);
   transition-delay: 0s;
}
.after-icon {
    top: 16px;
}
/* ── Branded header strip ── */
/* ── Branded header strip ── */
.v2-auth-panel__header {
   position: relative;
   background: var(--v2-primary, var(--default-color, #7fad39));
   padding: 24px 24px 44px 24px;
   flex-shrink: 0;
}
.v2-auth-panel__header::after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   height: 22px;
   background: #fff;
   clip-path: ellipse(55% 100% at 50% 100%);
}
.v2-auth-panel__title {
   font-size: 24px;
   font-weight: 700;
   color: #fff;
   margin: 0 0 4px;
   letter-spacing: -0.3px;
}
.v2-auth-panel__subtitle {
   font-size: 13px;
   color: rgba(255,255,255,0.82);
   margin: 0;
}

/* ── Close button ── */
.v2-auth-panel__close {
   position: absolute;
   top: 14px;
   right: 14px;
   background: rgba(255,255,255,0.2);
   border: none;
   cursor: pointer;
   color: #fff;
   z-index: 2;
   width: 34px;
   height: 34px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   transition: background 0.2s;
   font-size: 16px;
}
.v2-auth-panel__close:hover {
   background: rgba(255,255,255,0.38);
}

/* ── Scrollable body — sits cleanly below header ── */
.v2-auth-panel__body {
   flex: 1;
   overflow-y: auto;
   padding: 0 28px 32px;
   scroll-behavior: smooth;
}
.v2-auth-panel__body::-webkit-scrollbar {
   width: 4px;
}
.v2-auth-panel__body::-webkit-scrollbar-thumb {
   background: #ddd;
   border-radius: 4px;
}

/* ══════════════════════════════════════════════
   Login panel — premium layout
   ══════════════════════════════════════════════ */
#v2-login-panel {
   display: flex;
   flex-direction: column;
}
#v2-login-panel .v2-auth-panel__body {
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
   gap: 18px;
   padding: 22px 28px 32px;
}

/* Form card */
.login-panel-card {
   background: #fff;
   border-radius: 16px;
   border: 1px solid #eef0f5;
   box-shadow: 0 4px 20px rgba(0,0,0,0.06);
   padding: 24px 22px 20px;
}

/* Field icon prefix in labels */
.login-field-icon {
   color: var(--default-color, #7fad39);
   margin-right: 5px;
   font-size: 12px;
}


.login-panel-trust i {
   color: var(--default-color, #7fad39);
   font-size: 13px;
}

/* ── Form base resets ── */
.v2-auth-panel #adminupload,
.v2-auth-panel .inner-backgroud {
   padding: 0 !important;
   box-shadow: none !important;
   background: transparent !important;
   max-width: 100% !important;
}

/* ── Input & select fields ── */
.v2-auth-panel .form-control,
.v2-auth-panel input[type="text"],
.v2-auth-panel input[type="email"],
.v2-auth-panel input[type="password"],
.v2-auth-panel input[type="number"],
.v2-auth-panel select,
.v2-auth-panel textarea {
   border: 1.5px solid #e2e6ea;
   border-radius: 10px;
   height: 46px;
   font-size: 14px;
   padding: 10px 14px;
   color: #222;
   background: #f9fafb;
   transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
   width: 100%;
   box-sizing: border-box;
}
/* Native select — custom arrow, no browser default */
.v2-auth-panel select {
   appearance: none;
   -webkit-appearance: none;
   -moz-appearance: none;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 14px center;
   padding-right: 36px;
   cursor: pointer;
}
.v2-auth-panel textarea {
   height: auto !important;
   min-height: 80px;
   resize: vertical;
}
.v2-auth-panel .form-control:focus,
.v2-auth-panel input:focus,
.v2-auth-panel select:focus,
.v2-auth-panel textarea:focus {
   border-color: var(--default-color, #7fad39);
   box-shadow: 0 0 0 3px rgba(127,173,57,0.12);
   background: #fff;
   outline: none;
}
.v2-auth-panel label {
   font-size: 12.5px;
   font-weight: 600;
   color: #555;
   margin-bottom: 5px;
   letter-spacing: 0.02em;
   text-transform: uppercase;
   display: block;
}

/* ── Two-column row inside panel (col-6 grid) ── */
.v2-auth-panel .form-row {
   display: flex;
   flex-wrap: wrap;
   margin-left: -8px;
   margin-right: -8px;
}
.v2-auth-panel .form-row > .col-6,
.v2-auth-panel .form-row > .col-md-6 {
   flex: 0 0 50%;
   max-width: 50%;
   padding-left: 8px;
   padding-right: 8px;
   box-sizing: border-box;
}
.v2-auth-panel .form-row > .col-12,
.v2-auth-panel .form-row > .col-sm-12,
.v2-auth-panel .form-row > .col-md-12 {
   flex: 0 0 100%;
   max-width: 100%;
   padding-left: 8px;
   padding-right: 8px;
   box-sizing: border-box;
}
/* Prevent select2 widgets from injecting into the panel */
.v2-auth-panel .select2-container {
   display: none !important;
}
.v2-auth-panel select.select2-hidden-accessible {
   display: block !important;
   visibility: visible !important;
   position: static !important;
   width: 100% !important;
   height: 46px !important;
   opacity: 1 !important;
   clip: unset !important;
   clip-path: unset !important;
}

/* ── OTP digit inputs ── */
.v2-auth-panel .digit-group {
   display: flex;
   flex-wrap: nowrap;
   align-items: center;
   justify-content: space-between;
   gap: clamp(4px, 1.5vw, 8px);
   width: 100%;
}
.v2-auth-panel .digit-group input {
   width: 100% !important;
   max-width: 52px;
   min-width: 0;
   aspect-ratio: 1 / 1;
   height: auto;
   flex: 1 1 0;
   border-radius: 10px;
   border: 1.5px solid #e2e6ea;
   background: #f4f6f8;
   color: #111;
   font-size: clamp(16px, 4vw, 20px);
   font-weight: 600;
   text-align: center;
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   transition: border-color 0.2s, box-shadow 0.2s;
}
.v2-auth-panel .digit-group input:focus {
   border-color: var(--default-color, #7fad39);
   box-shadow: 0 0 0 3px rgba(127,173,57,0.15);
   background: #fff;
   outline: none;
}
/* Hide the native number-input spinner arrows on the OTP boxes */
.v2-auth-panel .digit-group input::-webkit-outer-spin-button,
.v2-auth-panel .digit-group input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
}
.v2-auth-panel .digit-group input {
   -moz-appearance: textfield;
   appearance: textfield;
}
.v2-auth-panel .digit-group .splitter {
   flex: 0 0 auto;
   color: #aaa;
   font-size: 20px;
   padding: 0 2px;
}

/* ── Buttons ── */
.v2-auth-panel .site-btn,
.v2-auth-panel .btn.site-btn {
   background: var(--default-color, #7fad39);
   color: #fff;
   border: none;
   border-radius: 10px;
   font-size: 15px;
   font-weight: 600;
   padding: 13px 20px;
   cursor: pointer;
   transition: opacity 0.2s, transform 0.15s;
   letter-spacing: 0.01em;
}
.v2-auth-panel .site-btn:hover {
   opacity: 0.88;
   transform: translateY(-1px);
   color: #fff;
}
.v2-auth-panel .site-btn:active {
   transform: translateY(0);
}

/* ── OR divider ── */
.v2-auth-panel .or-line {
   position: relative;
   text-align: center;
   margin: 18px 0;
   color: #aaa;
   font-size: 13px;
}
.v2-auth-panel .or-line::before,
.v2-auth-panel .or-line::after {
   content: '';
   position: absolute;
   top: 50%;
   width: 40%;
   height: 1px;
   background: #e8e8e8;
}
.v2-auth-panel .or-line::before { left: 0; }
/* style_modern.css also styles .or-line:after (left:0, full width, translateY, #ddd border); reset that so the
   right-hand rule really sits on the right instead of stacking on the left one */
.v2-auth-panel .or-line::after  { right: 0; left: auto; transform: none; border: 0; }
.v2-auth-panel .or-line span {
   background: #fff;
   padding: 0 10px;
   position: relative;
   z-index: 1;
}

/* ── Switch link (Don't have an account / Already have) ── */
.v2-auth-panel__switch {
   text-align: center;
   margin-top: 20px;
   padding-top: 18px;
   border-top: 1px solid #f0f0f0;
   font-size: 13.5px;
   color: #666;
}
.v2-auth-panel__switch a {
   color: var(--default-color, #7fad39);
   font-weight: 700;
   text-decoration: none;
}
.v2-auth-panel__switch a:hover {
   text-decoration: underline;
}

/* ── Forgot password link ── */
.v2-auth-panel .forgot_password {
   font-size: 13px;
   color: var(--default-color, #7fad39) !important;
   font-weight: 600;
   text-decoration: none !important;
   display: block;
   text-align: right;
   margin-top: 4px;
   margin-bottom: 4px;
}
.v2-auth-panel .forgot_password:hover {
   text-decoration: underline !important;
}

/* ── Forgot password inline section ── */
.v2-auth-panel__forgot {
   background: #f8f9fa;
   border-radius: 14px;
   padding: 24px;
   margin-top: 24px;
   border: 1px solid #eee;
}
.v2-auth-panel__forgot-title {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-bottom: 12px;
}
.v2-auth-panel__forgot-title h5 {
   margin: 0;
   font-size: 16px;
   font-weight: 700;
   color: #222;
}
.v2-auth-panel__back-btn {
   background: rgba(0,0,0,0.06);
   border: none;
   border-radius: 50%;
   width: 32px;
   height: 32px;
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   color: #555;
   font-size: 14px;
   transition: background 0.2s;
   flex-shrink: 0;
}
.v2-auth-panel__back-btn:hover {
   background: rgba(0,0,0,0.12);
}

/* ── reCAPTCHA responsive ── */
.v2-auth-panel .recaptcha-responsive {
   transform-origin: left center;
}
@media (max-width: 400px) {
   .v2-auth-panel .recaptcha-responsive {
      transform: scale(0.88);
   }
}

/* ── Section divider label (signup) ── */
.v2-auth-panel__section-label {
   font-size: 11px;
   font-weight: 700;
   letter-spacing: 0.1em;
   text-transform: uppercase;
   color: var(--default-color, #7fad39);
   margin: 0 0 10px;
   display: flex;
   align-items: center;
   gap: 8px;
}
.v2-auth-panel__section-label::after {
   content: '';
   flex: 1;
   height: 1px;
   background: #eee;
}

/* ── Map canvas ── */
/* Map canvas inside the signup panel. Panel-scoped id so it cannot clash with a page's own map. */
.v2-auth-panel #signup-map-canvas {
   width: 100%;
   height: 260px !important;
   border-radius: 10px;
   border: 1.5px solid #e2e6ea;
   overflow: visible;
   margin-bottom: 16px;
   background: #f0f0f0;
   position: relative;
}

/* ── Terms checkbox ── */
.v2-auth-panel .term-condition-font,
.v2-auth-panel [for="signup_agree"] {
   font-size: 13px;
   color: #555;
   font-weight: 400;
   text-transform: none;
   letter-spacing: 0;
}
.v2-auth-panel [for="signup_agree"] a {
   color: var(--default-color, #7fad39);
   font-weight: 600;
}

/* ── Timer text ── */
.v2-auth-panel #timerTxt {
   font-size: 12.5px;
   color: #888;
}


/* ── Signup panel two-column layout ── */
/* Override base body: no own scroll, pass height down to children */
#v2-signup-panel .v2-auth-panel__body {
    padding: 0;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
}
/* The <form> wrapping the two-col layout must also stretch to fill remaining body height */
#v2-signup-panel .v2-auth-panel__body > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

/* Two-col wrapper fills all remaining body height */
.signup-twocol-wrap {
    display: flex;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}
/* LEFT: map column — fixed width, map stretches to fill */
.signup-col-left {
    width: 55%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 16px 20px 20px;
    border-right: 1px solid #e2e6ea;
    min-height: 0;
}
.signup-col-left #signup-map-canvas {
    flex: 1 1 0;
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 0;
}
/* RIGHT: form column — scrollable area + sticky footer */
.signup-col-right {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.signup-col-right .signup-form-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 16px;
}
.signup-col-right .signup-form-footer {
    flex: 0 0 auto;
    padding: 14px 24px 20px;
    border-top: 1px solid #e2e6ea;
    background: #fff;
}

/* ── Mobile: single-column fully scrollable layout ── */
@media (max-width: 800px) {
    /* Hide "Drag the pin to your exact location" infowindow on mobile */
    #v2-signup-panel .gm-style .gm-style-iw-c,
    #v2-signup-panel .gm-style .gm-style-iw-t,
    #v2-signup-panel .gm-style .gm-style-iw-tc {
        display: none !important;
    }
    /* Let the body scroll freely — no more flex overflow trap */
    #v2-signup-panel .v2-auth-panel__body {
        overflow-y: auto !important;
        display: block !important;
        padding: 0 !important;
    }
    #v2-signup-panel .v2-auth-panel__body > form {
        display: block !important;
        overflow: visible !important;
    }
    /* Stack map above form in a single scrollable column */
    .signup-twocol-wrap {
        flex-direction: column;
        overflow: visible !important;
        min-height: unset;
        flex: none;
    }
    /* Map: fixed height, doesn't stretch to fill viewport */
    .signup-col-left {
        width: 100%;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid #e2e6ea;
        padding: 16px 20px;
        height: 320px !important;
        min-height: unset;
    }
    .signup-col-left #signup-map-canvas {
        height: 280px !important;
        min-height: unset !important;
        flex: none !important;
    }
    /* Form column: natural height, no inner scroll */
    .signup-col-right {
        flex: none;
        overflow: visible !important;
        min-height: unset;
        height: auto;
    }
    .signup-col-right .signup-form-scroll {
        overflow-y: visible !important;
        flex: none;
        min-height: unset;
        padding: 0 20px 16px;
    }
    /* Sticky footer becomes static on mobile */
    .signup-col-right .signup-form-footer {
        position: static;
        padding: 14px 20px 24px;
    }
}


/* Signup popup: large two-column card (map + form), fixed height so the form column scrolls. */
#v2-signup-panel {
    width: min(96vw, 1280px);
    height: min(92vh, 860px);
}

/* Google Places autocomplete dropdown must appear above the popup */
.pac-container {
    z-index: 10100 !important;
}

/* Small screens: popups become near-full-height sheets. */
@media (max-width: 800px) {
    #v2-signup-panel {
        width: calc(100vw - 24px);
        height: calc(100vh - 24px);
    }
}
/* Phones: popups stay centred (same open / close motion as desktop), just a little wider. */
@media (max-width: 520px) {
    .v2-auth-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }
    #v2-signup-panel { width: calc(100vw - 24px); height: calc(100vh - 24px); }
    #v2-login-panel .v2-auth-panel__body { padding-top: 24px !important; }
}

/* Login popup: the alternate method is a secondary action, set apart by an "or" rule */
#v2-login-panel #login_with_password:not(.hide),
#v2-login-panel #login_with_number:not(.hide) {
  position: relative;
  margin-top: 22px;
  background: #fff;
  color: var(--v2-primary);
  box-shadow: none;
}

#v2-login-panel #login_with_password:not(.hide)::before,
#v2-login-panel #login_with_number:not(.hide)::before {
  content: "or";
  position: absolute;
  top: -22px;
  left: 50%;
  padding: 0 10px;
  background: #fff;
  color: var(--v2-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  transform: translateX(-50%);
}

#v2-login-panel #login_with_password:not(.hide):hover,
#v2-login-panel #login_with_number:not(.hide):hover {
  background: var(--v2-primary-soft);
  color: var(--v2-primary-dark);
  box-shadow: none;
  transform: none;
}

#v2-login-panel #login_with_password:not(.hide)::after,
#v2-login-panel #login_with_number:not(.hide)::after {
  content: "";
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--v2-line);
}

#v2-login-panel #login_with_password:not(.hide)::before,
#v2-login-panel #login_with_number:not(.hide)::before { z-index: 1; }

/* When the markup already has an OR divider (.or-line) the button must not draw a second "or" rule above itself */
#v2-login-panel .or-line ~ #login_with_password:not(.hide),
#v2-login-panel .or-line ~ #login_with_number:not(.hide) { margin-top: 0; }
#v2-login-panel .or-line ~ #login_with_password:not(.hide)::before,
#v2-login-panel .or-line ~ #login_with_password:not(.hide)::after,
#v2-login-panel .or-line ~ #login_with_number:not(.hide)::before,
#v2-login-panel .or-line ~ #login_with_number:not(.hide)::after { content: none; }

/* Signup popup on phones: breathing room above "Personal Info" and on both sides of the form */
@media (max-width: 800px) {
    #v2-signup-panel .signup-col-left { padding: 16px 16px 14px !important; height: auto !important; }
    #v2-signup-panel .signup-col-left #signup-map-canvas { height: 240px !important; }
    #v2-signup-panel .signup-col-right .signup-form-scroll { padding: 22px 18px 18px !important; }
    #v2-signup-panel .v2-auth-panel__section-label { margin: 0 0 14px; }
    #v2-signup-panel .v2-auth-panel__section-label:not(:first-child) { margin-top: 22px; }
    #v2-signup-panel .signup-col-right .signup-form-footer { padding: 16px 18px 24px; }
}

/* Login popup: equal space above and below the "OR" divider. The Login button's own bottom margin (mb-3) stacked on the
   divider margin, so the gap above was bigger than the gap below; the divider alone now sets both. */
/* the row clears the floated "Forgot Password?" link above it, so the Login button never sits beside/under it */
#v2-login-panel .login-btn-row { clear: both; }
#v2-login-panel .login-btn-row:has(+ .or-line) .site-btn:not(.hide) { display: block; }
#v2-login-panel .login-btn-row:has(+ .or-line) .site-btn { margin-bottom: 0 !important; }
#v2-login-panel .or-line { margin: 22px 0 !important; line-height: 1; }
#v2-login-panel .or-line ~ #login_with_password:not(.hide),
#v2-login-panel .or-line ~ #login_with_number:not(.hide) { margin-top: 0 !important; }
