/*
 * Styling for the Learner Licence Exam Styled plugin.
 *
 * This stylesheet aims to emulate the look and feel of the official learner‑licence screen test.  A blue header
 * bar contains the candidate’s photograph, name, number, the remaining time (in red) and the score (in green).
 * Below the header sits the question area with a large font for the question text and optional symbol to the right.
 * Four options are presented as rows with radio buttons on the left and either text or images on the right.  Upon
 * submitting, the correct option turns green and the wrong selection, if any, turns red.  A 1200px max width
 * constrains the entire quiz.
 */

.lle-styled-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  border: 1px solid #ccc;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
  font-family: sans-serif;
  color: #333;
}

/* Header */
.lle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #00a2e8; /* bright blue */
  color: #fff;
  padding: 10px 15px;
}

.lle-candidate {
  display: flex;
  align-items: center;
}

.lle-photo {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #eee;
  margin-right: 10px;
}

.lle-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lle-info {
  line-height: 1.3;
}

.lle-info .lle-name {
  font-weight: bold;
  font-size: 1.2em;
}

.lle-info .lle-number {
  font-size: 0.9em;
}

.lle-status {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 1.1em;
}

.lle-status .lle-timer-label,
.lle-status .lle-score-label {
  margin-right: 4px;
}

.lle-timer-value {
  color: #ff1744; /* red for timer */
  font-weight: bold;
  min-width: 30px;
  text-align: right;
}

.lle-score-value {
  color: #2e7d32; /* green for score */
  font-weight: bold;
  min-width: 30px;
  text-align: right;
}

/* Question area */
.lle-body {
  padding: 20px 15px;
}

.lle-question-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 5px;
}

.lle-question-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 20px;
}

.lle-question-text {
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.4;
}

/* Display the question symbol at a fixed 120x120 size */
.lle-question-symbol {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.lle-question-symbol img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Options list */
.lle-options-list {
  border-top: 1px solid #eee;
}

.lle-option-row {
  display: flex;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.3s;
}

.lle-option-row:hover {
  background-color: #f7f7f7;
}

.lle-option-row input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.3);
}

.lle-option-index {
  width: 30px;
  font-weight: bold;
  font-size: 1.1em;
  color: #555;
  margin-right: 10px;
  text-align: center;
}

/* Images used within option content are constrained to 120x120 */
.lle-option-content img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.lle-option-row.correct {
  background-color: #4caf50;
  color: #fff;
}

.lle-option-row.wrong {
  background-color: #f44336;
  color: #fff;
}

.lle-option-row.disabled {
  pointer-events: none;
}

/* Proceed button */
.lle-proceed-btn {
  margin-top: 15px;
  padding: 10px 24px;
  background-color: #3f51b5;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}

.lle-proceed-btn:disabled {
  background-color: #9fa8da;
  cursor: not-allowed;
}

/* Result section */
.lle-result {
  text-align: center;
  padding: 30px 15px;
}

/* Result banner displays PASS and FAIL vertically with optional icons */
.lle-pass-fail {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.lle-pass-fail .lle-row {
  font-size: 2.2em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 5px 0;
}

/* Generic icon used in result rows */
.lle-icon {
  font-size: 0.8em;
}

.green-icon {
  color: #2e7d32;
}

.red-icon {
  color: #f44336;
}

/* Responsive adjustments for narrow screens */
@media (max-width: 600px) {
  /* Stack the header contents vertically for better readability */
  .lle-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .lle-status {
    margin-top: 8px;
    font-size: 0.95em;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }
  .lle-candidate {
    width: 100%;
  }
  .lle-photo {
    width: 60px;
    height: 60px;
    margin-right: 8px;
  }
  .lle-question-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  .lle-question-symbol {
    width: 120px;
    height: 120px;
    margin-top: 10px;
  }
  .lle-option-row {
    flex-wrap: wrap;
  }
  .lle-option-index {
    width: 25px;
    font-size: 1em;
  }
  .lle-option-row input[type="radio"] {
    transform: scale(1.2);
  }
  .lle-proceed-btn {
    width: 100%;
    padding: 12px;
  }
  .lle-start-screen input[type="text"] {
    width: 100% !important;
    max-width: none;
  }
}

.lle-user-details {
  font-size: 1em;
  margin-bottom: 15px;
  line-height: 1.5;
}

.lle-score-summary {
  font-size: 1.1em;
  margin-bottom: 20px;
}

.lle-result-actions {
  margin-top: 20px;
}

.lle-result-actions button {
  background-color: #00897b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  margin: 0 10px;
}

.lle-result-actions button:hover {
  background-color: #00695c;
}

/* Start screen prompting for user name */
.lle-start-screen {
  padding: 40px 20px;
  text-align: center;
  font-family: sans-serif;
}