/* auth_responsive.css
   Overrides scoped to login.php and signup.php only (this file is only linked on those pages)
*/

/* ========= Base safety (prevents horizontal overflow on mobile) ========= */
*,
*::before,
*::after{
  box-sizing: border-box;
}
html, body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
img, video, iframe{
  max-width: 100%;
  height: auto;
}

/* ========= Layout helpers used by your auth pages ========= */
.wrap{
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px;
}

/* Your headers (login uses header.post, signup uses header.topbar) */
header.post,
header.topbar,
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-left,
.topbar-right{
  min-width: 0;
}

/* The auth pages use a two-column grid similar to user.php */
.grid{
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}
.card{
  width: 100%;
  min-width: 0;
  overflow: hidden; /* prevents inner content from forcing overflow */
}

/* Make long URLs / status text wrap instead of pushing the layout */
.card,
.card *{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ========= Form sizing ========= */
#loginform,
#signupform{
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Inputs/selects should scale on mobile, but still look neat on desktop */
#loginform input[type="text"],
#loginform input[type="email"],
#loginform input[type="password"],
#signupform input[type="text"],
#signupform input[type="email"],
#signupform input[type="password"],
#signupform select{
  width: 100% !important;
  max-width: 560px;
}

/* Buttons: full-width on mobile for easy tapping */
#loginbtn,
#signupbtn{
  width: 100%;
  max-width: 560px;
}

/* Keep tappable targets comfortable on touch devices */
#loginform input,
#signupform input,
#signupform select{
  min-height: 44px;
  padding: 10px 12px !important;
  font-size: 16px; /* prevents iOS zoom on focus */
}

/* ========= Responsive breakpoints ========= */
@media (max-width: 900px){
  .wrap{
    padding: 12px;
  }
  .grid{
    grid-template-columns: 1fr;
  }
  header.post,
  header.topbar,
  .topbar{
    justify-content: center;
    text-align: center;
  }
}

/* ========= Existing scoped page styles (moved from inline <style>) ========= */

/* --- login.php inline styles --- */
/* Login page styles (scoped) - matches the look/feel used on user.php */
body{
    margin:0;
    padding:0;
    background:#eef3f7;
    font-family: Arial, Helvetica, sans-serif;
}
#login-wrap{
    width: min(92vw, 440px);
    margin: 18px auto 28px auto;
    padding: 22px 22px 18px 22px;
    background:#ffffff;
    border:1px solid #d8e2ef;
    border-radius:16px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}
#login-wrap h3{
    margin: 4px 0 14px 0;
    font-size: 22px;
    color:#2b6cb0;
    letter-spacing: .2px;
}
#loginform{
    margin-top: 0;
    text-align: left;
}
#loginform > div{
    margin-top: 14px;
    font-size: 14px;
    color:#4b5563;
}
#loginform > input{
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px;
    margin-top: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 15px;
    outline: none;
}
#loginform > input:focus{
    border-color:#60a5fa;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.25);
    background:#ffffff;
}
#loginbtn{
    width: 100%;
    margin-top: 16px;
    font-size: 16px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background:#2b6cb0;
    color:#ffffff;
    cursor:pointer;
}
#loginbtn:hover{ filter: brightness(1.03); }
#loginbtn:active{ transform: translateY(1px); }

#status{
    margin: 12px 0 0 0;
    min-height: 18px;
    font-size: 14px;
    color:#b91c1c;
}

#loginform a{
    display:inline-block;
    margin-top: 10px;
    color:#2563eb;
    text-decoration:none;
    font-size: 14px;
}
#loginform a:hover{ text-decoration: underline; }

/* Keep existing "comment" container alignment from your templates */
.comment{ background: transparent; }

/* --- signup.php inline styles --- */
#signupform{
	margin-top:24px;	
}
#signupform > div {
	margin-top: 12px;	
}
#signupform > input,select {
	width: 200px;
	padding: 3px;
	background: #F3F9DD;
}
#signupbtn {
	font-size:18px;
	padding: 12px;
}
#terms {
	border:#CCC 1px solid;
	background: #F5F5F5;
	padding: 12px;
}
