/* Add padding to containers */

.container {
  background-color: white;
  padding: 16px;
  text-align: center;
}

/* Full-width input fields */

input[type='text'],
input[type='email'],
input[type='number'],
input[type='password'],
textarea {
  width: 50%;
  padding: 15px;
  margin: 5px 0 22px 0;
  display: inline-block;
  border: none;
  background: #f1f1f1;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='number']:focus,
input[type='password']:focus,
textarea:focus {
  background-color: #ddd;
  outline: none;
}

/* Set a style for the submit/register button */

.registerbtn {
  color: white;
  padding: 16px 20px;
  margin: 8px 0;
  border: none;
  cursor: pointer;
  width: 50%;
  opacity: 0.9;
}

.registerbtn:hover {
  opacity: 1;
}

/* Add a blue text color to links */

a {
  color: dodgerblue;
}

/* Set a grey background color and center the text of the "sign in" section */

.signin {
  background-color: #f1f1f1;
  text-align: center;
}

#details {
  margin-bottom: 30px;
}

#edit-meme > form > div > p:nth-child(2) {
  border-bottom: 3px solid lightgrey;
  margin: auto;
  margin-bottom: 34px;
  padding: 23px;
  width: 60%;
  font-weight: bold;
  font-size: 50px;
  text-decoration: none;
  color: black;
}

#create-meme > form > div > h1 {
  border-bottom: 3px solid lightgrey;
  margin: auto;
  margin-bottom: 34px;
  padding: 23px;
  width: 60%;
  font-weight: bold;
  font-size: 50px;
  text-decoration: none;
  color: black;
}

.gender label:first-of-type {
  margin-right: 60px;
}

.container > label {
  display: block;
}
.premium-restricted {
  position: relative;
  cursor: pointer !important;
}

.premium-restricted::after {
  content: '🔒';
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

/* ✅ FORGOT PASSWORD STYLES */
.password-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
  margin-bottom: 10px;
}

.forgot-password-link {
  color: #283655;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #1e2a43;
  text-decoration: underline;
}

.forgot-password-link:active {
  color: #004085;
}

/* ✅ SEARCH RECIPE ACCESS PROMPTS */
.search-recipe-login-required,
.search-recipe-upgrade {
  text-align: center;
  padding: 40px 20px;
  max-width: 500px;
  margin: 0 auto;
}

.search-recipe-login-required h3,
.search-recipe-upgrade h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 24px;
}

.search-recipe-login-required p,
.search-recipe-upgrade p {
  color: #666;
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.5;
}

.login-actions,
.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-tertiary {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 150px;
}

.btn-primary {
  background: linear-gradient(135deg, #283655, #1e2a43);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 54, 85, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-tertiary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.btn-tertiary:hover {
  background: #e9ecef;
  color: #212529;
}

.premium-badge {
  font-size: 12px;
  color: #283655;
  margin-left: 5px;
}

/* ✅ NEW: Password Remembering Checkbox Styles */
.checkbox-group {
  margin: 15px 0;
  text-align: left;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  user-select: none;
  transition: color 0.2s ease;
}

.checkbox-label:hover {
  color: #333;
}

.checkbox-label input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: #FFFFFF;
  border: 2px solid #DFA774;
  border-radius: 3px;
  margin-right: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label:hover .checkmark {
  background-color: #FFFFFF;
  border-color: #0056b3;
}

.checkbox-label input:checked ~ .checkmark {
  background-color: #0056b3;
  border-color: #0056b3;
}

.checkmark:after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label:focus-within .checkmark {
  box-shadow: none;
}

/* ✅ NEW: Remember Password Checkbox Styles */
.remember-password-container {
  margin: 15px 0;
  text-align: left;
  padding: 0 15px;
}

.remember-password-container input[type='checkbox'] {
  margin-right: 8px;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.remember-password-container label {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  vertical-align: middle;
}

/* ✅ NEW: Autocompleted field styles */
input.autocompleted {
  background-color: #f0f8ff !important;
  border: 2px solid #283655 !important;
  box-shadow: 0 0 5px rgba(40, 54, 85, 0.3);
}

input.autocompleted:focus {
  background-color: #e6f3ff !important;
  border-color: #1e2a43 !important;
  box-shadow: 0 0 8px rgba(40, 54, 85, 0.4);
}

/* ✅ NEW: Large Login Button Styles */
.auth-button.large {
  padding: 18px 30px;
  font-size: 18px;
  font-weight: 600;
  min-height: 60px;
  width: 100%;
  max-width: 400px;
  margin: 25px auto;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 54, 85, 0.2);
}

.auth-button.large:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(40, 54, 85, 0.3);
}

