/* ============================================================
   JWV Project Summary Form — Frontend Styles
   ============================================================ */

/* ── Reset ── */
.jwv-wrap *,
.jwv-wrap *::before,
.jwv-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Container ── */
.jwv-wrap {
    font-family: inherit;
}

/* ── Notice ── */
.jwv-wrap .jwv-notice {
    padding: 13px 17px;
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 14px;
    display: none;
    line-height: 1.5;
    border-radius: 4px;
}

.jwv-wrap .jwv-notice.success {
    background: #eaf6ea;
    color: #2d6a2d;
    border: 1px solid #b8ddb8;
}

.jwv-wrap .jwv-notice.error {
    background: #fdecea;
    color: #9b2020;
    border: 1px solid #f5c0c0;
}

/* ── Layout ── */
.jwv-wrap .jwv-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.jwv-wrap .jwv-col {
    flex: 1 1 0;
    min-width: 0;
}

.jwv-wrap .jwv-full {
    margin-bottom: 16px;
}

/* ── Text inputs & textarea ── */
.jwv-wrap input[type="text"],
.jwv-wrap input[type="email"],
.jwv-wrap input[type="tel"],
.jwv-wrap textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-muted, #f6f8fb);
    border: 1.5px solid var(--navy-100, #dce4ee);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    color: var(--navy-950, #0a1d35);
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s;
    display: block;
    box-shadow: none;
}

.jwv-wrap input[type="text"]:focus,
.jwv-wrap input[type="email"]:focus,
.jwv-wrap input[type="tel"]:focus,
.jwv-wrap textarea:focus {
    border-color: var(--navy-600, #345a82);
    box-shadow: 0 0 0 3px rgba(52, 90, 130, 0.12);
    background: white;
}

.jwv-wrap input::placeholder,
.jwv-wrap textarea::placeholder {
    color: var(--ink-400, #8b99ad);
}

.jwv-wrap textarea {
    height: 155px;
    resize: vertical;
}

/* ── Radio options ── */
.jwv-wrap .jwv-radio-wrap {
    background: var(--bg-muted, #f6f8fb);
    border: 1.5px solid var(--navy-100, #dce4ee);
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 16px;
    transition: border-color .2s, background .2s;
}

.jwv-wrap .jwv-radio-wrap.jwv-radio-invalid {
    border-color: #e74c3c !important;
    background: #fff8f8;
}

.jwv-wrap .jwv-radio-label {
	display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-400, #4b5c72);
    text-transform: capitalize;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.jwv-wrap .jwv-radio-group {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr 1fr;
}

.jwv-wrap .jwv-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-700, #2d3e52);
    cursor: pointer;
}

.jwv-wrap .jwv-radio-option input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: black;
    flex-shrink: 0;
}

.jwv-wrap .jwv-radio-option span {
    line-height: 1.4;
}

/* ── Field description (below a field) ── */
.jwv-wrap .jwv-field-desc {
    font-size: 12px;
    color: var(--ink-400, #8b99ad);
    margin-top: 6px;
    line-height: 1.5;
}

/* ── Field-level validation errors ── */
.jwv-wrap .jwv-field-error {
    display: block;
    font-size: 12px;
    color: #c0392b;
    margin-top: 5px;
    line-height: 1.4;
}

.jwv-wrap input.jwv-invalid,
.jwv-wrap textarea.jwv-invalid {
    border-color: #e74c3c !important;
    background: #fff8f8;
}

.jwv-wrap .jwv-file-box input.jwv-invalid {
    border: none;
}

.jwv-wrap .jwv-file-box.jwv-box-invalid {
    border-color: #e74c3c !important;
    background: #fff8f8;
}

@media (max-width: 767px) {
    .jwv-wrap .jwv-row {
        gap: 12px;
    }

    .jwv-wrap .jwv-col {
        flex-basis: 100%;
    }

    .jwv-wrap .jwv-radio-group {
        grid-template-columns: 1fr;
    }
}

/* ── File upload — drag-and-drop zone ── */
.jwv-wrap .jwv-file-box {
    position: relative;
    background: white;
    border: 2px dashed var(--navy-100, #dce4ee);
    border-radius: 4px;
    padding: 28px 20px;
    margin-bottom: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.jwv-wrap .jwv-file-box:hover,
.jwv-wrap .jwv-file-box.jwv-drag-over {
    border-color: var(--navy-600, #345a82);
    background: var(--bg-muted, #f6f8fb);
}

/* Hidden native input covers the entire zone for click-to-browse */
.jwv-wrap .jwv-file-box input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
    z-index: 1;
}

/* Upload icon */
.jwv-wrap .jwv-file-icon {
    display: block;
    margin: 0 auto 10px;
    width: 36px;
    height: 36px;
    color: var(--ink-400, #8b99ad);
    transition: color .2s;
}

.jwv-wrap .jwv-file-box:hover .jwv-file-icon,
.jwv-wrap .jwv-file-box.jwv-drag-over .jwv-file-icon {
    color: var(--navy-700, #24476e);
}

/* Prompt text */
.jwv-wrap .jwv-file-prompt {
    font-size: 13.5px;
    color: var(--ink-500, #6a7a8f);
    line-height: 1.5;
    pointer-events: none;
}

.jwv-wrap .jwv-file-prompt strong {
    color: var(--navy-950, #0a1d35);
    font-weight: 600;
}

/* Accepted formats hint */
.jwv-wrap .jwv-file-hint {
    font-size: 11px;
    color: var(--ink-400, #8b99ad);
    margin-top: 6px;
    pointer-events: none;
}

/* Selected file pill */
.jwv-wrap .jwv-file-chosen {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.jwv-wrap .jwv-file-chosen.is-visible {
    display: flex;
}

.jwv-wrap .jwv-file-chosen-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange-50, #f9f0d0);
    color: var(--navy-950, #0a1d35);
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 12.5px;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jwv-wrap .jwv-file-remove {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--navy-950, #0a1d35);
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    pointer-events: all;
    transition: background .15s;
}

.jwv-wrap .jwv-file-remove:hover {
    background: var(--navy-700, #24476e);
}

/* Error state */
.jwv-wrap .jwv-file-box.jwv-box-invalid {
    border-color: #e74c3c !important;
    background: #fff8f8;
}

/* ── Submit ── */
.jwv-wrap .jwv-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.jwv-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 32px !important;
    background: var(--orange-500, #bb9523) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}

.jwv-submit-btn:hover {
    background: var(--orange-600, #8f7019) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(187, 149, 35, 0.3);
}

.jwv-submit-btn::after {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 620px) {
    .jwv-wrap .jwv-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .jwv-wrap .jwv-col {
        margin-bottom: 16px;
    }
}
