/* ---------------------
   Exam Scheduler Styles
   --------------------- */

body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 20px;
  background: #fff;
  color: #111;
}

/* signed-out view */
.signed-out #loginContainer {
  display: block;
}
.signed-out #signoutBtn,
.signed-out .scheduler-panel,
.signed-out #currentTime,
.signed-out table,
.signed-out #startAll,
.signed-out #clearAll,
.signed-out footer {
  display: none;
}

/* layout basics */
#loginContainer {
  display: none;
  margin-bottom: 16px; /* slightly smaller */
}
#currentTime {
  font-size: 4rem;
  font-weight: bold;
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
th,
td {
  padding: 12px 16px;
  text-align: left;
  font-size: 1.5rem;
}
th {
  background: #222;
  color: #fff;
}
td {
  border-bottom: 1px solid #eee;
}
tr:last-child td {
  border-bottom: none;
}
th:nth-child(5),
th:nth-child(6),
td:nth-child(5),
td:nth-child(6) {
  padding: 8px 12px;
  font-size: 1.2rem;
  color: #555;
  width: 80px;
}
footer {
  margin-top: 40px;
  padding: 12px 0;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid #ddd;
  text-align: center;
}

/* ── BUTTON BASE ── */
button {
  font-family: inherit;
  cursor: pointer;
}

/* ── Google‐branded button ── */
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  background: #fff;
  font-size: 1rem;
  font-weight: 500;
  color: #444;
  transition: background 0.15s ease-in-out;
}
.google-btn:hover {
  background: #f7f7f7;
}
.google-icon {
  height: 18px;
  width: 18px;
}

/* ── Card‐style exam rows ── */
thead {
  display: none;
}
#examList tr {
  display: block;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
#examList td:first-child {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 8px;
}
#examList td:nth-child(2),
#examList td:nth-child(3),
#examList td:nth-child(4) {
  display: inline-block;
  margin-right: 16px;
  font-size: 1.6rem; /* bigger size */
}
#examList td:nth-child(5),
#examList td:nth-child(6) {
  display: inline-block;
  float: right;
  margin-left: 8px;
  font-size: 1.2rem;
}
#examList td {
  border: none;
}

/* ── Expired label style ── */
.ended {
  color: red;
  font-weight: bold;
}

/* ── AUTH BUTTONS ── */
.auth-btn {
  display: inline-block;
  padding: 10px 20px;   /* match external-btn height */
  font-size: 1rem;
  cursor: pointer;
  margin: 6px 8px;           /* horizontal gap */
  border: 1px solid #dcdcdc; /* uniform light gray border */
  border-radius: 6px;        /* rounded corners */
  background: #fff;
  color: #444;
  transition: background 0.15s ease-in-out;
}
.auth-btn:hover {
  background: #f7f7f7;
}

/* ── EXTERNAL LOGIN BUTTONS ── */
.external-login {
  margin-top: 20px;
}
.external-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  min-width: 240px; /* ensures uniform width */
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  background: #fff;
  color: #444;
  transition: background 0.15s ease-in-out;
}
.external-btn:hover {
  background: #f7f7f7;
}
.external-icon {
  width: 20px;
  height: 20px;
}

/* ── LOGIN PANEL INPUTS ── */
#loginContainer input[type="email"],
#loginContainer input[type="password"] {
  width: 90%;
  max-width: 450px;
  padding: 10px;
  margin: 8px auto;
  border: 1px solid #c0c0c0;
  border-radius: 6px;
  font-size: 1rem;
  display: block;
  box-sizing: border-box;
}
#loginContainer .stay-label {
  font-size: 0.9rem;
  display: block;
  margin: 8px 0;
  text-align: left;
  width: 90%;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

/* ── EMAIL/PASSWORD BUTTONS ── */
.email-btns {
  margin-top: 12px;
}

/* ############################################
   #                                          #
   #    Panel & Sign-Out Icon Styles         #
   #                                          #
   ############################################ */

/* ── Base “panel” styling ── */
.panel {
  position: relative;        /* so .signout-icon is relative to this box */
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  margin: 20px auto;
  padding: 16px;             /* reduced padding for less vertical height */
  background: #fff;
  box-sizing: border-box;
  max-width: 800px;          /* both panels share the same max-width */
}

