/* static/css/styles.css */

:root {
    --header-height: 80px;
    --footer-height: 60px;
}

.content-area {
    min-height: calc(100vh - 320px);
    /* Adjust based on your header/footer height */
    padding-bottom: 80px;
    /* Prevent content from being hidden behind buttons */
}

html,
body {
    height: 100%;
    margin: 0;
    padding-left: 2rem;
    padding-right: 2rem;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header-container {
    border-bottom: 2px solid #dee2e6;
    height: 80px;
    display: flex;
    align-items: center;
}

.header-timer {
    font-family: monospace;
    font-size: 1.2rem;
    /* font-weight: bold; */
}

.header-logo {
    height: 66px;
    max-width: 100%;
}

.header-link {
    text-decoration: none;
    font-weight: 500;
}

.body-header-topic {
    color: #0b5ed7; ;
}

.content {
    flex: 1 0 auto;
    padding-bottom: 100px;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main.content-wrapper {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    overflow-y: auto;
    position: relative;
}

.left-section,
.right-section {
    background-color: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
    /* border: 1px solid #dee2e6; */
    flex: 1;
    min-width: 300px;
    padding: 2rem;
    padding-left: 5rem;  /* add or adjust this */
    padding-right: 5rem; /* add this to match the left */
    overflow-y: auto;
}

/* Full-height vertical divider */
.divider-vertical {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    border-left: 2px solid #dee2e6;
    margin-left: -0.5px;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.1);
}

/* Remove divider and adjust layout on mobile */
@media (max-width: 768px) {
    .divider-vertical {
        display: none;
    }

    .left-section {
        border-bottom: 1px solid #dee2e6;
    }

    .header-logo {
        height: 40px; /* Adjust logo size for mobile */
    }
}

.footer {
    flex-shrink: 0;
    padding: 10px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    width: 100%;
}

.btn-group-right {
    display: flex;
    gap: 15px;
}
.radio-options {
    margin-top: 20px;
}
.form-check-input {
    margin-top: 0.3em;
}
.form-check-label {
    padding-left: 10px;
}
.radio-options .form-check {
    margin-bottom: 1rem;
}

.radio-options .form-check-label {
    font-size: 1.1rem;
}

.radio-options .form-check-input {
    transform: scale(1.4);
    margin-top: 0.4em;
    margin-right: 10px;
}

.custom-img {
    max-width: 80%;
}

/* Result message container */
.result-message {
    font-size: 1.25rem; /* Same as fs-5 */
    margin: 1rem 0;
}

/* Correct message */
.result-correct {
    color: #28a745; /* Bootstrap's success green */
}

/* Incorrect message */
.result-incorrect {
    color: #dc3545; /* Bootstrap's danger red */
}

/* Answer text */
.answer-text {
    margin: 0.5rem 0;
    color: #0d6efd; /* Exact match for btn-primary */
}

/* Correct answer highlight */
.correct-answer {
    color: #28a745;
    font-weight: bold;
    text-transform: uppercase;
}

/* User answer highlight */
.user-answer {
    /* color: #dc3545; Bootstrap's danger red */
    color: red;
}

.result-message-block {
    margin-bottom: 3rem;  /* Adjust this value as needed */
}

/* Change SVG fill color via CSS */
.grid-icon rect {
    fill: #0b5ed7; 
    transition: fill 0.2s; /* Optional: smooth hover effect */
}

/* Hover effect */
.grid-icon:hover rect {
    fill: #0d6efd;
}

.square {
    width: 60px;
    height: 60px;
    background-color: #0056b3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border-radius: 4px; /* optional: rounded corners */
    margin: 1px; /* Add spacing around each square */
    transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out;
    cursor: pointer; /* Change cursor to pointer on hover */
  }

.square:hover {
    opacity: 0.9;
    transform: scale(1.05);
    
}

.square:hover, .square:focus {
    outline: 2px solid #666;
    transition: transform 0.1s ease;
}



  .square-correct {
    background-color: #28a745; /* green for correct */
}

    .square-wrong {
        background-color: #dc3545; /* red for wrong */
    }

.square-answered {
    background-color: #393ee8; /* for answered */
}

.square-not-answered {
    background-color: gray; /* */
}

.square-flagged {
    background-color: #ffc107; 
}



    .square-not-read {
        background-color: #ccc;
        border: 1px solid #888;
    }
    


.squares-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 0 20px; /* Increased top padding for visual clarity */
  margin-top: 1.5rem;
  clear: both;
  flex-wrap: wrap; /* Ensures content wraps if it exceeds horizontal space */
}


.square-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* 10 per row */
  gap: 0px 3px; /* Adjust the gap between squares */
  max-width: 640px; /* or any width you prefer */
  margin: 0 auto;
}

.auth-bar {
    background-color: #343a40;
    padding: 10px 20px;
    color: white;
    display: flex;
    align-items: center;
}
.auth-bar a, .auth-bar form button {
    color: white;
    text-decoration: none;
    border: none;
    background: none;
}
.auth-bar form {
    margin: 0;
}

.subject-card {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    border-radius: 15px;
    transition: transform 0.2s;
}
.subject-card:hover {
    transform: scale(1.05);
    cursor: pointer;
}
.math { background-color: #007bff; }
.thinking { background-color: #28a745; }
.english { background-color: #ffc107; color: black; }

.auth-bar {
    background-color: #343a40;
    padding: 10px 20px;
    color: white;
    display: flex;
    align-items: center;
}
.auth-bar a, .auth-bar form button {
    color: white;
    text-decoration: none;
    border: none;
    background: none;
}
.auth-bar form {
    margin: 0;
}
.square-flagged {
    border: 2px solid #dc3545; /* red border */
    position: relative;
}

.square-flagged::after {
    content: "⚑";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 24px;          /* ⬅️ Make it bigger */
    color: red;
    background: white;
    border-radius: 50%;
    padding: 4px;
    z-index: 10;
    line-height: 1;
}

.summary-divider {
  width: 80%;
  max-width: 800px;
  height: 2px;
  background-color: #ccc;
  border: none;
  margin: 2rem auto; /* centers horizontally and gives vertical spacing */
  display: block;
  clear: both;
}

.square-flagged-answer {
    border: 2px solid #dc3545; /* red border */
}

.flag-icon {
  position: absolute;
  top: -10px;
  right: -10px;
  /* left: -10px;          changed from right to left */
  font-size: 24px;
  color: red;
  background-color: white;
  border-radius: 50%;
  padding: 2px 5px;
  z-index: 2;
  line-height: 1;
}