/*
  Event Registration Form Styles
  Simple Material-inspired look for a beginner assignment
*/

/* ========== Page setup ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #212121;
    margin: 0;
    padding: 40px 16px;

    /* Cool gradient background */
    background: linear-gradient(160deg, #0b1d36, #1565c0, #00897b);
    background-attachment: fixed;
}

/* ========== Form card in the center ========== */
.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Back link */
.back-link {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
}

.back-link a {
    color: #1565c0;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ========== Wireframe reference ========== */
.wireframe {
    margin: 0 0 24px 0;
    padding: 0;
}

.wireframe img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.wireframe figcaption {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #757575;
}

/* ========== Heading ========== */
h1 {
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.75rem;
    font-weight: bold;
    color: #212121;
}

/* ========== Form sections ========== */
fieldset {
    margin: 0 0 16px 0;
    padding: 0;
    border: none;
}

legend {
    padding: 16px 0 10px 0;
    font-weight: bold;
    font-size: 1rem;
    color: #1565c0;
}

/* ========== Labels and inputs ========== */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #555;
}

/* Radio and checkbox labels sit next to the control */
.option label {
    display: inline;
    margin-left: 8px;
    color: #212121;
    cursor: pointer;
}

/* Text boxes, email, password, textarea, and dropdown */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid #9e9e9e;
    border-radius: 4px;
    background-color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
}

/* Blue border when the user clicks into a field */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1565c0;
    border-width: 2px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

select {
    cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ========== First Name and Last Name side by side ========== */
.name-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.name-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ========== Radio buttons in a row ========== */
.option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.option {
    margin-bottom: 8px;
}

/* ========== Submit button ========== */
.form-actions {
    margin-top: 16px;
}

button[type="submit"] {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    background-color: #1565c0;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button[type="submit"]:hover {
    background-color: #0d47a1;
}

/* ========== Mobile layout ========== */
@media (max-width: 560px) {
    body {
        padding: 20px 12px;
    }

    .page {
        padding: 20px;
    }

    .name-row {
        flex-direction: column;
    }

    .option-row {
        flex-direction: column;
    }

    button[type="submit"] {
        width: 100%;
    }
}
