/* =========================
   Shared Registration Styles
   Used by:
   - register_user.php
   - edit_user.php
   - register_model.php
   - edit_model.php
   - password pages using body.passwordPage + .passwordForm
   ========================= */

/* Base */
body {
  font-family: 'Urbanist', sans-serif;
  background: #5c8ac8;
  font-size: 14.5px;
}

body.passwordPage {
  font-family: 'Urbanist', Arial, sans-serif;
  background: #333333;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  margin-top: -3px;
  color:#21426b;
}

h2{
  color:#f79144;
}

label {
  display: block;
  margin-top: 15px;
}

button {
  font-family: 'Urbanist', sans-serif;
  font-size: 16px;
  padding: 10px 18px;
  border: none;
  background: #f79144;
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 20px;
}

input,
select {
  width: 97%;
  padding: 10px;
  font-size: 14px;
}

select {
  box-sizing: border-box;
}

input[readonly] {
  background: #e9e9e9;
  color: #666666;
  cursor: not-allowed;
}

input[name="phone"],
input[name="ipms_number"] {
  width: 50%;
}

a {
    color: #f79144;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #5c8ac8;
    text-decoration: none;
}

.mandatory-error {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 8px;
    display: none;
}

/* Footer */
.site-footer {
  text-align: center;
  padding-bottom: 20px;
  margin-top: -10px;
  font-size: 13px;
  color: #fff;
  
}

/* Containers */
.container {
  max-width: 850px;
  box-sizing: border-box;
  margin: 20px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 6px;
}

body.termsPage .container {
  margin: 30px auto;
}

.container.userForm {
  max-width: 600px;
  margin: 30px auto;
  padding-top: 30px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.container.modelForm {
  max-width: 800px !important;
  margin: 30px auto;
  padding-left: 30px;
  padding-right: 30px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.container.passwordForm {
  width: 420px !important;
  max-width: 420px;
  margin-top: -100px;
  background: #ffffff;
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.container.wide {
  max-width: 600px;
  margin: 40px auto;
}

body:not(.passwordPage) .container:not(.userForm):not(.modelForm):not(.passwordForm) {
  max-width: 850px;
}

/* User form layout */
.row-half {
  display: flex;
  gap: 10px;
}

.half-input {
  flex: 1;
}

.row-half .half-input input,
.row-half .half-input select {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

.container.modelForm .radio-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  gap: 0;
  margin-top: 15px;
}

.container.modelForm .radio-row label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 0;
  white-space: nowrap;
}

.container.modelForm .radio-row input[type="radio"] {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
}

.showpw-row {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  user-select: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.showpw-row label {
  margin: 0;
  display: inline;
}
#show_passwords {
  width: auto !important;
}

/* Model form layout */
.model-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.container.modelForm input,
.container.modelForm textarea,
.container.modelForm select,
.container.model-form input,
.container.model-form textarea,
.container.model-form select {
  width: 97%;
  padding: 8px;
  font-family: 'Urbanist', Arial, sans-serif;
  font-size: 14px;
}
textarea {
    cursor: text;
}

.full-textarea {
  width: 100%;
  font-size: 14px;
  padding: 8px;
  font-family: 'Urbanist', Arial, sans-serif;
}

.special-categories{
  margin-top:20px;
}
.category-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px 20px;
}
.category-item{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
}

.container.modelForm .special-categories input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
  width: auto;
  height: auto;
  padding: 0;
  flex: 0 0 auto;
}

.junior-helper {
  color: red;
}

/* Terms */

.terms-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  width: 100%;
}

.terms-row input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.terms-text {
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.terms-text label {
  display: inline;
  margin: 0;
  white-space: nowrap;
}

.terms {
  text-align: justify;
}

.doc-note {
  display: block;
  width: 100%;
  text-align: center;
  color: #444444;
  margin-bottom: 20px;
}

/* Messages */
.message {
  margin-top: 15px;
  color: red;
}

.error {
  color: red;
  margin-top: 10px;
}

.success {
  color: green;
  margin-top: 15px;
}

.notice {
  font-weight: bold;
  margin-top: 10px;
}

.note-green {
  color: #2eb52e;
  margin-top: 10px;
  text-align: center;
}

.note-red {
  color: red;
  margin-top: 10px;
  text-align: center;
}

.note-success {
  margin-top: 15px;
  padding: 10px 12px;
  border: 1px solid #b7e1b7;
  background: #eaf7ea;
  color: #1f7a1f;
  border-radius: 4px;
  text-align: center;
}

.message-error,
.message-success,
.message-info {
  padding: 10px 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
}

.message-error {
  background: #fdeaea;
  border: 1px solid #f5bcbc;
  color: #b10000;
}

.message-success {
  background: #eaf7ea;
  border: 1px solid #b7e1b7;
  color: #1f7a1f;
}

.message-info {
  background: #eaf2ff;
  border: 1px solid #b8d2ff;
  color: #124a9a;
}

.pw-hint {
  display: block;
  margin-top: 4px;
  color: #777777;
}

.pw-hint.good {
  color: #2eb52e;
}

.pw-hint.bad {
  color: red;
}

/* Autocomplete */
.autocomplete-field-wrap,
.autocomplete-results-wrap {
  position: relative;
}

.autocomplete-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid #cccccc;
  border-top: none;
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  border-radius: 0 0 6px 6px;
}

.autocomplete-result-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #eeeeee;
}

.autocomplete-result-item:last-child {
  border-bottom: none;
}

.autocomplete-result-item:hover {
  background: #f5f5f5;
}

.headerArea{
    background:#21426b;
    color:#fff;
    margin:-30px -30px 10px -30px;
    padding:15px 30px 4px 30px;
}

.headerArea h1{
    color:#fff;
}

.headerArea p,
.headerArea strong{
    color:#fff;
}

.modelHeader{
    display:flex;
    align-items:center;
    gap:20px;
    margin-bottom:12px;
}
.headerArea p{
    margin:5px 0 0 0;
}

.modelHeader img{
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
}

.modelHeader h1{
    margin:0;
}

/* Password pages */
.container.passwordForm label {
  margin-top: 10px;
}

.container.passwordForm input[type="email"],
.container.passwordForm input[type="password"],
.container.passwordForm input[type="text"] {
  width: 95%;
  padding: 10px;
  font-family: 'Urbanist', Arial, sans-serif;
  font-size:14px;
}

.links {
  margin-top: 20px;
  text-align: center;
}

.links a {
  display: block;
  margin-top: 8px;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

/* Utility */
.inline {
  display: inline-block;
  margin-left: 10px;
}

.disabled {
  opacity: 0.5;
}

.back {
  margin-top: 20px;
  text-align: center;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.actions button {
  margin-top: 0;
}

/* Responsive */
@media (max-width: 500px) {
  .row-half {
    flex-direction: column;
  }
}

@media screen and (max-width: 768px) {
  body.passwordPage {
    margin-top: 50px;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 16px;
  }

  .container.passwordForm {
    width: 100% !important;
    max-width: 420px;
    padding: 20px;
  }
}
