/* ---------- Global Styles (for all pages) ---------- */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    box-sizing: border-box;
}

.container {
    background-color: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
    max-width: 95%;
    width: 400px;
}

img {
    max-width: 100px;
    display: block;
    margin: 0 auto 20px;
}

h1 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

p {
    font-size: 18px;
    color: #555;
}

label {
    display: block;
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"], .button {
    margin-top: 20px;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

input[type="submit"]:hover, .button:hover {
    background-color: #45a049;
}

.error {
    color: red;
    font-size: 16px;
    margin-top: 10px;
}

@media only screen and (max-width: 600px) {
    h1 {
        font-size: 20px;
    }
    
    p, label {
        font-size: 16px;
    }
    
    input[type="submit"], .button {
        font-size: 16px;
    }
    
    img {
        max-width: 80px;
    }
}

.disclaimer {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.disclaimer h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.disclaimer p {
    margin: 0;
    line-height: 1.5;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table, th, td {
    border: 1px solid #ddd;
    padding: 8px;
}

th {
    background-color: #f2f2f2;
    text-align: left;
}

td {
    text-align: left;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.pagination a {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 2px;
}

.pagination a.active {
    background-color: #4CAF50;
    color: white;
    border: 1px solid #4CAF50;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* ---------- Custom Styles for the Check-In Application ---------- */

/* Ensure our student photo scales down if the record card shrinks */
.photo {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 auto 15px;
}

/* Records container as a flex box (two columns) */
#records {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 20px;
}

/* Each record card styling */
.record {
  width: calc(50% - 20px);
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px;
  border-radius: 4px;
  background-color: #fff;
  position: relative;
  box-sizing: border-box;
  cursor: pointer;
}

.record.verified {
  background-color: #e0ffe0;
  cursor: default;
}

.record .info {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.record .countdown {
  color: red;
  font-size: 14px;
}

/* Modal overlay and modal content styling */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1000;
}

#confirmModal {
  background: #fff;
  width: 90%;
  max-width: 400px;
  margin: 100px auto;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  position: relative;
}

#confirmModal .photo {
  width: 150px;
  height: 150px;
  margin: 0 auto 10px;
}

#confirmModal button {
  padding: 10px 20px;
  margin: 10px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 40%;
}

#confirmYes {
  background-color: #4CAF50;
  color: white;
}

#confirmNo {
  background-color: #dc3545;
  color: white;
}

/* Verified label styling for record cards */
.verifiedLabel {
  background-color: #28a745;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.9em;
  border-radius: 3px;
  position: absolute;
  top: 10px;
  right: 10px;
}
