.fepp-wrap,
.fepp-wrap * {
    box-sizing: border-box;
}

.fepp-wrap {
    max-width: 900px;
    margin: 30px auto;
    padding: 10px;
    font-size: 20px;
    line-height: 1.5;
}

.fepp-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 28px;
    margin: 0 0 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    color: #111;
}

.fepp-card h2,
.fepp-card h3 {
    margin-top: 0;
    color: #111;
}

.fepp-help {
    font-size: 17px;
    opacity: 0.78;
    margin: 8px 0 18px;
}

.fepp-label {
    display: block;
    font-weight: 700;
    margin: 22px 0 8px;
    color: #111;
}

.fepp-input,
.fepp-textarea,
.fepp-file {
    width: 100%;
    max-width: 100%;
    font-size: 20px;
    padding: 16px;
    border: 2px solid #cfcfcf;
    border-radius: 12px;
    background: #fff;
    color: #111;
}

.fepp-textarea {
    min-height: 160px;
}

.fepp-file {
    padding: 14px;
    background: #f8f8f8;
}

.fepp-button,
.fepp-wrap input[type="submit"] {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    background: #1d4ed8;
    color: #fff;
    line-height: 1.2;
}

.fepp-secondary {
    background: #374151;
    margin-bottom: 24px;
}

.fepp-draft {
    background: #4b5563;
}

.fepp-publish {
    background: #15803d;
}

.fepp-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.fepp-section-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.fepp-remove-section {
    border: 0;
    background: #b91c1c;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.fepp-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 20px;
    font-weight: 700;
}

.fepp-inline-image {
    margin: 24px 0;
}

.fepp-inline-image img,
.fepp-gallery-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.fepp-gallery-wrap {
    margin-top: 35px;
}

@media (max-width: 700px) {
    .fepp-wrap {
        font-size: 18px;
    }

    .fepp-card {
        padding: 20px;
    }

    .fepp-input,
    .fepp-textarea,
    .fepp-file,
    .fepp-button,
    .fepp-wrap input[type="submit"] {
        font-size: 18px;
    }

    .fepp-actions {
        display: block;
    }

    .fepp-actions .fepp-button {
        width: 100%;
        margin-bottom: 12px;
    }
}

/* Front-End Publisher Pro masonry thumbnail gallery */
.fepp-masonry-gallery-wrap {
    margin-top: 35px;
    clear: both;
}

.fepp-masonry-gallery {
    column-gap: 16px;
    margin-top: 16px;
}

.fepp-masonry-columns-2 {
    column-count: 2;
}

.fepp-masonry-columns-3 {
    column-count: 3;
}

.fepp-masonry-columns-4 {
    column-count: 4;
}

.fepp-gallery-item {
    display: block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 0 16px;
    text-decoration: none;
    border: 0;
}

.fepp-gallery-item img,
.fepp-gallery-thumb {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fepp-gallery-item:hover img,
.fepp-gallery-item:focus img {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

@media (max-width: 800px) {
    .fepp-masonry-columns-3,
    .fepp-masonry-columns-4 {
        column-count: 2;
    }
}

@media (max-width: 520px) {
    .fepp-masonry-columns-2,
    .fepp-masonry-columns-3,
    .fepp-masonry-columns-4 {
        column-count: 1;
    }
}


/* Front-End Publisher Pro author/logout controls */
.fepp-user-bar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 17px;
}

.fepp-logout-link,
.fepp-logout-button {
    background: #991b1b !important;
    color: #fff !important;
}

.fepp-login-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 520px) {
    .fepp-user-bar,
    .fepp-login-actions {
        display: block;
    }

    .fepp-user-bar .fepp-logout-link,
    .fepp-login-actions .fepp-button {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 12px;
    }
}

/* FEPP Security fields */
.fepp-security-field {
    margin: 18px 0;
}
.fepp-hp-wrap {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
