﻿/* List (horizontal rows, matching the site's existing lead-magnet layout) */
.mm-fsf-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px;
}

.mm-fsf-item {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 32px 0;
}

.mm-fsf-item:not(:last-child) {
    border-bottom: 1px solid #707070;
}

.mm-fsf-item-thumb .pdf-thumbnail-wrap {
    width: 331px !important;
}

.mm-fsf-item-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 700px) {
    .mm-fsf-item {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }
}

.mm-fsf-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.mm-fsf-card-description {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

.mm-fsf-card-cta {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

/* Button - selector + !important guard against theme default button/link
   styles overriding background/color/shape, which is what was happening
   before (theme's own button CSS was winning the specificity fight). */
.mm-fsf-item .fact-sheet-download-btn {
    align-self: flex-start;
    padding: 12px 28px !important;
    border: none !important;
    border-radius: 30px !important;
    background: #2B5C32 !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    box-shadow: none !important;
    text-decoration: none !important;
}

.mm-fsf-item .fact-sheet-download-btn:hover {
    background: #224A28 !important;
    color: #fff !important;
}

.mm-fsf-empty {
    text-align: center;
    padding: 48px 24px;
    color: #666;
}

/* PDF thumbnail (shared with shortcode) - border lives on the wrap itself so
   it's present consistently whether the placeholder or the rendered canvas
   is showing, in both the archive list and the popup. */
.pdf-thumbnail-wrap {
    position: relative;
    /*aspect-ratio: 3 / 4;*/
    overflow: hidden;
}

.pdf-thumbnail-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f2f2f2;
    padding: 12px;
    box-sizing: border-box;
}

.pdf-thumbnail-icon {
    font-size: 2rem;
}

.pdf-thumbnail-filename {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    word-break: break-word;
}

.pdf-thumbnail-canvas {
    width: 100%;
    height: auto;
    display: block;
	border: 1px solid #ddd
}

/* Modal */
#mm-fsf-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#mm-fsf-modal-overlay.is-active {
    display: flex;
}

.mm-fsf-modal-box {
    background: #fff;
    border-radius: 0px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
}

#mm-fsf-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

.mm-fsf-loading {
    text-align: center;
    color: #666;
    padding: 32px 0;
}

/* Composed popup content: headline + thumbnail row, then the form below */
.mm-fsf-modal-top {
    display: flex;
    gap: 24px;
    align-items: center;
}

.mm-fsf-modal-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mm-fsf-modal-headline {
    font-size: 2.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
}

.mm-fsf-modal-subcopy {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: #0C1D36;
}

.mm-fsf-modal-thumb {
    flex: 0 0 auto;
}

.mm-fsf-modal-thumb .pdf-thumbnail-wrap {
    width: 289px !important;
}

.mm-fsf-modal-form-wrap {
    margin-top: 50px;
}

/* Defensive spacing for the injected WPForms markup - forces consistent
   vertical rhythm regardless of whether WPForms' own layout CSS is fully
   loaded on this request. If a stray/empty field label is still visible
   after confirming "Load Assets Globally" is on, that's likely an actual
   field in the WPForms builder worth checking directly rather than a CSS issue. */
.mm-fsf-modal-form-wrap .wpforms-field {
    width: 100% !important;
    float: none !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
}

.mm-fsf-modal-form-wrap .wpforms-field-label {
    margin-bottom: 6px !important;
}

/* Consistent input sizing regardless of WPForms' own theme defaults */
.mm-fsf-modal-form-wrap input[type="text"],
.mm-fsf-modal-form-wrap input[type="email"],
.mm-fsf-modal-form-wrap input[type="tel"],
.mm-fsf-modal-form-wrap input[type="number"] {
    height: 48px !important;
    border-radius: 0px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 1rem !important;
	border: 1px solid #707070!important
}

/* Submit button - match the same green pill used on the archive card */
.mm-fsf-modal-form-wrap .wpforms-submit-container {
    text-align: center;
}

.mm-fsf-modal-form-wrap .wpforms-submit {
    padding: 12px 28px !important;
    border: none !important;
    border-radius: 30px !important;
    background: #2B5C32 !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer;
}

.mm-fsf-modal-form-wrap .wpforms-submit:hover {
    background: #224A28 !important;
}

@media (max-width: 600px) {
    .mm-fsf-modal-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-right: 0;
    }
}
