/* Eagle Scout Projects – Submission Form CSS */

.esp-submit-wrap {
    max-width: 760px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

/* ── Success state ── */

.esp-submit-success {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border: 1px solid #DDD8CC;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.esp-submit-success-icon {
    width: 64px;
    height: 64px;
    background: #1B2A4A;
    color: #B8860B;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.esp-submit-success h2 {
    margin: 0 0 0.75rem;
    color: #1B2A4A;
    font-size: 1.6rem;
}

.esp-submit-success p {
    color: #555;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Error list ── */

.esp-submit-errors {
    background: #fdf0f0;
    border: 1px solid #e8b4b4;
    border-left: 4px solid #c0392b;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #7b2020;
    font-size: 0.9rem;
}

.esp-submit-errors ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.esp-submit-errors li {
    margin-bottom: 0.25rem;
}

/* ── Form layout ── */

.esp-submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.esp-submit-fieldset {
    border: 1px solid #DDD8CC;
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    margin: 0;
}

.esp-submit-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1B2A4A;
    padding: 0 0.4rem;
    border-bottom: 2px solid #B8860B;
    padding-bottom: 0.4rem;
    margin-bottom: 1.2rem;
    width: 100%;
}

.esp-submit-legend svg {
    color: #B8860B;
    flex-shrink: 0;
}

/* ── Fields ── */

.esp-submit-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.esp-submit-field:last-child {
    margin-bottom: 0;
}

.esp-submit-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2D2D2D;
}

.esp-submit-field input[type="text"],
.esp-submit-field input[type="email"],
.esp-submit-field input[type="number"],
.esp-submit-field input[type="date"],
.esp-submit-field select,
.esp-submit-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.8rem;
    border: 1px solid #CCC;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #2D2D2D;
    background: #FAFAFA;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.esp-submit-field input:focus,
.esp-submit-field select:focus,
.esp-submit-field textarea:focus {
    border-color: #1B2A4A;
    box-shadow: 0 0 0 2px rgba(27,42,74,0.15);
    outline: none;
    background: #fff;
}

.esp-submit-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.esp-required {
    color: #c0392b;
    margin-left: 2px;
}

.esp-optional {
    font-weight: 400;
    font-size: 0.72rem;
    color: #888;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

.esp-field-hint {
    font-size: 0.78rem;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

/* ── Row layouts ── */

.esp-submit-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.esp-submit-row:last-child {
    margin-bottom: 0;
}

.esp-submit-row-2 { grid-template-columns: 1fr 1fr; }
.esp-submit-row-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 560px) {
    .esp-submit-row-2,
    .esp-submit-row-3 { grid-template-columns: 1fr; }
}

/* ── Photo drop zone ── */

.esp-submit-file-drop {
    border: 2px dashed #CCC;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: #FAFAFA;
    transition: border-color 0.2s, background 0.2s;
    cursor: default;
    position: relative;
}

.esp-submit-file-drop.esp-drop-active {
    border-color: #1B2A4A;
    background: #f0f4fa;
}

.esp-submit-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    font-size: 0; /* hide "No file chosen" text */
}

.esp-submit-file-label {
    pointer-events: none;
    color: #888;
}

.esp-submit-file-label svg {
    color: #B8860B;
    margin-bottom: 0.5rem;
}

.esp-submit-file-label p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.esp-file-browse {
    color: #1B2A4A;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: auto;
}

/* ── Photo previews ── */

.esp-submit-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
    justify-content: center;
}

.esp-preview-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #DDD;
}

.esp-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.esp-preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

/* ── Submit footer ── */

.esp-submit-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.esp-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #1B2A4A;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
}

.esp-submit-btn svg {
    color: #B8860B;
}

.esp-submit-btn:hover {
    background: #243660;
    transform: translateY(-1px);
}

.esp-submit-btn:active {
    transform: none;
}

.esp-submit-privacy {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
    text-align: center;
    max-width: 400px;
}
