/*
 * COPYRIGHT - CUBIC TRANSPORTATION SYSTEMS ("CUBIC"). ALL RIGHTS RESERVED.
 *
 * Information Contained Herein is Proprietary and Confidential.
 * The document is the property of "CUBIC" and may not be disclosed,
 * distributed, or reproduced without the express written permission of
 * "CUBIC".
 */

/* ==========================================================================
 * Verification Page Elements
 * ========================================================================== */

/* Fade effect for buttons, spinner, and error messages */
.fade {
  transition: opacity 0.5s ease-out;
}

/* ========================================================================
 * Responsive and Accessibility Enhancements
 * ======================================================================== */

/* Reduce motion for users with motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  #spinner,
  .fade,
  #verifyButton {
    animation: none !important;
    transition: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  #verifyButton {
    border-width: 3px;
  }

  .verifyError {
    text-decoration: underline;
  }

  .verifySuccess {
    text-decoration: underline;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #messageContainer {
    color: #e0e0e0;
  }

  .verifyError {
    color: #ff6b6b;
  }

  .verifySuccess {
    color: #51cf66;
  }

  .verifyInfo {
    color: #74c0fc;
  }
}

/* Very small screens */
@media (max-width: 320px) {
  #messageContainer {
    font-size: 13px;
  }

  #verifyButton {
    font-size: 12px;
    min-height: 40px;
    margin-left: 2px;
    margin-right: 2px;
  }
}

/* Landscape orientation optimization */
@media (max-height: 600px) and (orientation: landscape) {
  #messageContainer {
    margin-top: clamp(8px, 3%, 12px);
    margin-bottom: clamp(8px, 3%, 12px);
  }

  #verifyButton {
    margin-top: 12px;
    margin-bottom: 0;
  }
}

/* Style for verification error messages */
.verifyError {
  color: #d32f2f;
  font-weight: 500;
}

/* Success message styling for better visibility */
.verifySuccess {
  color: #388e3c;
  font-weight: 500;
}

/* Info message styling */
.verifyInfo {
  color: #1976d2;
  font-weight: 400;
}

/* Kickstart message styling */
.verifyKickstart {
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.2;
  margin-bottom: 12px;
  color: #2b384b;
}

/* Style for the message container (used for error and success messages) */
#messageContainer {
  margin: clamp(12px, 5%, 20px) auto;
  max-width: 100%;
  padding: 0 clamp(8px, 3%, 12px);
  text-align: center;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Style for the verification button */
#verifyButton {
  display: none; /* toggled via JS */

  margin-left: 5px;
  margin-right: 5px;
  margin-top: 16px;
  margin-bottom: 5px;

  padding-left: clamp(12px, 3vw, 16px);
  padding-right: clamp(12px, 3vw, 16px);
  padding-top: 0;
  padding-bottom: 0;

  min-height: 44px;
  height: auto;

  font-size: clamp(13px, 2vw, 14px);
  line-height: 1.5;
  cursor: pointer;
  background-color: rgb(87, 62, 192);
  color: white;
  border: 2px solid rgb(87, 62, 192);
  border-radius: 18px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Button hover/focus states for better interaction feedback */
#verifyButton:hover:not(:disabled):not(.disabled) {
  background-color: rgb(70, 50, 155);
  border-color: rgb(70, 50, 155);
}

#verifyButton:focus {
  outline: 3px solid #573ec0;
  outline-offset: 2px;
}

/* Spinner element to indicate processing */
#spinner {
  display: none; /* hidden by default, shown by JS when needed */
  width: clamp(24px, 5vw, 30px);
  height: clamp(24px, 5vw, 30px);
  border: 4px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

/* Animation keyframes for the spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}