:root{
  --primary-color: #9149e5;
  --secondary-color: #D2ACFF;
  --soft-red: #e74c3c;
  --grey: #c8c8c8;
}

button, input[type="submit"], input[type="reset"] {
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
	display: flex;
	justify-content: center;
	align-items: center;
}

.dev-border-red{
  border: 1px solid red;
}
.dev-border-blue{
  border: 1px solid blue;
}
.dev-border-green{
  border: 1px solid green;
}
.dev-border-yellow{
  border: 1px solid yellow;
}

body {
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
  padding: 4.5rem;
}

.primary-color{
  background-color: #9149e5;
}

.navbar a{
  color:white;
}

.primary-font{
  font-family: "Source Sans 3", sans-serif;
  font-optical-sizing: auto;
  font-weight: 350;
  font-style: normal;
}

.primary-font-color{
  color: #9149e5;
}

.secondary-font-color{
  color:white;
}

.s1 {
  font-size: 3.125rem;
}

.s2{
  font-size: 1.5rem
}

.btn:hover{
  background-color: #9149e5 !important;
  color: white !important;
}

.btn-disabled{
  background-color: var(--grey) !important;
  cursor: not-allowed !important;
}

.btn-disabled:hover {
  background-color: var(--grey) !important;
  color: black !important;
}

.puzzle-card:hover{
  background-color: white;
}

.navbar-brand{
  font-family: "Source Sans 3", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1.5rem;
  color: white !important;
  cursor: default !important;
  user-select: none;
}

.navbar-brand:hover{
  color: white !important;
}

.puzzle-card-btn:link, .puzzle-card-btn:visited, .puzzle-card-btn:visited{
  color: #9149e5;
  text-decoration: none;
}

#read-more:visited{
  color: #9149e5;
  text-decoration: none;
}

#read-more:hover{
  color: white;
  text-decoration: none;
}

.card.puzzle-card{
  height: 20rem;
  width: 36rem;
  /* background-color: var(--primary-color); */
  border-color: var(--primary-color);
}

#welcome-card{
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  height: 20rem;
  width: 36rem;
  padding: 0rem 2.5rem;
  background-color: var(--primary-color);
  border-radius: 1rem;
  box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.5);
  margin-top: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#start-row{
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#start-btn{
  background-color: var(--secondary-color);
  color: black;
  text-align: center;
  height: 7rem;
  width: 13rem;
  border-radius: 1rem;
  font-size: 3.5rem;
}

#additional-row{
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  font-size: 1.5rem;
}

.welcome-card-btn{
  all: unset;
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  text-align: center;
  font-weight: 300;
}

.welcome-card-btn:hover, .welcome-card-btn:visited{
  color: white;
  text-decoration: none;
}

.custom-modal {
  position: fixed;
  top: 70px !important;
  right: -12px !important;
  width: 16rem;
  margin: 0;
  z-index: 1050;
}

.custom-modal .modal-content {
  background-color: #d1b3ff;
  border-radius: 1rem;
  padding: 0.8rem 0.6rem;
  text-align: center;
}

.custom-modal .modal-body a {
  display: block;
  padding: 0.75rem;
  color: black;
  text-decoration: none;
  font-size: 1.2rem;
  border-radius: 0.6rem;
  transition: background-color 0.3s ease;
}
.custom-modal .modal-body a:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

#user-toggle-btn {
  background-color: var(--secondary-color);
  color: black;
  text-align: center;
  height: 2.5rem;
  width: auto;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-size: 1.25rem;
  position: relative;
}

#user-toggle-btn .arrow {
  margin-left: 0.5rem;
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 0.4rem solid transparent;
  border-right: 0.4rem solid transparent;
  border-top: 0.4rem solid black;
  transition: transform 0.3s ease; /* Added for animation */
}

#user-toggle-btn.down .arrow {
  transform: rotate(180deg); /* Replaces border changes */
}

.hidden {
  display: none !important;
}

/* Error Message Styles */
.error-message-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #e8e3ee;
  color: #333333;
  padding: 1rem;
  border-radius: 1rem;
  z-index: 9999;  /* Increased z-index to ensure it's above other elements */
  min-width: 18.75rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 5px solid var(--soft-red);
}

.error-content {
  display: flex;
  flex-direction: column; 
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.error-icon {
  margin-right: 0.75rem;
  font-size: 1.5rem;
  color: var(--soft-red)
}

.error-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: black;
}

.error-content > div:first-child {
  display: flex;
  align-items: center;
}

.error-sub-text {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0.275rem;
  height: 3px;
  width: calc(100% - 0.275rem);
  background: var(--soft-red);
  border-radius: 0 0 0.25rem 0.25rem;
}

.error-message-container.show {
  transform: translateX(0);
}

.error-message-container.hide {
  transform: translateX(120%);
}


/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 1.25rem;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 31.25rem;
  transition: all 0.5s ease-in-out;
}

.form-group:first-of-type {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
}

#otherOccupation {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: none;
}

#otherOccupation.show {
  opacity: 1;
  margin-bottom: 1.5rem;
  display: block;
}

#form-description{
  font-size: 0.875rem;
  color: #666;
}

.form-actions {
  text-align: right;
  margin: 3rem 0 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-actions > .submit-btn{
  background-color: var(--secondary-color);
  color: black;
  text-align: center;
  height: 4rem;
  width: auto;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-size: 1.3rem;
  position: relative;
}

/* Error state */
.form-group.error input,
.form-group.error select {
    border-color: var(--soft-red);
}

.validation-message {
    min-height: 1.25rem;  /* Reserve space for message */
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: var(--soft-red);
    transition: opacity 0.2s ease;
}

/* Accessibility */
.validation-message:empty {
    display: block;  /* Keep the space but make it invisible */
    opacity: 0;
}

.required-asterisk{
  color: var(--soft-red);
}

/* Loader styles */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}