/*
 * JLog Service Quote Forms — brand-styled, mobile-first.
 * Colours: primary green #1A2E26, gold accent #E8A13F.
 * Fonts: DM Serif Display (headings), DM Sans (body).
 * Theme already loads these fonts on most pages; we just reference them
 * with a sensible fallback chain so layout doesn't break if a page
 * lacks the @font-face stylesheet.
 */

.jlog-sq-wrap {
    max-width: 720px;
    margin: 48px auto;
    padding: 32px 28px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(26, 46, 38, 0.06);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #222;
}

.jlog-sq-header { margin-bottom: 24px; text-align: left; }

.jlog-sq-heading {
    font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    line-height: 1.2;
    color: #1A2E26;
    margin: 0 0 8px;
    font-weight: 400;
}

.jlog-sq-intro {
    font-size: 15px;
    color: #555;
    margin: 0;
    line-height: 1.55;
}

/* Layout */
.jlog-sq-form { display: flex; flex-direction: column; gap: 16px; }
.jlog-sq-row { display: flex; gap: 16px; }
.jlog-sq-row--two > * { flex: 1 1 0; min-width: 0; }
.jlog-sq-group { display: flex; flex-direction: column; gap: 6px; }

/* Labels and required marker */
.jlog-sq-group label {
    font-size: 13px;
    font-weight: 600;
    color: #1A2E26;
    letter-spacing: 0.01em;
}
.jlog-sq-req { color: #E8A13F; font-weight: 700; }

/* Inputs */
.jlog-sq-form input[type=text],
.jlog-sq-form input[type=email],
.jlog-sq-form input[type=tel],
.jlog-sq-form input[type=number],
.jlog-sq-form input[type=date],
.jlog-sq-form select,
.jlog-sq-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #d2d6d4;
    border-radius: 6px;
    background: #fafafa;
    color: #222;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.jlog-sq-form select {
    background-image:
      linear-gradient(45deg, transparent 50%, #1A2E26 50%),
      linear-gradient(135deg, #1A2E26 50%, transparent 50%);
    background-position:
      calc(100% - 18px) 50%,
      calc(100% - 12px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.jlog-sq-form textarea { resize: vertical; min-height: 84px; }

.jlog-sq-form input:focus,
.jlog-sq-form select:focus,
.jlog-sq-form textarea:focus {
    outline: 0;
    border-color: #1A2E26;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(232, 161, 63, 0.18);
}

/* Honeypot field: hidden from real users but visible to bots */
.jlog-sq-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Submit button */
.jlog-sq-submit-group { margin-top: 8px; }
.jlog-sq-btn {
    display: inline-block;
    background: #1A2E26;
    color: #ffffff;
    border: 0;
    border-radius: 6px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s, transform 0.05s;
}
.jlog-sq-btn:hover { background: #E8A13F; color: #1A2E26; }
.jlog-sq-btn:active { transform: translateY(1px); }
.jlog-sq-btn:disabled { opacity: 0.6; cursor: wait; }

/* Inline error message */
.jlog-sq-err {
    margin-top: 6px;
    padding: 12px 14px;
    background: #fff3f0;
    border-left: 3px solid #c5350f;
    color: #8a2207;
    font-size: 14px;
    border-radius: 4px;
}

/* Success state — replaces form when submission succeeds */
.jlog-sq-success {
    text-align: center;
    padding: 24px 8px;
}
.jlog-sq-success-tick {
    display: inline-block;
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background: #1A2E26;
    color: #E8A13F;
    font-size: 28px;
    margin: 0 auto 14px;
}
.jlog-sq-success h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    color: #1A2E26;
    font-size: 24px;
    margin: 0 0 8px;
}
.jlog-sq-success p { color: #555; font-size: 15px; margin: 6px 0; }
.jlog-sq-success a { color: #1A2E26; text-decoration: underline; }

/* Mobile — stack the 2-col row, tighten paddings */
@media (max-width: 600px) {
    .jlog-sq-wrap {
        margin: 24px 0;
        padding: 22px 18px;
        border-radius: 8px;
    }
    .jlog-sq-heading { font-size: 22px; }
    .jlog-sq-row { flex-direction: column; gap: 16px; }
    .jlog-sq-btn { width: 100%; padding: 14px; }
}
