/* Loader Animations */
@keyframes loader-scale-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes loader-spin-arc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loader-pulse-core {
  0%, 100% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

.loader-ring {
  animation: loader-scale-ring 2s ease-in-out infinite;
}

.loader-arc {
  animation: loader-spin-arc 1.5s linear infinite;
}

.loader-core {
  animation: loader-pulse-core 1s ease-in-out infinite;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 20px;
}
.custom-scrollbar:hover::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Dashboard Tabs */
.lsm-tab-content {
  display: none;
}
.lsm-tab-content.active {
  display: block !important;
}
.lsm-tab-content:not(.hidden) {
  display: block;
}
.lsm-tab-btn.active {
  color: #132c4b !important;
  border-bottom-color: #132c4b !important;
}

/* Message Styles */
#lsm-message.success {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

#lsm-message.error {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* Hide WordPress default header/footer on auth pages */
.lsm-page-wrapper {
  min-height: 100vh;
}

body.lsm-auth-page {
  background: #f1f5f9;
}

body.lsm-auth-page #header,
body.lsm-auth-page #footer,
body.lsm-auth-page .site-header,
body.lsm-auth-page .site-footer {
  display: none;
}

/* Dashboard Avatar Upload */
#lsm-avatar-preview {
  transition: all 0.3s;
}

#lsm-avatar-input + label {
  transition: all 0.3s;
}

#lsm-avatar-input + label:hover {
  transform: scale(1.1);
}

/* Pagination Styles */
.lsm-pagination-btn {
  transition: all 0.2s;
}

.lsm-pagination-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modal Styles */
.lsm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lsm-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lsm-modal.active .lsm-modal-overlay {
  opacity: 1;
}

.lsm-modal-container {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.lsm-modal.active .lsm-modal-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.lsm-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
}

.lsm-modal-close:hover {
  background: #f1f5f9;
  color: #132c4b;
  transform: rotate(90deg);
}

.lsm-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lsm-modal-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  padding: 0 20px;
}

.lsm-tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: #64748b;
  transition: all 0.3s;
  position: relative;
  top: 2px;
}

.lsm-tab-btn:hover {
  color: #132c4b;
  background: rgba(19, 44, 75, 0.05);
}

.lsm-tab-btn.lsm-tab-active {
  color: #132c4b;
  border-bottom-color: #132c4b;
  background: white;
}

.lsm-modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 70px);
  padding: 0;
}

.lsm-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.lsm-tab-content.lsm-tab-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lsm-form-container {
  padding: 40px;
}

.lsm-form-header {
  margin-bottom: 30px;
  text-align: center;
}

.lsm-form-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.lsm-form-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.lsm-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lsm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .lsm-form-row {
    grid-template-columns: 1fr;
  }
}

.lsm-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsm-label {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.lsm-input-wrapper {
  position: relative;
}

.lsm-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.lsm-input {
  width: 100%;
  padding: 12px 12px 12px 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s;
  background: white;
}

.lsm-input:focus {
  outline: none;
  border-color: #132c4b;
  box-shadow: 0 0 0 3px rgba(19, 44, 75, 0.1);
}

.lsm-form-footer-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.lsm-link {
  font-size: 13px;
  color: #132c4b;
  text-decoration: none;
  font-weight: 500;
}

.lsm-link:hover {
  text-decoration: underline;
}

.lsm-btn {
  padding: 14px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  width: 100%;
}

.lsm-btn-primary {
  background: #132c4b;
  color: white;
}

.lsm-btn-primary:hover {
  background: #0f233d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 44, 75, 0.3);
}

.lsm-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lsm-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #94a3b8;
  font-size: 14px;
}

.lsm-divider::before,
.lsm-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.lsm-google-signin {
  width: 100%;
  margin-bottom: 20px;
}

.lsm-message {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}

.lsm-message.hidden {
  display: none;
}

.lsm-message.success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.lsm-message.error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

@media (max-width: 768px) {
  .lsm-modal-container {
    max-width: 100%;
    margin: 10px;
  }

  .lsm-form-container {
    padding: 24px;
  }

  .lsm-modal-tabs {
    padding: 0 10px;
  }

  .lsm-tab-btn {
    padding: 12px 10px;
    font-size: 14px;
  }
}

/* Shortcode Button Styles */
.lsm-login-button-shortcode {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer !important;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1.5;
  font-family: inherit;
  position: relative !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Force clickability on all child elements */
.lsm-login-button-shortcode * {
  pointer-events: none !important;
  cursor: inherit !important;
}

.lsm-login-button-shortcode .lsm-btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.lsm-login-button-shortcode:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lsm-login-button-shortcode:active {
  transform: translateY(0);
}

/* Default Style */
.lsm-btn-shortcode-default {
  background-color: #132c4b;
  color: white;
  border: 2px solid #132c4b;
}

.lsm-btn-shortcode-default:hover {
  background-color: #0f233d;
  border-color: #0f233d;
  color: white;
}

/* Primary Style */
.lsm-btn-shortcode-primary {
  background-color: #132c4b;
  color: white;
  border: 2px solid #132c4b;
  box-shadow: 0 2px 8px rgba(19, 44, 75, 0.3);
}

.lsm-btn-shortcode-primary:hover {
  background-color: #0f233d;
  border-color: #0f233d;
  color: white;
  box-shadow: 0 4px 16px rgba(19, 44, 75, 0.4);
}

/* Outline Style */
.lsm-btn-shortcode-outline {
  background-color: transparent;
  color: #132c4b;
  border: 2px solid #132c4b;
}

.lsm-btn-shortcode-outline:hover {
  background-color: #132c4b;
  color: white;
  border-color: #132c4b;
}

/* Small Button */
.lsm-login-button-shortcode.small {
  padding: 8px 16px;
  font-size: 14px;
}

.lsm-login-button-shortcode.small .lsm-btn-icon {
  width: 16px;
  height: 16px;
}

/* Large Button */
.lsm-login-button-shortcode.large {
  padding: 16px 32px;
  font-size: 18px;
}

.lsm-login-button-shortcode.large .lsm-btn-icon {
  width: 20px;
  height: 20px;
}

/* Full Width Button */
.lsm-login-button-shortcode.full-width {
  width: 100%;
  display: flex;
}

/* Disabled State */
.lsm-login-button-shortcode:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}