/*
 Theme Name: Twenty Twenty-Five Child
 Theme URI: https://example.com
 Description: Child theme for Twenty Twenty-Five
 Author: You
 Author URI: https://example.com
 Template: twentytwentyfive
 Version: 1.0.0
*/

/* === APTIPILOT GLOBAL STYLES === */

/* ---------------------------------
   1. Layout & Sticky Footer
---------------------------------- */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

footer.wp-block-template-part {
  margin-top: auto;
  background: inherit;
  z-index: 10;
}

main[style*="margin-top"] {
    margin-top: 0 !important;
}

/* Override inner full-width block padding */
.wp-block-group.alignfull.has-global-padding {
    padding-top: 20px !important;
}

/* ---------------------------------
   2. Navigation Fade-In
---------------------------------- */
nav.wp-block-navigation {
  opacity: 0;
  transition: opacity 0.25s ease;
}
body.nav-ready nav.wp-block-navigation {
  opacity: 1;
}

/* ---------------------------------
   3. Auth & Profile Forms
---------------------------------- */
#aptipilot-login-wrap,
#aptipilot-forgot-wrap,
#ap-sp-wrap,
#aptipilot-profile,
#aptipilot-change-email-card,
#aptipilot-change-password-card {
  max-width: 500px;
  padding: 2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  font-family: var(--wp--preset--font-family--manrope, system-ui, sans-serif);
}

#aptipilot-login-wrap h3,
#aptipilot-forgot-wrap h3,
#ap-sp-wrap h3,
#aptipilot-profile h2,
#aptipilot-change-email-card h2,
#aptipilot-change-password-card h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: #1e73be;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

#aptipilot-change-email-card label,
#aptipilot-change-password-card label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

#aptipilot-login-wrap input,
#aptipilot-forgot-wrap input,
#ap-sp-wrap input,
#aptipilot-profile input,
#aptipilot-change-email-card input,
#aptipilot-change-password-card input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

#aptipilot-login-wrap button,
#aptipilot-forgot-wrap button,
#ap-sp-wrap button,
#aptipilot-profile button,
#aptipilot-change-email-card button,
#aptipilot-change-password-card button {
  width: 100%;
  background-color: #1e73be;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 5px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

#aptipilot-login-wrap button:hover,
#aptipilot-forgot-wrap button:hover,
#ap-sp-wrap button:hover,
#aptipilot-profile button:hover,
#aptipilot-change-email-card button:hover,
#aptipilot-change-password-card button:hover {
  background-color: #155d93;
}

#aptipilot-msg,
#aptipilot-reset-msg,
#ap-sp-status,
#aptipilot-profile-msg {
  text-align: center;
  margin-top: 0.75rem;
  color: #444;
  font-size: 0.95rem;
}

#aptipilot-profile p {
  margin: 0.4rem 0;
  font-size: 1rem;
}

#aptipilot-change-email-card,
#aptipilot-change-password-card {
  margin-top: 1.5rem;
  text-align: left;
}

/* ---------------------------------
   4. Exam Tests Page
---------------------------------- */
/* Perfectly aligned grid of test buttons */
#ap-exam-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);   /* 6 columns across for up to 12 tests */
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  margin: 0 auto 20px auto;
                     /* matches test container below */
}

/* Buttons */
#ap-exam-list .ap-exam-btn {
  background: #1e73be;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-align: center;
}

#ap-exam-list .ap-exam-btn:hover {
  background: #135a96;
  transform: translateY(-1px);
}

/* Keep grid responsive */
@media (max-width: 1000px) {
  #ap-exam-list {
    grid-template-columns: repeat(4, 1fr); /* tablets */
    max-width: 720px;
  }
}

@media (max-width: 700px) {
  #ap-exam-list {
    grid-template-columns: repeat(2, 1fr); /* phones */
    max-width: 360px;
  }
}


/* Allow test selection to expand horizontally */
#ap-exam-sidebar {
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
  margin-bottom: 1rem;
}
#ap-exam-stage {
  border-radius: 12px;
  border: 1px solid #d7d7d7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  background: #fff;
}

#ap-exam-wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Let exam sidebar expand horizontally so buttons can flow */
#ap-exam-wrap aside {
  flex: 1 1 100%;
  max-width: none;
  width: 100%;
  margin-bottom: 1rem;
}


#ap-exam-wrap main {
  flex: 3 1 600px;
  min-width: 300px;
}

/* Highlight active test button */
#ap-exam-list .ap-exam-btn.active {
  background-color: #155d93 !important;  /* ensure override */
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.25);
  transform: scale(1.02);
  transition: background 0.2s ease, transform 0.1s ease;
}

 .wp-site-blocks > main.wp-block-group {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#ap-tests-exam {
  display: none; /* JS reveals on load */
  max-width: 1100px;
  margin: 1rem auto;
}

#ap-exam-wrap {
  display: none; /* JS reveals after plan check */
  flex-wrap: wrap;
  gap: 20px;
}

#ap-exam-wrap aside {
  flex: 1 1 100%;
  width: 100%;
  margin-bottom: 1rem;
}

#ap-exam-wrap main {
  flex: 3 1 600px;
  min-width: 300px;
}

#ap-exam-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ---------------------------------
   5. Results page
---------------------------------- */

/* === Results: All Attempts Table === */
#aptipilot-results-dashboard table {
  font-size: 0.95rem !important;
}

#aptipilot-results-dashboard table th,
#aptipilot-results-dashboard table td {
  font-size: 0.95rem !important;
  padding: 6px 8px !important;
}

#aptipilot-results-dashboard h3 {
  font-size: 1.2rem !important;
  margin-bottom: 0.5rem;
}

/* Consistent column widths for attempt tables */
#aptipilot-results-dashboard table {
  table-layout: fixed;
  width: 100%;
}

#aptipilot-results-dashboard table th:nth-child(1),
#aptipilot-results-dashboard table td:nth-child(1) {
  width: 35%;
}

#aptipilot-results-dashboard table th:nth-child(2),
#aptipilot-results-dashboard table td:nth-child(2) {
  width: 15%;
}

#aptipilot-results-dashboard table th:nth-child(3),
#aptipilot-results-dashboard table td:nth-child(3),
#aptipilot-results-dashboard table th:nth-child(4),
#aptipilot-results-dashboard table td:nth-child(4) {
  width: 15%;
}

#aptipilot-results-dashboard table th:nth-child(5),
#aptipilot-results-dashboard table td:nth-child(5) {
  width: 20%;
}

#apr-status {
  font-size: 0.95rem;
  color: #555;
}
