/* Enviro-Smart Installations — account modal. All selectors .esa-* to avoid theme clashes. */
html.esa-lock { overflow: hidden; }

.esa-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(20, 30, 22, .55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.esa-overlay.open { opacity: 1; visibility: visible; }

.esa-modal {
  background: #faf5ea; width: calc(100% - 32px); max-width: 420px;
  border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  padding: 26px 24px 28px; position: relative;
  transform: translateY(16px); transition: transform .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #1c3a26; box-sizing: border-box; max-height: 92vh; overflow-y: auto;
}
.esa-overlay.open .esa-modal { transform: none; }

@media (max-width: 520px) {
  .esa-overlay { align-items: flex-end; }
  .esa-modal { width: 100%; max-width: none; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .esa-overlay.open .esa-modal { transform: none; }
}

.esa-x { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 26px; line-height: 1; color: #6b7d6f; cursor: pointer; padding: 4px; }
.esa-logo { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #4a7d5a; font-weight: 700; }
.esa-head h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 800; color: #1c3a26; }
.esa-sub { margin: 0 0 16px; font-size: 14px; color: #6b7d6f; line-height: 1.5; }
.esa-banner { background: #eef4ef; border: 1px solid #cfe0d4; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 16px; line-height: 1.45; }
.esa-banner b { text-transform: capitalize; }

.esa-field { display: block; font-size: 13px; font-weight: 600; margin: 0 0 13px; }
.esa-field input, .esa-field select { width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid #cdbfa6; border-radius: 10px; font-size: 16px; box-sizing: border-box; background: #fff; color: #1c3a26; }
.esa-field input:focus, .esa-field select:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45, 90, 61, .15); }
.esa-field input[type="file"] { padding: 9px 10px; font-size: 14px; }
.esa-row { display: flex; gap: 10px; }
.esa-row .esa-field { flex: 1; }
.esa-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #46564a; margin: 2px 0 16px; cursor: pointer; }
.esa-prodset { border: 1px solid #cdbfa6; border-radius: 10px; padding: 8px 12px 6px; margin: 0 0 13px; }
.esa-prodset legend { font-size: 13px; font-weight: 600; padding: 0 4px; color: #1c3a26; }
.esa-prodset .esa-check { margin: 5px 0; }

.esa-btn { width: 100%; background: #2d5a3d; color: #fff; border: none; border-radius: 11px; padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.esa-btn:hover { background: #244b32; }
.esa-btn:disabled { opacity: .6; cursor: default; }
.esa-link { display: block; width: 100%; background: none; border: none; color: #4a7d5a; font-size: 13px; margin-top: 12px; cursor: pointer; }
.esa-err { background: #fdecec; border: 1px solid #f3bcbc; color: #9a1c1c; border-radius: 9px; padding: 9px 12px; font-size: 13px; margin: 0 0 13px; }

.esa-done { text-align: center; padding: 10px 0 4px; }
.esa-check-ico { width: 54px; height: 54px; border-radius: 50%; background: #2d5a3d; color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.esa-done h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.esa-done p { margin: 0 0 18px; color: #6b7d6f; }

/* ── account pill (header) — matches .es-phone-pill + Reflect-O-Ray dropdown ── */
.esa-pillgroup { display: flex; align-items: flex-end; gap: 12px; }
.esa-mobilegroup { display: flex; align-items: center; gap: 8px; }

.esa-pill { position: relative; margin-bottom: 10px; }       /* align with phone pill */
.esa-pill--mobile { margin-bottom: 0; }

.esa-pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1e5518; color: #fff; border: 3px solid #e8a020;
  border-radius: 50px; padding: 6px 14px 6px 12px;
  font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
  font-family: inherit; transition: background .15s ease;
}
.esa-pill-btn:hover { background: #2a6e20; }
.esa-pill--mobile .esa-pill-btn { padding: 5px; border-width: 2px; gap: 0; }
.esa-ico { width: 24px; height: 24px; flex: none; }
.esa-pill--mobile .esa-ico { width: 26px; height: 26px; }
.esa-pill-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esa-caret { opacity: .85; transition: transform .2s ease; }
.esa-pill.open .esa-caret { transform: rotate(180deg); }

.esa-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 212px;
  background: #e8a020; border-radius: 18px; padding: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22); z-index: 1000; display: none;
}
.esa-pill.open .esa-menu { display: block; animation: esa-drop .16s ease; }
@keyframes esa-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.esa-menu-head { color: #3a2a05; font-size: 12px; padding: 8px 12px 6px; line-height: 1.3; }
.esa-menu-head b { display: block; font-size: 14px; color: #1a4d14; margin-top: 2px; }
.esa-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box; text-align: left;
  background: #1a4d14; color: #fff !important; border: none; border-radius: 10px;
  padding: 11px 12px; margin-top: 4px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.esa-menu-item:hover { background: #13380f; }
.esa-upload { background: #2d5a3d; }
.esa-upload:hover { background: #244b32; }
.esa-mi-ico { flex: none; opacity: .92; }
.esa-signout { background: #7a2018; }
.esa-signout:hover { background: #5e1812; }
