/*to hide elements when not in use*/
.hidden {
  display: none !important;
}

/* Full-screen dimmed backdrop */
#auth-overlay {
  position: absolute;
  inset: 0;                 /* top/right/bottom/left: 0 */
  display: flex;
  align-items: center;      /* vertical center */
  justify-content: center;  /* horizontal center */
  background: rgba(0,0,0,0.25);
  z-index: 9999;
  color: #3c4043;
}

/* The “card” behind FirebaseUI */
#auth-panel {
  width: min(360px, 92vw);
  padding: 30px;
  border-radius: 12px;
  background: #f7f4ef;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

#auth-panel h1 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 18px; /* controlled spacing below */
}

#auth-message {
  margin-bottom: 10px;
}

#auth-error {
 color:red;
}

#auth-buttons {
  display: grid;
  gap: 10px;
  justify-items: center;  /* horizontal center */
}

/*buttons default*/

#auth-buttons .auth-btn {
  width: 70%;
  min-height: 44px;
  padding: 10px 14px 10px 44px; /* left padding makes room for icon */
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #dadce0;      /* subtle Google border */
  box-shadow: 0 1px 2px rgba(0,0,0,.08);

  font: 600 15px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  /*text-align: left;*/

  position: relative;
  user-select: none;
}

#auth-buttons .auth-btn:hover {
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

#auth-buttons .auth-btn:focus {
  outline: 2px solid rgba(0,0,0,.25);
  outline-offset: 2px;
}

#auth-buttons .auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#auth-buttons .auth-btn::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}


/* fb btn  - see also 'login button icons' at end of file */

#btn-fb-login {
  background: #1877F2;
  color: white;
}

#btn-fb-login:hover {
  filter: brightness(0.95);
}

/* google btn  - see also 'login button icons' at end of file */
#btn-google-login {
  background: #ffffff;
  color: #3c4043;                 /* official Google dark gray */
  border: 1px solid #dadce0;      /* subtle Google border */
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

#btn-google-login:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

#btn-google-login:active {
  background: #f1f3f4;
}

/* apple btn  - see also 'login button icons' at end of file */

#btn-apple-login {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}

#btn-apple-login:hover {
  background: #1a1a1a; /* subtle official-style hover */
}

#btn-apple-login:active {
  background: #000000;
  filter: brightness(0.9);
}

.auth-divider {
  width: 70%;
  margin: 14px auto 14px;
  text-align: center;
  font-size: 12px;
  color: #888;
  position: relative;
}

/* OR divider */

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: #dadce0;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/*email btn  - see also 'login button icons' at end of file */

#btn-email-login {
  background: #9b81a7;
  color: white;
}

#btn-email-login:hover {
  background: #967da1;
}

/* email form */


    input[type="email"], input[type="password"] , input[type="text"] {
        display: block;
        width: 70%;
        margin: 24px auto;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #ced0d6;
        background-color: white;
        color: rgb(94, 94, 94);
        font-size: 16px;
        box-sizing: border-box;
    }

#auth-email-section input {
  width: 100%;
  max-width: 260px;
  box-sizing: border-box;
  margin: 12px auto;
}

#auth-email-section input:focus {
	 outline: none; /* remove browser default */
  border-color: #9b81a7;  /* match your email button purple */
  box-shadow: 0 0 0 2px rgba(143, 140, 145, 0.25);
}

#auth-email-btns {
  margin: 10px auto; 
  width: 100%;
  max-width: 260px;
}


#auth-password-div {
  margin: 0 auto; 
  width: 100%;
  max-width: 260px;
}

.password-wrapper {
  position: relative;
}

#auth-password {  
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  
  width: 30px;
  height: 30px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  border: none;
  cursor: pointer;
  opacity: 0.7;
}
.password-toggle:hover {
  opacity: 1;
}

/* Helper text */
.password-help {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.password-help.error {
  color: red;
}

.password-help.success {
  color: green;
}

.auth-email-nav button:not(.password-toggle) {
 	background: #9b81a7;
 	color: white;
	min-height: 44px;
	min-width: 74px;
	padding: 10px;
	border-radius: 10px;
	cursor: pointer;
	border: 1px solid #dadce0;      /* subtle Google border */
	box-shadow: 0 1px 2px rgba(0,0,0,.08);

	font: 600 15px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	
	user-select: none;
}

.auth-link-btn {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: none;
  color: #8e7aa5;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}

.auth-help {
  display: block;
  margin: auto;
  margin-top: 24px;
  color: #797979;
  font-size: 13px;
  text-align: center;
}
.auth-help button {
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  color: #797979;
}
.auth-help button:hover {
  color: #5f5f5f;
}

/* login button icons */

#btn-fb-login::before {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'>\
<path fill='white' d='M279.14 288l14.22-92.66h-88.91V117.78c0-25.35 12.42-50.06 52.24-50.06H297V6.26S260.36 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.2V288z'/>\
</svg>");
}

#btn-google-login::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3CclipPath id='g'%3E%3Cpath d='M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23g)'%3E%3Cpath fill='%23FBBC05' d='M0 37V11l17 13z'/%3E%3Cpath fill='%23EA4335' d='M0 11l17 13 7-6.1L48 14V0H0z'/%3E%3Cpath fill='%2334A853' d='M0 37l30-23 7.9 1L48 0v48H0z'/%3E%3Cpath fill='%234285F4' d='M48 48L17 24l-4-3 35-10z'/%3E%3C/g%3E%3C/svg%3E");
}


#btn-apple-login::before {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'>\
<path fill='white' d='M318.7 268.1c-.3-47.6 38.9-70.4 40.6-71.4-22.1-32.3-56.6-36.7-68.8-37.2-29.3-3-57.2 17.2-72.1 17.2-14.9 0-37.9-16.8-62.3-16.4-32 .5-61.5 18.6-78 47.3-33.4 57.9-8.6 143.6 24 190.8 16 23.1 35 49.1 60 48.2 24.1-1 33.2-15.6 62.3-15.6 29.1 0 37.3 15.6 62.8 15.1 25.9-.5 42.3-23.5 58.2-46.7 18.4-26.9 26-53 26.3-54.3-.6-.3-50.4-19.3-50.9-76.9zM256.1 106.7c13.3-16.1 22.3-38.5 19.9-60.7-19.2.8-42.4 12.8-56.2 28.9-12.3 14.1-23 36.9-20.1 58.6 21.4 1.7 43.1-10.9 56.4-26.8z'/>\
</svg>");
	
}

#btn-email-login::before {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<path fill='white' d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5L4 8V6l8 5 8-5v2z'/>\
</svg>");
}


/* (hidden password) */
.password-toggle {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'>\
<path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z'/>\
<circle cx='12' cy='12' r='3'/>\
</svg>");
}

/* (visible password) */
.password-toggle.visible {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z'/>\
<circle cx='12' cy='12' r='3'/>\
<line x1='2' y1='2' x2='22' y2='22'/>\
</svg>");
}