/* ── Sign-Out Button (in scheduler panel) ── */
.signout-icon {
  position: absolute;
  top: -10px;    /* pull it above the panel’s top edge */
  right: -10px;  /* pull it slightly beyond the right edge */
  background: #fffdf9;   /* match scheduler‐panel background */
  border: 1px solid #ffeccb;
  border-radius: 16px;  /* fully round pill shape */
  padding: 4px 8px;
  font-size: 0.9rem;
  color: #004085;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;  /* only show when signed in */
  transition: background 0.15s ease-in-out, opacity 0.15s ease-in-out;
}
.signout-icon:hover {
  background: #fffbe6;
  opacity: 0.9;
}

/* only show the sign-out button if the body is NOT .signed-out */
body:not(.signed-out) .signout-icon {
  display: inline-flex;
}

/* ── Panel Title ── */
.panel-title {
  margin-bottom: 16px;  /* slightly smaller bottom margin */
  color: #004085;       /* dark blue text */
  font-size: 2rem;
}

/* ── LOGIN PANEL BACKGROUND ── */
.login-panel {
  background: #e6f2ff;   /* pale blue */
  border-color: #b3d4ff;
  /* max-width inherited from .panel */
}

/* ── SCHEDULER PANEL BACKGROUND ── */
.scheduler-panel {
  background: #fffdf9;   /* pale cream */
  border-color: #ffeccb;
  /* max-width inherited from .panel */
}

/* ── SCHEDULER FORM INPUTS & BUTTON ── */
.scheduler-panel #examTitle {
  width: 60%;
  max-width: 400px;
  padding: 10px;
  margin: 8px auto 12px auto; /* bottom margin to separate from next row */
  border: 1px solid #c0c0c0;
  border-radius: 6px;
  font-size: 1rem;
  display: block;
  box-sizing: border-box;
}
.scheduler-panel .time-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.scheduler-panel #hours,
.scheduler-panel #minutes,
.scheduler-panel #extra {
  width: 80px;
  padding: 10px;
  border: 1px solid #c0c0c0;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
.scheduler-panel .add-btn {
  padding: 10px 20px;
  border-radius: 6px;
  background-color: #28a745;
  color: #fff;
  border: 1px solid #218838;
}
.scheduler-panel .add-btn:hover {
  background-color: #218838;
}

/* ── Current Time ── */
.scheduler-panel #currentTime {
  font-size: 3.5rem;
  color: #d63384;  /* deep pink accent */
  margin: 20px 0;
}

/* ── Action Buttons ── */
.scheduler-panel .action-buttons {
  margin-top: 20px;
}
.scheduler-panel .action-buttons .auth-btn {
  padding: 10px 20px;
  margin: 6px 12px;
  border-radius: 6px;
  background-color: #17a2b8;
  color: #fff;
  border: 1px solid #138496;
}
.scheduler-panel .action-buttons .auth-btn:hover {
  background-color: #138496;
}

/* ── Reduce top margin of footer when inside scheduler panel ── */
.scheduler-panel + footer {
  margin-top: 40px;
}

/* ───────────────────────────────────────────
   Landing Page Styles
   ─────────────────────────────────────────── */

/* common container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* ─── Hero ─── */
.hero {
  background: #e6f2ff;            /* soft blue */
  border-radius: 8px;
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.hero h1 {
  font-size: 2.5rem;
  color: #004085;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 650px;
  margin: 0 auto 30px;
  color: #333;
}

.hero button {
  padding: 14px 30px;
  font-size: 1.125rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.hero button:hover {
  background: #218838;
}

/* ─── Features ─── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.feature-item {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: left;
}

.feature-item h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #004085;
}

.feature-item p {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
}

/* ─── How It Works ─── */
.how-it-works {
  margin-bottom: 60px;
}

.how-it-works h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  color: #004085;
  text-align: center;
}

.how-it-works .steps {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.how-it-works .step {
  flex: 1 1 200px;
  max-width: 240px;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  text-align: left;
}

.how-it-works .step::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  top: -16px;
  left: -16px;
  width: 32px;
  height: 32px;
  line-height: 32px;
  background: #28a745;
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  text-align: center;
}

.steps {
  counter-reset: step;
}

.how-it-works .step h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #333;
}

.how-it-works .step p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #555;
}

/* ─── Footer ─── */
footer {
  font-size: 0.85rem;
  color: #666;
  padding: 20px 0;
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

/* ─── Responsive tweaks ─── */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .how-it-works .step {
    max-width: 100%;
  }
}