.auth-button.large:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(40, 54, 85, 0.2);
}

.auth-button.large .button-text {
  font-size: 18px;
  font-weight: 600;
}

.auth-button.large .button-loading {
  font-size: 16px;
}

/* ✅ NEW: Enhanced Email Autocomplete Styles */
.email-input-container {
  position: relative;
  width: 100%;
}

.email-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: -1px;
}

.email-suggestion {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: #333;
}

.email-suggestion:hover {
  background-color: #f8f9fa;
  color: #283655;
}

.email-suggestion:last-child {
  border-bottom: none;
}

.email-suggestion strong {
  color: #283655;
  font-weight: 600;
}

/* ✅ NEW: Password Helper Styles */
.password-helper {
  font-size: 12px;
  color: #28a745;
  margin-top: 5px;
  font-style: italic;
  padding: 5px 0;
  transition: opacity 0.3s ease;
}

/* ✅ NEW: Enhanced Password Field Styles */
input[type='password'][data-autofilled='true'] {
  background-color: #FFFFFF !important;
  border-color: #DFA774 !important;
  color: #283655 !important;
  font-family: monospace;
  letter-spacing: 2px;
}

input[type='password'][data-autofilled='true']:focus {
  background-color: #e8f5e8 !important;
  border-color: #1e7e34 !important;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* ✅ NEW: Password Field with Saved Session Styles */
.password-field-saved {
  color: #283655 !important;
  background-color: #FFFFFF !important;
  border-color: #DFA774 !important;
  box-shadow: none !important;
}

.password-field-normal {
  color: inherit !important;
  background-color: inherit !important;
  border-color: inherit !important;
  box-shadow: inherit !important;
}

/* ✅ NEW: Responsive Email Dropdown */
@media (max-width: 768px) {
  .email-dropdown {
    max-height: 150px;
  }

  .email-suggestion {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ✅ NEW: Animation for Email Dropdown */
.email-dropdown {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ✅ NEW: Focus States for Email Input */
.email-input-container input:focus + .email-dropdown {
  border-color: #283655;
  box-shadow: 0 4px 8px rgba(40, 54, 85, 0.15);
}

.remember-me-container input[type='checkbox']:checked + label {
  color: #283655;
  font-weight: 500;
}

/* ✅ NEW: Login Form Specific Styles - Matching Register Form */
.auth-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(40, 54, 85, 0.1);
  margin: 0 auto;
  flex-shrink: 0;
}

.auth-header {
  background: #283655;
  padding: 24px 24px 20px;
  text-align: center;
  color: #93c572;
  position: relative;
  overflow: hidden;
}

.auth-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
  color: #93c572;
}

.auth-header p {
  color: #93c572;
  font-size: 0.85rem;
}

.auth-form-container {
  padding: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: #000000;
  font-size: 14px;
}

.form-group input[type='email'],
.form-group input[type='password'] {
  padding: 15px;
  border: 2px solid #DFA774;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #FFFFFF;
  color: #283655;
  width: 100%;
  box-sizing: border-box;
}

.form-group input[type='email']:focus,
.form-group input[type='password']:focus {
  outline: none;
  border-color: #0056b3;
  background: #FFFFFF;
  color: #283655;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.auth-button {
  background: #93c572;
  color: #FFFFFF;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

.auth-button:hover {
  background: #7fb85e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 197, 114, 0.4);
}

.auth-button:active {
  transform: translateY(0);
}

.remember-me-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.remember-me-container input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  border: 2px solid #DFA774;
  border-radius: 3px;
  background: #FFFFFF;
  transition: all 0.2s ease;
  position: relative;
  vertical-align: middle;
}

.remember-me-container input[type='checkbox']:checked {
  background: #0056b3;
  border-color: #0056b3;
}

.remember-me-container input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-me-container label {
  font-size: 14px;
  color: #000000;
  cursor: pointer;
  user-select: none;
}

.forgot-link {
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #333333;
  text-decoration: underline;
}

/* ✅ NEW: Responsive Design for Login */
@media (max-width: 768px) {
  .auth-container {
    max-width: 100%;
    margin: 20px;
    border-radius: 15px;
  }

  .auth-header {
    padding: 30px 20px 20px;
  }

  .auth-form-container {
    padding: 30px 20px;
  }

  .form-group input[type='email'],
  .form-group input[type='password'] {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .auth-button {
    padding: 14px 24px;
    font-size: 16px;
  }
}
