/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f5f5;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* === Expert Banner === */
.expert-banner {
    background: #b91c1c;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 12px;
}

.expert-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
}

.expert-avatars {
    display: flex;
    flex-shrink: 0;
}

.expert-avatars img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #b91c1c;
    object-fit: cover;
    margin-left: -8px;
}

.expert-avatars img:first-child {
    margin-left: 0;
}

.expert-banner p {
    font-size: 13px;
    margin: 0;
}

.expert-banner a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.expert-banner a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .expert-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* === Form Container === */
.enquiry-form-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 30px;
}

/* === Header === */
.form-header {
    text-align: center;
    border-bottom: 2px solid #003366;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.form-header h1 {
    font-size: 24px;
    color: #003366;
    margin-bottom: 5px;
}

.header-contact {
    color: #666;
    font-size: 13px;
}

.intro {
    margin-bottom: 20px;
    color: #444;
}

/* === Fieldsets === */
fieldset {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

legend {
    font-weight: 600;
    font-size: 16px;
    color: #003366;
    padding: 0 8px;
}

/* === Grid Layouts === */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* === Form Fields === */
.form-field {
    margin-bottom: 10px;
}

.form-field label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: #333;
    margin-bottom: 3px;
}

.form-input,
input[type="text"].form-input,
input[type="date"].form-input,
input[type="file"].form-input,
select.form-input,
textarea.form-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.15);
}

textarea.form-input {
    resize: vertical;
}

/* === Coil Type Radio Group === */
.coil-type-group {
    margin-top: 10px;
}

.coil-type-group > div:last-child {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.coil-type-group > div:last-child > div {
    display: flex;
    align-items: center;
}

.coil-type-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
}

/* === Error States === */
.form-errors {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 10px 15px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.has-error .form-input {
    border-color: #ef4444;
}

.field-error {
    color: #dc2626;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

/* === Reference Diagram === */
.reference-diagram {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 3px;
}

.reference-diagram img {
    max-width: 100%;
    height: auto;
}

/* === File Upload Dropzone === */
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 6px;
}

.dropzone.dragover,
.dropzone:hover {
    border-color: #003366;
    background: #f0f4f8;
}

.dropzone-text {
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.upload-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
}

.upload-icon {
    font-size: 18px;
}

.upload-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-remove {
    background: none;
    border: none;
    color: #c00;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.upload-remove:hover {
    color: #900;
}

/* === Submit Button === */
.form-actions {
    text-align: center;
    margin-top: 20px;
}

.btn-submit {
    background: #003366;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-submit:hover {
    background: #004488;
}

/* === Success Page === */
.enquiry-success {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.enquiry-success h1 {
    color: #003366;
    margin-bottom: 15px;
}

.enquiry-success p {
    margin-bottom: 10px;
    color: #444;
}

.enquiry-success .btn-submit {
    margin-top: 20px;
}

/* === Home Page === */
.home-page {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.home-page h1 {
    color: #003366;
    margin-bottom: 15px;
}

.home-page a {
    color: #003366;
}

/* === Responsive === */
@media (max-width: 768px) {
    .grid-2col,
    .spec-grid {
        grid-template-columns: 1fr;
    }

    .enquiry-form-container {
        padding: 15px;
    }

    fieldset {
        padding: 10px 12px;
    }
}
