/* ------------------------------------------------------------
   GLOBAL
------------------------------------------------------------ */
:root {
    --bg: #f3f5f9;
    --card-bg: #ffffff;
    --border: #d7dbe5;
    --text: #1f1f1f;
    --accent: #256b2f;
    --accent-light: #3a8f48;
    --error: #d9534f;
    --input-bg: #fff;
    --radius: 6px;
    --shadow: 0 4px 14px rgba(0,0,0,0.08);

    /* Checkbox upgrades */
    --checkbox-size: 26px;
    --checkbox-color: #1A4D8F;
    --checkbox-hover: #3A6FBF;
    --checkbox-glow: rgba(26, 77, 143, 0.45);
}

* {
    box-sizing: border-box;
    font-family: "Inter", system-ui, sans-serif;
}

body {
    margin: 0;
    padding: 40px 20px;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
}

/* ------------------------------------------------------------
   REQUIRED FIELD RED
------------------------------------------------------------ */
input[required], select[required], textarea[required] {
    border: 2px solid red !important;
    background-color: #ffe5e5;
}

/* ------------------------------------------------------------
   UPGRADED CHECKBOX (Soft Rounded + Blue Glow + Animation)
------------------------------------------------------------ */
.nice-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.nice-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    border: 2px solid var(--checkbox-color);
    border-radius: 8px;
    background-color: white;
    position: relative;
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

.nice-checkbox input[type="checkbox"]:focus {
    box-shadow: 0 0 8px var(--checkbox-glow);
    outline: none;
}

.nice-checkbox:hover input[type="checkbox"] {
    border-color: var(--checkbox-hover);
}

.nice-checkbox input[type="checkbox"]:checked {
    background-color: var(--checkbox-color);
    border-color: var(--checkbox-color);
}

.nice-checkbox input[type="checkbox"]::after {
    content: "✔";
    color: white;
    font-size: calc(var(--checkbox-size) * 0.75);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.nice-checkbox input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ------------------------------------------------------------
   FORM CONTAINER
------------------------------------------------------------ */
form#quoteForm {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

/* ------------------------------------------------------------
   HEADINGS
------------------------------------------------------------ */
form#quoteForm h2 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 600;
    color: #111;
    border-bottom: 2px solid #e6e8ef;
    padding-bottom: 6px;
}

/* ------------------------------------------------------------
   LABELS + INPUTS
------------------------------------------------------------ */
form#quoteForm label {
    display: block;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}

form#quoteForm input,
form#quoteForm select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid #c9ced8;
    background: var(--input-bg);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form#quoteForm input:focus,
form#quoteForm select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 107, 47, 0.2);
    outline: none;
}

/* ------------------------------------------------------------
   BUTTON
------------------------------------------------------------ */
form#quoteForm button[type="submit"] {
    margin-top: 30px;
    padding: 12px 20px;
    border-radius: var(--radius);
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

form#quoteForm button[type="submit"]:hover {
    background: var(--accent-light);
}

form#quoteForm button[type="submit"]:active {
    transform: scale(0.97);
}

/* ------------------------------------------------------------
   ERROR MESSAGES
------------------------------------------------------------ */
.error-message {
    font-size: 12px;
    color: var(--error);
    margin-top: 4px;
    display: none;
}

.error-visible {
    display: block;
}

/* ------------------------------------------------------------
   INLINE SUCCESS/ERROR MESSAGE BOX
------------------------------------------------------------ */
#formMessage {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
