/* 
==========================================
  PASSWORD RESET STYLES
==========================================
*/

/* Import base variables and resets from login.css */
:root {
  /* Colors - Dark Theme (Default) */
  --bg-primary: #02090D;
  --bg-secondary: rgba(183.60, 207.20, 224.40, 0.12);
  --text-primary: #D7DFE4;
  --text-secondary: rgba(208.59, 223.93, 235.11, 0.62);
  --text-placeholder: rgba(208.59, 223.93, 235.11, 0.40);
  --accent-color: #0D99FF;
  --social-bg: #828E97;
  --input-bg: rgba(183.60, 207.20, 224.40, 0.12);
  --border-color: rgba(255, 255, 255, 0);
  --error-color: #ff4d4d;
  --success-color: #4BB543;

  /* Colors - Light Theme */
  --bg-primary-light: #FBFDFE;
  --bg-secondary-light: #EDEDED;
  --text-primary-light: #02090D;
  --text-secondary-light: #656565;
  --text-placeholder-light: #656565;
  --social-bg-light: #ECECEC;
  --input-bg-light: #EDEDED;

  /* Typography */
  --font-family: 'Public Sans', sans-serif;
  --font-size-small: 13px;
  --font-size-regular: 15px;
  --font-size-large: 28px;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --line-height-small: 16px;
  --line-height-regular: 20px;
  --line-height-large: 32px;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;

  /* Radius */
  --border-radius: 8px;
  
  /* Transition */
  --theme-transition-duration: 300ms;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Theme transition class */
html.theme-transition,
html.theme-transition *,
html.theme-transition *:before,
html.theme-transition *:after {
  transition: all var(--theme-transition-duration) ease !important;
  transition-delay: 0 !important;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Light Theme */
body.light-theme {
  background-color: var(--bg-primary-light);
  color: var(--text-primary-light);
}

.light-theme .header {
  background-color: var(--bg-primary-light);
}

.light-theme .dark-icon {
  display: none;
}

.light-theme .light-icon {
  display: block;
  color: var(--text-primary-light);
}

.light-theme .reset-form input,
.light-theme .new-password-form input {
  background-color: var(--input-bg-light);
  color: var(--text-primary-light);
}

.light-theme .reset-form input::placeholder,
.light-theme .new-password-form input::placeholder {
  color: var(--text-placeholder-light);
}

.light-theme .social-icon {
  background-color: var(--social-bg-light);
}

.light-theme .reset-btn,
.light-theme .submit-btn {
  color: #F9F9F9;
}

.light-theme label,
.light-theme .forgot-link,
.light-theme .trouble-link {
  color: var(--text-primary-light);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  background-color: var(--bg-primary);
}

.main-content {
  flex: 1;
  padding-top: 64px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reset-container,
.new-password-container {
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Logo & Theme Toggle */
.logo {
  width: 29px;
  height: 36px;
  display: flex;
  align-items: center;
}

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

.theme-toggle {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  font-size: 22px;
}

.dark-icon {
  display: block;
}

.light-icon {
  display: none;
}

/* Reset Form Styles */
.reset-header,
.new-password-header {
  text-align: center;
  margin-bottom: 15px;
  margin-top: 40px;
}

.reset-header h1,
.new-password-header h1 {
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-large);
  margin-bottom: 8px;
}

.reset-header p,
.new-password-header p {
  font-size: var(--font-size-regular);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-regular);
  color: var(--text-secondary);
}

.light-theme .reset-header p,
.light-theme .new-password-header p {
  color: var(--text-secondary-light);
}

.reset-form,
.new-password-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

label {
  font-size: var(--font-size-regular);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-regular);
  color: var(--text-primary);
}

.reset-form input,
.new-password-form input {
  width: 100%;
  height: 41px;
  padding: 8px 12px;
  background-color: var(--input-bg);
  border: 1.5px solid rgba(52, 152, 219, 0.3);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: var(--font-size-regular);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-regular);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.reset-form input:focus,
.new-password-form input:focus {
  border-color: rgba(52, 152, 219, 0.8);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.light-theme .reset-form input,
.light-theme .new-password-form input {
  border-color: rgba(52, 152, 219, 0.3);
}

.light-theme .reset-form input:focus,
.light-theme .new-password-form input:focus {
  border-color: rgba(52, 152, 219, 0.8);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.reset-form input::placeholder,
.new-password-form input::placeholder {
  color: var(--text-placeholder);
}

/* Password field with toggle */
.password-field {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle i {
  font-size: 18px;
}

.password-toggle:hover {
  color: var(--text-primary);
}

.light-theme .password-toggle {
  color: var(--text-secondary-light);
}

.light-theme .password-toggle:hover {
  color: var(--text-primary-light);
}

/* Buttons */
.reset-btn,
.submit-btn {
  width: 100%;
  padding: 8px 16px;
  background-color: var(--accent-color);
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: var(--font-size-regular);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-regular);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.reset-btn:hover,
.submit-btn:hover {
  background-color: #0b87e0;
}

.reset-btn:disabled,
.submit-btn:disabled {
  background-color: #666;
  cursor: not-allowed;
}

/* Loading state */
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Messages */
.error-message,
.success-message {
  font-size: var(--font-size-small);
  text-align: center;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: var(--border-radius);
}

.error-message {
  color: var(--error-color);
  background-color: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.2);
}

.success-message {
  color: var(--success-color);
  background-color: rgba(75, 181, 67, 0.1);
  border: 1px solid rgba(75, 181, 67, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.success-message i {
  font-size: 18px;
}

/* Links - Matching Login Page Style */
.login-bottom-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.help-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.forgot-link,
.trouble-link {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  line-height: 20px;
  text-decoration: none;
  padding: 8px 12px;
  display: inline-block;
  transition: color 0.3s ease;
}

.forgot-link:hover,
.trouble-link:hover {
  color: var(--accent-color);
}

.light-theme .forgot-link,
.light-theme .trouble-link {
  color: var(--text-primary-light);
}

.light-theme .forgot-link:hover,
.light-theme .trouble-link:hover {
  color: var(--accent-color);
}

/* Social icons wrapper */
.social-icons-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

/* Social Icons - Matching Login Page Style */
.social-icons {
  display: flex;
  gap: 16px;
  margin-top: 0;
  justify-content: center;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.light-theme .social-icon {
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-primary-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
}

.light-theme .social-icon:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.social-icon i {
  font-size: 18px;
}

/* Platform-specific hover styles */
.social-icon[aria-label*="Telegram"]:hover {
  background-color: #1c86c9 !important; 
  color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon[aria-label*="Instagram"]:hover {
  background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%) !important; 
  color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon[aria-label*="Discord"]:hover {
  background-color: #5865F2 !important; 
  color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon[aria-label*="Twitter"]:hover {
  background-color: #000000 !important; 
  color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Password Requirements */
.password-requirements {
  background-color: var(--bg-secondary);
  padding: 12px;
  border-radius: var(--border-radius);
  margin-top: -20px;
  margin-bottom: 0px;
}

.light-theme .password-requirements {
  background-color: var(--bg-secondary-light);
}

.password-requirements h3 {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  margin-bottom: 8px;
  color: var(--text-primary);
}

.light-theme .password-requirements h3 {
  color: var(--text-primary-light);
}

.requirement-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirement-item {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.light-theme .requirement-item {
  color: var(--text-secondary-light);
}

.requirement-item i {
  font-size: 14px;
  color: var(--error-color);
}

.requirement-item.met i {
  color: var(--success-color);
}

/* Success Page Styles */
.success-container {
  text-align: center;
  padding: 0px 20px 40px 20px;
  width: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background-color: rgba(75, 181, 67, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon i {
  font-size: 40px;
  color: var(--success-color);
}

.success-container h1 {
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-bold);
  margin-bottom: 16px;
}

.success-container p {
  font-size: var(--font-size-regular);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.light-theme .success-container p {
  color: var(--text-secondary-light);
}

.email-tips {
  background-color: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: left;
  margin-bottom: 0px;
}

.light-theme .email-tips {
  background-color: var(--bg-secondary-light);
}

.email-tips h3 {
  font-size: var(--font-size-regular);
  font-weight: var(--font-weight-medium);
  margin-bottom: 12px;
  color: var(--text-primary);
}

.light-theme .email-tips h3 {
  color: var(--text-primary-light);
}

.email-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.email-tips li {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.light-theme .email-tips li {
  color: var(--text-secondary-light);
}

.email-tips li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}


/* Password strength indicator - matching user settings style */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(183, 207, 224, 0.12);
    border-radius: 2px;
    overflow: hidden;
    transition: all var(--transition-quick);
    position: relative;
    z-index: 0;
}

[data-theme="light"] .password-strength {
    background: #EDEDED;
}

.password-strength-bar {
    height: 100%;
    transition: all var(--transition-quick);
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    width: 25%;
    background: #e74c3c;
}

.password-strength.fair .password-strength-bar {
    width: 50%;
    background: #f39c12;
}

.password-strength.good .password-strength-bar {
    width: 75%;
    background: #3498db;
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background: #27ae60;
}

/* Password requirements - matching user settings style */
.password-requirements {
    margin-top: 8px;
    font-size: 12px;
    color: var(--color-text-secondary);
    position: relative;
    z-index: 0;
}

.password-requirements ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.password-requirements li {
    margin-bottom: 2px;
    transition: color var(--transition-quick);
}

.password-requirements li.valid {
    color: #27ae60;
}

.password-requirements li.invalid {
    color: #e74c3c;
}

/* Ensure password extras are positioned correctly */
.password-field + .password-strength,
.password-field + .password-requirements {
    clear: both;
    width: 100%;
}

/* For when both strength and requirements are present */
.password-strength + .password-requirements {
    margin-top: 4px;
}

/* Form validation states - matching user settings */
.form-group input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Error messages - matching user settings style */
.error-message {
    margin-top: 4px;
    color: #e74c3c;
    font-size: 0.875rem;
}

/* Success messages */
.success-message {
    margin-top: 4px;
    color: #27ae60;
    font-size: 0.875rem;
}

/* Loading button states */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .password-requirements {
        font-size: 11px;
    }
    
    .password-strength {
        height: 3px;
    }
    
    .error-message,
    .success-message {
        font-size: 0.8rem;
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
  
  .reset-container,
  .new-password-container {
    max-width: 100%;
    width: 100%;
  }
  
  .main-content {
    padding-top: 32px;
    min-height: calc(100vh - 72px);
  }
  
  .success-container {
    padding: 20px 10px;
  }

  /* Enhanced touch targets for mobile */
  .reset-form input,
  .new-password-form input {
    height: 48px;
    font-size: 15px;
    padding: 14px 16px;
  }

  .reset-btn,
  .submit-btn {
    height: 48px;
    font-size: 15px;
    padding: 14px 16px;
    margin-top: 0;
  }

  .login-bottom-container {
    margin-top: 0px;
  }

  /* Social icons touch optimization */
  .social-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .social-icons {
    gap: 20px;
  }

  /* Better form spacing */
  .reset-form,
  .new-password-form {
    gap: 20px;
  }

  .form-group {
    gap: 8px;
  }

  .help-links {
    margin-bottom: 12px;
  }

  .social-icons-wrapper {
    padding: 24px 0 40px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
  }

  .light-theme .social-icons-wrapper {
    background: var(--bg-primary-light);
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .reset-header h1,
  .new-password-header h1,
  .success-container h1 {
    font-size: 24px;
  }

  .reset-header p,
  .new-password-header p {
    font-size: 14px;
  }
  
  .success-icon {
    width: 60px;
    height: 60px;
  }
  
  .success-icon i {
    font-size: 30px;
  }

  /* Enhanced mobile form spacing */
  .reset-form,
  .new-password-form {
    gap: 20px;
    width: 100%;
  }

  .form-group {
    gap: 10px;
  }

  label {
    font-size: 14px;
  }

  .social-icons {
    gap: 16px;
    margin-top: 0;
  }

  /* Better mobile container spacing */
  .reset-container,
  .new-password-container {
    gap: 24px;
  }

  .reset-header,
  .new-password-header {
    margin-bottom: 8px;
  }
}

/* Landscape mobile orientation */
@media screen and (max-height: 600px) and (orientation: landscape) {
  .main-content {
    padding-top: 16px;
    min-height: auto;
  }

  .reset-container,
  .new-password-container {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
}