/* =========================================================
   Electro Mastery Applications — Frontend Form Styles
   Matches electromastery.com form aesthetic
   ========================================================= */

.ema-form-wrap {
    max-width: 660px;
    margin: 0 auto;
    font-family: inherit;
}

/* ---- Form Fields ---- */
.ema-form {
    background: #ffffff;
    border-radius: 8px;
    padding: 0;
}

.ema-field-row {
    margin-bottom: 18px;
}

.ema-field-row.ema-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 600px) {
    .ema-field-row.ema-two-col {
        grid-template-columns: 1fr;
    }
}

.ema-field-group {
    display: flex;
    flex-direction: column;
}

.ema-field-group.ema-full {
    width: 100%;
}

.ema-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.ema-req {
    color: #c0392b;
    margin-left: 2px;
}

.ema-form input[type="text"],
.ema-form input[type="email"],
.ema-form input[type="tel"],
.ema-form select,
.ema-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #dce3ed;
    border-radius: 6px;
    background: #f0f4f9;
    color: #1a1a2e;
    font-size: 14px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.ema-form input::placeholder,
.ema-form textarea::placeholder {
    color: #9aabb8;
}

.ema-form input:focus,
.ema-form select:focus,
.ema-form textarea:focus {
    border-color: #1a4da8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 77, 168, 0.12);
}

.ema-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aabb8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.ema-form textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

/* ---- File Upload ---- */
.ema-file-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ema-form input[type="file"] {
    background: #f0f4f9;
    border: 1.5px dashed #b0c0d8;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #5a6a7a;
}

.ema-form input[type="file"]:focus {
    border-color: #1a4da8;
    box-shadow: 0 0 0 3px rgba(26, 77, 168, 0.12);
}

.ema-file-hint {
    font-size: 12px;
    color: #8fa3b8;
}

/* ---- Submit Button ---- */
.ema-submit-btn {
    display: block;
    width: 100%;
    background: #1a4da8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    padding: 15px 24px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    letter-spacing: 0.02em;
    text-transform: none;
    font-family: inherit;
    margin-top: 8px;
}

.ema-submit-btn:hover {
    background: #163d8a;
}

.ema-submit-btn:active {
    transform: scale(0.99);
}

.ema-submit-btn:disabled {
    background: #8facd8;
    cursor: not-allowed;
}

/* ---- Notices ---- */
.ema-notice {
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.ema-error {
    background: #fdecea;
    border: 1px solid #f5c6c2;
    color: #c0392b;
}

/* ---- Success State ---- */
.ema-success-wrap {
    text-align: center;
    padding: 48px 24px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1.5px solid #b8d4f5;
}

.ema-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1a4da8;
    color: #ffffff;
    font-size: 28px;
    line-height: 64px;
    margin: 0 auto 20px;
    animation: ema-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ema-pop {
    from { transform: scale(0.3); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.ema-success-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.ema-success-text {
    font-size: 15px;
    color: #4a5a6a;
    margin: 0;
    line-height: 1.6;
}
