/*
Theme Name: OnExpress Modern Child
Theme URI: https://onexpresscouriers.com.au/
Description: Site-specific overrides for the OnExpress Modern parent theme. Activate this theme so the parent (onexpress-modern) can be updated safely without losing site customisations.
Author: OnExpress Couriers
Author URI: https://onexpresscouriers.com.au/
Template: onexpress-modern
Version: 1.0.3
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: onexpress-modern-child
*/

/* -------------------------------------------------------------------------
   Site-specific CSS overrides go here.
   This file loads AFTER the parent's assets/css/main.css, so any rule below
   wins by source order. Use the same selectors as the parent and adjust the
   declarations you want to change. Examples:

   .menu-item-booking > a {
       background: linear-gradient(135deg, #ff4b3a 0%, #c61212 100%);
   }

   .page-hero { min-height: clamp(8rem, 16vw, 12rem); }
   ------------------------------------------------------------------------- */

/* ==========================================================================
   Contact Form 7 — match parent `.ox-form` look on Register / Contact pages
   ========================================================================== */

.entry .wpcf7,
.entry-content .wpcf7,
main#content .wpcf7 {
    max-width: 640px;
    margin-inline: auto;
    background: var(--ox-surface);
    border: 1px solid var(--ox-border);
    border-radius: var(--ox-radius);
    box-shadow: var(--ox-shadow-sm);
    padding: clamp(1.25rem, 2.5vw, 1.85rem);
}

.wpcf7-form {
    font-family: var(--font);
}

/* Tighter, consistent vertical rhythm between every field row. */
.wpcf7-form p {
    margin: 0 0 0.7rem;
}

.wpcf7-form > p:last-of-type,
.wpcf7-form > div:last-of-type {
    margin-bottom: 0;
}

.wpcf7-form label {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 600;
    color: var(--ox-dark-soft);
    font-size: 0.92rem;
    line-height: 1.3;
}

.wpcf7-form label .req {
    color: var(--ox-accent);
    font-weight: 700;
    margin-left: 0.15rem;
}

.wpcf7-form .field-hint {
    display: block;
    margin: -0.05rem 0 0.3rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ox-muted);
    line-height: 1.4;
}

/* Inputs — mirror `.ox-form` control chrome, slightly more compact */
.wpcf7-form .wpcf7-form-control-wrap {
    display: block;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c6d3de;
    border-radius: 0.5rem;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-family: var(--font);
    font-size: 0.97rem;
    line-height: 1.4;
    color: var(--ox-text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpcf7-form textarea {
    /* CF7/browser `rows` can render huge boxes — force compact multi-line fields */
    line-height: 1.5;
    resize: vertical;
    min-height: calc(1.5em * 3 + 1.1rem);
    height: calc(1.5em * 4 + 1.1rem);
    max-height: calc(1.5em * 6 + 1.1rem);
    overflow-y: auto;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    color: rgba(92, 107, 122, 0.85);
}

.wpcf7-form input:focus-visible,
.wpcf7-form textarea:focus-visible {
    outline: 3px solid var(--ox-blue);
    outline-offset: 2px;
    border-color: var(--ox-blue-muted);
    box-shadow: 0 0 0 5px #fff;
}

.wpcf7-form .wpcf7-not-valid input,
.wpcf7-form .wpcf7-not-valid textarea {
    border-color: #c64343;
    background: #fff7f7;
}

.wpcf7-form .wpcf7-not-valid-tip {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6e0a0e;
    position: static;
}

/* Subtle separator above the acceptance + submit area */
.wpcf7-form .cf7-acceptance-row:first-of-type {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--ox-border);
}

/* Acceptance checkboxes — readable multi-line label next to box */
.wpcf7-form .cf7-acceptance-row {
    margin: 0 0 0.4rem;
}

.wpcf7-form .cf7-acceptance-row .wpcf7-form-control-wrap {
    margin-top: 0;
}

.wpcf7-form .cf7-acceptance-row .wpcf7-list-item {
    margin: 0;
}

.wpcf7-form .cf7-acceptance-row .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    font-weight: 400;
    font-size: 0.92rem;
    line-height: 1.45;
    cursor: pointer;
}

.wpcf7-form .cf7-acceptance-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.15rem 0 0;
    accent-color: var(--ox-blue);
    cursor: pointer;
}

.wpcf7-form .cf7-acceptance-row label a {
    color: var(--ox-blue);
    font-weight: 600;
    text-decoration: underline;
}

.wpcf7-form .cf7-acceptance-row label a:hover {
    color: var(--ox-blue-deep);
}

/* Submit row */
.wpcf7-form > p:has(input[type="submit"]),
.wpcf7-form > p:has(.wpcf7-submit) {
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font: inherit;
    font-family: var(--font);
    border-radius: 999px;
    padding: 0.72rem 1.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--ox-blue) 0%, var(--ox-blue-deep) 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(51, 65, 149, 0.38);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
    box-shadow: 0 14px 34px rgba(51, 65, 149, 0.45);
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active {
    transform: translateY(1px);
}

.wpcf7-form input[type="submit"]:focus-visible,
.wpcf7-form .wpcf7-submit:focus-visible {
    outline: 3px solid var(--ox-blue);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px #fff, 0 10px 28px rgba(51, 65, 149, 0.38);
}

/* CF7 AJAX spinner next to submit */
.wpcf7-form .wpcf7-spinner {
    margin: 0 0 0 0.75rem;
    vertical-align: middle;
}

.wpcf7-form.sent .wpcf7-spinner {
    visibility: hidden;
}

/* Response banner — match `.form-notice` */
.wpcf7 form .wpcf7-response-output {
    margin: 0.9rem 0 0;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
    line-height: 1.45;
}

.wpcf7 form.sent .wpcf7-response-output {
    background: #e9ecf8;
    border-color: rgba(51, 65, 149, 0.28);
    color: #1a2042;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
    background: #fceeee;
    border-color: #c64343;
    color: #6e0a0e;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    background: #fff8f0;
    border-color: rgba(227, 6, 19, 0.35);
    color: var(--ox-dark);
}

@media (max-width: 720px) {
    .wpcf7-form input[type="submit"],
    .wpcf7-form .wpcf7-submit {
        width: 100%;
        justify-content: center;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }
}
