/* Custom Admin Styles */

/* Login Page Styling */
body.login-page {
  background-color: #f3f4f6;
  background-image: radial-gradient(#d1d5db 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Times New Roman', Times, serif; /* Elegant Serif */
  margin: 0;
  min-height: 100vh;
  color: #1f2937;
}

/* Hide the default messy background if any */
body.login-page #nc-root {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Target the Login Container - Remove Card, Make it Minimal */
body.login-page section {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 3rem !important;
  border-radius: 1.5rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: fadeIn 0.8s ease-out;
  /* Ensure proper sizing */
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1.5rem !important;
}

/* Add "Hebron Admin" Text */
body.login-page section::before {
  content: "Hebron Higher Secondary School";
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #6b7280;
  margin-bottom: 0.25rem;
  font-family: system-ui, -apple-system, sans-serif;
  text-transform: uppercase;
}

body.login-page section::after {
  content: "Admin Login";
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  order: -1; /* Ensure it stays at top */
  line-height: 1.1;
  background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide Decap/Netlify Branding & Default Logo */
body.login-page section a[href*="decapcms"],
body.login-page section a[href*="netlifycms"],
body.login-page img,
body.login-page section > div[class*="Logo"],
body.login-page svg:not(button svg) {
  display: none !important;
}

/* Login Button */
body.login-page button {
  background-color: #1a1a1a !important;
  color: white !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  font-weight: 500 !important;
  padding: 0.875rem 2rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 0.95rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
  margin-top: 0.5rem !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

body.login-page button:hover {
  background-color: #000000 !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CMS Content Styles (Preview & Editor) */
/* These apply to the preview iframe and potentially the editor if scoped correctly */
.prose p, 
.frame-content p,
.slate-editor p,
[data-slate-editor] p,
/* Fallback for preview iframe where we want global p styles */
body:not(.login-page) p {
  margin-bottom: 1.25em;
  line-height: 1.6;
}

body:not(.login-page) h1,
body:not(.login-page) h2,
body:not(.login-page) h3,
body:not(.login-page) h4 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 700;
  line-height: 1.3;
}

body:not(.login-page) ul,
body:not(.login-page) ol {
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

body:not(.login-page) li {
  margin-bottom: 0.5em;
}

body:not(.login-page) blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1em;
  font-style: italic;
  margin-bottom: 1.25em;
}
