/* Base HTML and body styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', 'Helvetica', 'Arial', sans-serif;
    /* Slightly warm neutral background */
    background-color: #F5F5F5; 
}

/* Center content within the page */
body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    overflow-y: auto;
}

/* Form container */
form {
    /* Clean white surface for the form */
    background-color: #FFFFFF; 
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 700px;
    width: 90%; /* Responsive width */
    height: 100%;
}

/* Accent heading color */
h1 {
    margin-bottom: 18px;
    /* Dark pink heading tone */
    color: #D81B60; 
}

/* Paragraph styling */
p {
    margin-bottom: 8px;
    /* Slightly lighter dark pink body text */
    color: #C2185B; 
}

/* Smaller copyright text */
p.copyright {
    padding-bottom: 20px;
    font-size: 0.75rem; 
}

/* Field labels */
label {
    display: block;
    margin-bottom: 10px;
    /* Dark pink label color */
    color: #D81B60; 
    font-size: 1.2rem; 
}

/* Inputs, selects, and textareas */
input, select, textarea {
    max-width: 100%;
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    /* Neutral light-gray border */
    border: 1px solid #E0E0E0;  
    border-radius: 4px;
    font-size: 1rem; 
    /* Neutral light-gray background */
    background-color: #F5F5F5; 
    box-sizing: border-box;
}

/* Focus state uses the primary green */
input:focus, select:focus, textarea:focus {
    /* Bright green focus border */
    border-color: #4CAF50; 
    outline: none;
    /* Green focus glow */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); 
}

/* Radio buttons and checkboxes */
input[type="radio"], input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Buttons use the primary green */
button {
    width: calc(25% - 10px); /* Responsive button width */
    padding: 10px 20px;
    /* Primary green background */
    background-color: #4CAF50; 
    color: white; /* White button text */
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hover state darkens the primary green */
button:hover {
    /* Darker green on hover */
    background-color: #388E3C; 
    /* Light hover shadow */
    box-shadow: 0 4px 8px rgba(56, 142, 60, 0.2); 
}

/* Active state darkens further */
button:active {
    /* Deepest green for pressed state */
    background-color: #2E7D32; 
}

/* Error state styling */
.input-error {
    /* Light orange error border */
    border: 1px solid #FFCCBC; 
    /* Light orange error gradient */
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2); 
}

/* Focused error state */
.input-error:focus {
    /* Bright orange error border */
    border-color: #FF5722; 
    outline: none;
    /* Orange error glow */
    box-shadow: 0 0 8px rgba(255, 87, 34, 0.5); 
    /* Lighter orange focus gradient */
    background: linear-gradient(135deg, #FFEFE5, #FFDCC4); 
}

/* Error message styling */
.error-message {
    font-size: 0.8rem;
    margin-top: 5px;
    margin-bottom: 5px;
    /* Bright orange error text */
    color: #FF5722; 
    display: none; /* Hidden by default */
}

/* Informational message */
.info-message {
    font-size: 1rem;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Navigation button container */
#button-container {
    display: flex;
    justify-content: space-between;
}

/* Back button */
#back-btn {
    margin-right: auto; 
}

/* Next and submit buttons */
#next-btn, #submit-btn {
    margin-left: auto; 
}

/* Shared navigation button sizing */
#next-btn, #submit-btn, #back-btn {
   width: calc(25% - 10px); /* Even width distribution */
}

/* Back button hidden by default */
#back-btn {
   display: none; 
}

/* Mobile breakpoint */
@media (max-width: 767px) { 
   form {
        width: 90%;
        padding: 14px; 
   }

   input, select, textarea {
       width: 100%;
       font-size: 1.2rem; 
       padding: 10px; 
       box-sizing: border-box;
   }

   button {
       width: calc(40% - 10px); /* Mobile button width */
       font-size: 1.2rem; 
   }

   h1 {
       font-size: 1.3rem; /* Responsive heading size */
   }

   p, label {
       font-size: 1.3rem; /* Responsive text size */
   }

   p.copyright {
       font-size: 0.75rem; 
   }

   #next-btn, #submit-btn, #back-btn {
       width: calc(40% - 10px); /* Mobile navigation button width */
       font-size: 1.2rem;
       padding: 10px;
       margin-top: 10px;
   }
}
