/*
Theme Name: Sinatra Child (CAIJETS)
Description: Child theme of Sinatra for caijets.com. Holds the CAIJETS aircraft listing templates so that Sinatra parent updates can never remove them.
Author: CAIJETS, Inc.
Template: sinatra
Version: 1.2.6
*/

/* Top section: align the navy panel to the TOP of the right column.
   The parent theme's flex rule uses align-items:center, which centers the
   shorter panel against a taller right column (e.g. King Air 350 prose +
   photo). JP approved top alignment Nov 8, 2026 for consistency. */
.aircraftinfo-template-default #aircraft-top-details {
	align-items: flex-start;
}

/* Aligned label/value spec rows (see caijets_format_spec_list in functions.php) */
.cj-spec-sublabel {
	font-weight: 600;
	margin: 0.7em 0 0.15em;
}
.cj-spec-sublabel + .cj-spec-rows {
	margin-left: 1.25em;
}
.cj-spec-heading {
    font-weight: 700;
    margin-bottom: 0.5em;
}
.cj-spec-row {
    display: grid;
    grid-template-columns: 7em 1fr;
    column-gap: 0.75em;
    padding: 0.12em 0;
}
.cj-spec-label {
    white-space: nowrap;
    text-align: left;
}
.cj-spec-value {
    /* The parent layout centers this column's text; force values flush left
       so they start on one straight vertical line. */
    text-align: left;
    justify-self: start;
}

/* v1.1.0: hybrid listing pilot (King Air 350) — wider label column inside the
   specification section for long labels like "Serial Number (L)", and spacing
   between spec groups. */
.aircraft-specification .cj-spec-row {
    grid-template-columns: 13em 1fr;
}
.cj-spec-heading:not(:first-child) {
    margin-top: 1em;
}

/* v1.2.4: inside the specification section, pin the spec rows and the plain
   lines (e.g. the King Air 350's cabin paragraph, the disclaimer) to one
   shared line-height. The plain lines otherwise inherit the theme's loose
   body leading and read uneven against the tight rows — JP flagged the
   350's INTERIOR/EXTERIOR column Nov 8, 2026. */
.aircraft-specification .cj-spec-row,
.aircraft-specification .cj-spec-line {
    line-height: 1.5;
}
.aircraft-specification .cj-spec-line {
    margin: 0.3em 0;
}

/* v1.2.5: a second spec-sheet download link under the specification section
   (the hero-overlay link is easy to miss in the photo). Navy outline button,
   centered; JP chose the label "Download Spec Sheet (PDF)" Nov 8, 2026, and
   the hero link was renamed to match. Renders only when the listing has a
   PDF attached — same condition as the hero link. */
.cj-spec-download {
    text-align: center;
    margin: 1.75em auto 0.5em;
}
.cj-spec-download a {
    display: inline-block;
    padding: 0.65em 1.6em;
    border: 2px solid #12294b;
    border-radius: 4px;
    color: #12294b;
    font-weight: 600;
    text-decoration: none;
}
.cj-spec-download a:hover {
    background: #12294b;
    color: #ffffff;
}

/* v1.1.3: on phone-width screens the 13em label column squeezes spec values
   (e.g. Paint) into a narrow ribbon — stack label above value instead.
   Desktop layout is unchanged. */
@media (max-width: 640px) {
    .aircraft-specification .cj-spec-row {
        grid-template-columns: 1fr;
        row-gap: 0;
        padding: 0.35em 0;
    }
    .aircraft-specification .cj-spec-label {
        white-space: normal;
        font-weight: 600;
    }
    .aircraft-specification .cj-spec-row.cj-subrow {
        grid-template-columns: 3.2em 1fr;
    }
    .aircraft-specification .cj-spec-row.cj-subrow .cj-spec-label {
        white-space: nowrap;
        font-weight: 600;
    }
}

/* v1.1.4: mobile hero title band, restored. This styling originally lived in
   the Sinatra parent theme's Customizer Additional CSS (Oct 31, 2026 build,
   "Variant B", verified on JP's iPhone); activating this child theme on
   Nov 6, 2026 orphaned it, because WordPress keeps Additional CSS per theme.
   It lives in this stylesheet now so no theme switch can lose it again.
   Mobile-only hero section (50ac7e0): a slim navy band pinned to the bottom
   of each card — jet icon and white bold title side by side — so the titles
   stay readable over the card photos. Desktop/tablet sections untouched. */
@media (max-width: 767px) {
    .elementor-element-50ac7e0 .elementor-widget-wrap {
        position: relative;
        min-height: 300px;
    }
    .elementor-element-50ac7e0 .elementor-widget {
        position: static !important;
    }
    .elementor-element-50ac7e0 .elementor-widget.elementor-widget-icon-box .elementor-icon-box-wrapper {
        position: absolute !important;
        left: 0;
        right: 0;
        bottom: 0;
        height: 64px !important;
        background: rgba(18, 41, 75, 0.88);
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px;
        padding: 0 8px;
    }
    .elementor-element-50ac7e0 .elementor-icon-box-icon {
        flex: 0 0 auto;
        margin: 0 !important;
    }
    .elementor-element-50ac7e0 .elementor-icon-box-icon .elementor-icon svg {
        height: 28px;
        width: auto;
        display: block;
    }
    .elementor-element-50ac7e0 .elementor-icon-box-content {
        flex: 0 0 auto !important;
        width: auto !important;
    }
    .elementor-element-50ac7e0 .elementor-icon-box-title {
        margin: 0;
        color: #ffffff !important;
        font-size: 24px;
        font-weight: 700;
        white-space: nowrap;
    }
    .elementor-element-50ac7e0 .elementor-icon-box-title a {
        color: #ffffff !important;
    }
}

/* The listing's right-column text (short info / SEO prose) sits beside the
   navy panel on desktop; on phones it moves to the bottom of the listing
   (a second copy after the floor section, shown only on small screens). */
.cj-right-bottom {
	display: none;
}
@media (max-width: 767px) {
	#aircraft-top-details .right-content {
		display: none;
	}
	.cj-right-bottom {
		display: block;
	}
}
