.pfts-submit-form,
.pfts-dashboard,
.pfts-listing-grid {
    box-sizing: border-box;
    max-width: 100%;
}
.pfts-submit-form *,
.pfts-dashboard *,
.pfts-listing-grid * {
    box-sizing: border-box;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.pfts-submit-form .pfts-notice,
.pfts-dashboard .pfts-notice {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    /* Divi ships `.et_pb_toggle_content p:last-of-type{padding-bottom:0}`,
       which outranks a plain two-class selector by specificity and forces
       this box's bottom padding to 0 inside an accordion (exactly where
       this form lives) - see pf-equipment-sales' style.css for the same fix. */
    padding: 14px 18px !important;
    border-radius: 4px;
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.5;
}
.pfts-notice-success {
    background: #e7f7ed;
    border: 1px solid #8fd6a8;
    color: #1e6b3a;
}
.pfts-notice-error {
    background: #fdecea;
    border: 1px solid #f3b3ac;
    color: #a3211a;
}
.pfts-notice-error ul {
    margin: 0;
    padding-left: 20px;
}

/* ─── Submission form ───────────────────────────────────────────────── */
.pfts-form-heading {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}
.pfts-form {
    width: 100%;
    max-width: 900px;
}
.pfts-form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 32px;
}
.pfts-form legend {
    font-size: 20px;
    font-weight: 700;
    width: 100%;
    padding-bottom: 8px;
    margin-bottom: 18px;
    border-bottom: 2px solid #eee;
}
.pfts-required-note {
    color: #555;
    font-size: 14px;
    margin-bottom: 24px;
}

.pfts-field {
    margin: 0 0 20px;
}
.pfts-field label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}
.pfts-field-control input[type="text"],
.pfts-field-control input[type="url"],
.pfts-field-control input[type="date"],
.pfts-field-control input[type="file"],
.pfts-field-control textarea {
    display: block;
    width: 100%;
    font-weight: normal;
    font-size: 16px;
    font-family: inherit;
    padding: 12px 14px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    background: #fff;
    line-height: 1.4;
}
.pfts-field-control input[type="text"],
.pfts-field-control input[type="url"] {
    min-height: 48px;
}
.pfts-field-control input[type="date"] {
    min-height: 48px;
    cursor: pointer;
}
.pfts-field-control input[type="file"] {
    padding: 10px 14px;
}
.pfts-field-control textarea {
    min-height: 140px;
    resize: vertical;
}
.pfts-field-control input:focus,
.pfts-field-control textarea:focus {
    outline: none;
    border-color: #0095cf;
    box-shadow: 0 0 0 3px rgba(0, 149, 207, 0.15);
}
.pfts-field-control input.pfts-invalid,
.pfts-field-control textarea.pfts-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.pfts-field-error {
    display: block;
    margin-top: 6px;
    color: #a3211a;
    font-weight: 600;
    font-size: 14px;
}
.pfts-field-control small {
    display: block;
    margin-top: 6px;
    color: #666;
}
.pfts-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0095cf;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.pfts-btn:hover {
    background: #0078a8;
}

/* Logo manager (edit mode): existing logo with a remove checkbox. */
.pfts-logo-manager {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.pfts-logo-manager img {
    display: block;
    max-width: 130px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
}
.pfts-logo-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: normal;
    color: #a3211a;
}

/* Label-beside-input on wider screens; stacked on mobile (default above). */
@media screen and (min-width: 700px) {
    .pfts-field {
        display: grid;
        grid-template-columns: 200px 1fr;
        column-gap: 20px;
        align-items: start;
    }
    .pfts-field label {
        margin-bottom: 0;
        padding-top: 12px;
    }
}

/* ─── Listing grid ──────────────────────────────────────────────────── */
.pfts-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 16px;
}
.pfts-empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
}
.pfts-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}
.pfts-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: #fafafa;
    padding: 20px;
}
.pfts-card-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.pfts-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}
.pfts-card-title {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.3;
    word-break: break-word;
}
.pfts-card-description {
    margin-bottom: 16px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #333;
    word-break: break-word;
}
.pfts-card-description p:last-child {
    margin-bottom: 0;
}
.pfts-card-link {
    margin: auto 0 0;
    padding-top: 14px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.pfts-card-link a {
    color: #0095cf;
    font-weight: 600;
    text-decoration: none;
}
.pfts-card-link a:hover {
    text-decoration: underline;
}

/* ─── Member dashboard ("My Training & Info Session Listings") ───────── */
.pfts-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 8px;
}
.pfts-dashboard-table th,
.pfts-dashboard-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}
.pfts-dashboard-table th {
    font-weight: 600;
    color: #444;
    border-bottom: 2px solid #ddd;
}
.pfts-dashboard-table a {
    white-space: nowrap;
}
.pfts-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #eee;
    color: #333;
}
.pfts-status-published {
    background: #e7f7ed;
    color: #1e6b3a;
}
.pfts-status-pending-review {
    background: #fff4e0;
    color: #8a5a00;
}
.pfts-status-expired {
    background: #eee;
    color: #666;
}

/* Stack the dashboard table into two-line rows on narrow screens instead
   of forcing a horizontally-scrolling table. */
@media screen and (max-width: 600px) {
    .pfts-dashboard-table thead {
        display: none;
    }
    .pfts-dashboard-table,
    .pfts-dashboard-table tbody,
    .pfts-dashboard-table tr,
    .pfts-dashboard-table td {
        display: block;
        width: 100%;
    }
    .pfts-dashboard-table tr {
        border: 1px solid #e2e2e2;
        border-radius: 8px;
        margin-bottom: 14px;
        padding: 4px 0;
    }
    .pfts-dashboard-table td {
        border-bottom: none;
        padding: 8px 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    .pfts-dashboard-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #444;
        flex: 0 0 auto;
    }
}

/* ─── General small-screen breathing room ──────────────────────────── */
@media screen and (max-width: 480px) {
    .pfts-form legend {
        font-size: 18px;
    }
    .pfts-btn {
        width: 100%;
        text-align: center;
    }
}
