/* ============================================
   SurfLink Login Hider - WordPress Authentic Style
   Replicates default WordPress login page exactly
   ============================================ */

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

body {
  background: #ffffff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #3c434a;
  margin: 0;
  padding: 0;
}

/* ============================================
   MODAL OVERLAY - White centering wrapper
   ============================================ */

.surfl-lh-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.surfl-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================================
   LOGIN FORM CONTAINER - WordPress Style
   ============================================ */

.surfl-lh-login-form {
  width: 320px;
  padding: 24px 0 0;
  background: #f4f4f4;

  position: relative;
}

/* Remove gradient border effects */
.surfl-lh-login-form::before,
.surfl-lh-login-form::after {
  display: none;
}

/* ============================================
   LOGO SECTION
   ============================================ */

.surfl-lh-login-logo {
  text-align: center;
  margin: 0 0 24px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.surfl-lh-login-logo .site-logo-img {
  max-width: 84px;
  max-height: 84px;
  object-fit: contain;
}

.surfl-lh-login-logo .wp-logo-svg {
  width: 84px;
  height: 84px;
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.surfl-lh-login-error {
  border-left: 4px solid #d63638;
  padding: 12px;
  margin-left: 0;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
  word-wrap: break-word;

  font-weight: 400;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.surfl-lh-login-form form {
  border: 1px solid #dcdcde;
  background-color: white;
  margin: 0;
  padding: 24px 24px;
}

/* Labels */
.surfl-lh-login-form label {
  color: #3c434a;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 4px;
  display: block;
}

/* Input Wrapper - Hide icons */
.surfl-input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

/* Password input group for toggle button positioning */
.surfl-password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.surfl-password-input-group .surfl-input {
  padding-right: 40px;
}

/* Hide input icons */
.surfl-input-icon {
  display: none;
}

/* ============================================
   INPUT FIELDS - WordPress Style
   ============================================ */

.surfl-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  color: #3c434a;
  font-size: 14px;
  line-height: 2;
  transition:
    border-color 0.1s ease,
    box-shadow 0.1s ease;
  box-sizing: border-box;
  outline: none;
}

.surfl-input::placeholder {
  color: #646970;
}

/* Input Focus State - WordPress Style */
.surfl-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

/* ============================================
   PASSWORD TOGGLE BUTTON - Dashicons
   ============================================ */

.surfl-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #646970;
  transition: color 0.2s ease;
  z-index: 2;
  width: 36px;
  height: 36px;
}

.surfl-password-toggle:hover {
  color: #2271b1;
}

/* Dashicons styling */
.surfl-password-toggle .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  display: block;
}

/* Visibility toggle states */
.surfl-password-toggle.surfl-password-visible .dashicons-visibility {
  display: none;
}

.surfl-password-toggle.surfl-password-visible .dashicons-hidden {
  display: block;
}

.surfl-password-toggle .dashicons-hidden {
  display: none;
}

/* ============================================
   CHECKBOX - Remember Me
   ============================================ */

.surfl-forgetmenot {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
}

.surfl-forgetmenot label {
  margin: 0;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}

/* ============================================
   SUBMIT BUTTON - WordPress Style
   ============================================ */

.surfl-lh-login-form .submit input {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  max-width: 63px;
  max-height: 32px;
  line-height: 2.30769231;
  padding: 0 12px;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  -webkit-appearance: none;
  border-radius: 3px;
  white-space: nowrap;
  box-sizing: border-box;
}

.surfl-lh-login-form .submit input:hover {
  background: #135e96;
  border-color: #135e96;
}

/* ============================================
   LINKS - Forgot Password
   ============================================ */

.surfl-lh-forgot-password {
  text-align: center;
  margin: 16px 0 0;
  font-size: 14px;
}

.surfl-lh-forgot-password a {
  color: #3c434a;
  text-decoration: none;
  transition: color 0.1s ease;
}

.surfl-lh-forgot-password a:hover {
  color: #135e96;
  text-decoration: underline;
}

/* ============================================
   FOOTER - Back to Site
   ============================================ */

.surfl-lh-login-form #backtoblog {
  text-align: center;
  margin: 24px 0 0;
  padding: 0 24px 24px;
  font-size: 14px;
  line-height: 1.5;
}

.surfl-lh-login-form #backtoblog a {
  color: #3c434a;
  text-decoration: none;
}

.surfl-lh-login-form #backtoblog a:hover {
  color: #135e96;
  text-decoration: underline;
}

/* Remove old gradient text class */
.surfl-gradient-text {
  display: none;
}

/* ============================================
   SHAKE ANIMATION FOR ERRORS
   ============================================ */

@keyframes surflShake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-4px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(4px);
  }
}

.surfl-shake {
  animation: surflShake 0.5s ease-in-out;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 480px) {
  .surfl-lh-modal-overlay {
    padding: 16px;
  }

  .surfl-lh-login-form {
    width: 100%;
    max-width: 320px;
    padding: 20px 0 0;
  }

  .surfl-lh-login-form form,
  .surfl-lh-login-form #backtoblog {
    padding-left: 20px;
    padding-right: 20px;
  }

  .surfl-input {
    height: 36px;
    font-size: 14px;
  }

  .surfl-lh-login-form input[type="submit"] {
    height: 36px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .surfl-lh-login-form {
    max-width: 100%;
  }

  .surfl-lh-login-form form,
  .surfl-lh-login-form #backtoblog {
    padding-left: 16px;
    padding-right: 16px;
  }
}
