/* form.css - Form specific styles */

:root {
    --form-primary: #3a5a78;
    --form-secondary: #f9f9f9;
    --form-accent: #7eabd6;
}

main {
    grid-template-columns: 1fr;
}

form {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

fieldset {
    border: 1px solid var(--form-primary);
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

legend {
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    color: var(--form-primary);
    padding: 0 0.5rem;
    background-color: white;
    border-radius: 3px;
}

label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
}

input:focus {
    border-color: var(--form-primary);
    outline: none;
    box-shadow: 0 0 5px rgba(58, 90, 120, 0.3);
}

input:invalid {
    border-color: #c0392b;
}

.rating-container {
    margin-bottom: 1.5rem;
}

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

input[type="range"] {
    flex-grow: 1;
}

.rating-value {
    background-color: var(--form-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 2rem;
    text-align: center;
    font-weight: 500;
}

button {
    background-color: var(--form-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2c4660;
}

/* Dark mode adjustments for form */
body.darkmode fieldset {
    background-color: #1e1e1e;
    border-color: #1e3a5a;
}

body.darkmode legend {
    background-color: #121212;
    color: var(--form-accent);
}

body.darkmode input {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.darkmode input:focus {
    border-color: var(--form-accent);
    box-shadow: 0 0 5px rgba(126, 171, 214, 0.3);
}

body.darkmode button {
    background-color: #1e3a5a;
}

body.darkmode button:hover {
    background-color: #2c4660;
}

/* Error message styling */
.password-message {
    color: #c0392b;
    font-size: 0.875rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    display: none;
}

body.darkmode .password-message {
    color: #e74c3c;
}

/* Success message for validation */
.valid-input {
    border-color: #27ae60 !important;
}

body.darkmode .valid-input {
    border-color: #2ecc71 !important;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    form {
        padding: 0.5rem;
    }
    
    fieldset {
        padding: 1rem;
    }
}