﻿:root {
    --text: #111111;
    --bg: #FAFAFA;
    --surface: transparent;
    --muted: #6f7782;
    --border: #2a2a2a;
    --focus: #111111;
    --focus-ring: rgba(17, 17, 17, 0.12);
    --error: #ff3b30;
    --error-bg: rgba(255, 59, 48, 0.04);
    --radius-pill: 999px;
    --radius-lg: 1.6rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 1rem/1.45 -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;
}

.container {
    max-width: 50rem;
    margin: 0 auto; 
    padding: 0.75rem 2rem 3rem;
}

.panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

h1 {
    margin: 0 0 1.5rem;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
}

.intro {
    margin: 0 0 2rem;
    color: var(--text);
}

form {
    margin-top: 0;
}

fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.field {
    position: relative;
    margin-bottom: 3.25rem;
}

label {
    display: block;
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.25;
    font-weight: 400;
}

.req {
    margin-left: 0.35rem;
    color: var(--error);
    font-weight: 400;
    font-size: 0.85rem;
}

.hint {
    display: block;
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.45;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    color: var(--text);
    background: transparent;
}

    /* Default control look */
    select,
    textarea,
    input[type="date"],
    input[type="email"],
    input[type="number"],
    input[type="file"] {
        min-height: 3rem;
        padding: 0.95rem 1rem;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-lg);
        outline: none;
        background: transparent;
    }

option {
    background: var(--bg);
}

/* Project Name style */
#project-name, #client-name, #contact-name, #contact-email, #budget, #attachment {
    min-height: 3rem;
    padding: 0.55rem 2.5rem 0.45rem 0;
    border: 0;
    border-bottom: 1.5px solid var(--border);
    border-radius: 0;
    background: transparent;
    outline: none;
}

/* Generic text inputs can stay rounded unless you want them all underlined */
input[type="text"]:not(#project-name, #contact-name, #client-name, #contact-email, #budget, #attachment) {
    min-height: 3rem;
    padding: 0.95rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    outline: none;
    background: transparent;
}

input[type="text"]:focus, input[type="email"]:focus {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    background-color: #DBC166 !important;
    border-bottom: 2px solid #000 !important;
    border-radius: unset !important;
}

input[type="file"]::file-selector-button {
    background: var(--text);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 500;
    margin-right: 10px;
}

#details {
    min-height: 8.5rem;
    padding: 0.9rem 1rem;
    border-radius: 1.6rem;
    resize: vertical;
}

/* Cascading selects + main service select */
#ddlClient,
#ddlClientSubset1,
#ddlClientSubset2,
#ddlClientSubset3,
select {
    min-height: 3rem;
    padding-right: 3rem;
    border-radius: var(--radius-pill);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8a8a8a 50%), linear-gradient(135deg, #8a8a8a 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

select {
    color: var(--muted);
}

    select:not([value=""]),
    select:valid {
        color: var(--text);
    }

    /* Focus */
    input:focus,
    select:focus,
    textarea:focus,
    button:focus {
        outline: none;
    }

#project-name:focus {
    border-bottom-color: var(--focus);
    box-shadow: 0 4px 0 -3px var(--focus-ring);
}

input[type="text"]:not(#project-name):focus,
select:focus,
textarea:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="file"]:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Disabled */
input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Prefix fields */
.input-with-prefix {
    display: flex;
    align-items: stretch;
}

.prefix {
    min-height: 3rem;
    padding: 0.75rem 0.2rem 0.45rem 0;
    border: 0;
    border-bottom: 1.5px solid var(--border);
    border-radius: 0;
    background: transparent;
    outline: none;
}

.input-with-prefix input {
    padding-left: 0.75rem;
}

/* Error state */
.field.has-error #project-name {
    border-bottom-color: var(--error);
}

.field.has-error input[type="text"]:not(#project-name),
.field.has-error select,
.field.has-error textarea,
.field.has-error input[type="date"],
.field.has-error input[type="email"],
.field.has-error input[type="number"],
.field.has-error input[type="file"],
.field.has-error .prefix,
.field.has-error .input-with-prefix input {
    border-color: var(--error);
}

.field.has-error .hint,
.hint.hint-error {
    color: var(--error);
}

/* Optional warning icon if you add one later */
.field.has-error .error-icon {
    position: absolute;
    right: -2.25rem;
    top: 4.55rem;
    color: var(--error);
    font-size: 1.35rem;
    line-height: 1;
}

/* Error summary */
.error-summary {
    display: none;
    margin: 0 0 2rem;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--error);
    border-radius: 1rem;
    background: var(--error-bg);
}

    .error-summary.show {
        display: block;
    }

    .error-summary h2 {
        margin: 0 0 0.5rem;
        font-size: 1rem;
        font-weight: 700;
    }

    .error-summary p {
        margin: 0 0 0.5rem;
    }

    .error-summary ul {
        margin: 0;
        padding-left: 1.25rem;
    }

    .error-summary li + li {
        margin-top: 0.25rem;
    }

    .error-summary a {
        color: var(--error);
        text-decoration: underline;
        font-weight: 700;
    }

        .error-summary a:focus {
            outline: 3px solid var(--focus);
            outline-offset: 2px;
            border-radius: 0.125rem;
        }

/* Actions */
.actions {
    text-align: right;
    margin-top: 2rem;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    min-height: 3rem;
    padding: 0.8rem 1.2rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

    button[type="submit"],
    input[type="submit"] {
        background: var(--text);
        color: #ffffff;
        width: 200px;
    }

        button:hover,
        input[type="button"]:hover,
        input[type="submit"]:hover,
        input[type="reset"]:hover {
            filter: brightness(0.98);
        }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 640px) {
    .container {
        padding: 1rem 1rem 2rem;
    }

    .field {
        margin-bottom: 2.4rem;
    }

        .field.has-error .error-icon {
            right: 0;
            top: auto;
            bottom: -1.5rem;
        }

    .actions {
        flex-direction: column;
    }

    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"] {
        width: 100%;
    }
}
