/**
 * Notifal Marketplace layout preview styles.
 *
 * Shared by archive cards, mega menu previews, and landing page template demos.
 * Keep this file small so it can load site-wide without archive page overhead.
 *
 * @package Notifal Marketplace
 * @since 1.0.0
 */

/* Template thumbnail shell used in cards and preview frames */
.featured-image {
    aspect-ratio: 3 / 2;
    position: relative;
    background-color: #d1d1d1;
    border: 1px solid #7B2CBF;
    border-radius: 16px;
    overflow: hidden;
    border-bottom-width: 3px;
}

.featured-image img,
.featured-image .image-placeholder {
    border-radius: 10px;
}

/* Simulated site background for notification layouts */
.notifal-layout-holder {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.notifal-layout-site {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, #e8e9ec 0%, #dfe1e5 100%);
    overflow: hidden;
}

.notifal-layout-cover-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px 12px;
    pointer-events: none;
}

.notifal-layout-cover-row {
    height: 6px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.35);
    width: 100%;
}

.notifal-layout-cover-row:first-child {
    height: 8px;
    max-width: 100%;
    background: rgba(148, 163, 184, 0.4);
}

.notifal-layout-cover-row:nth-child(2) {
    width: 92%;
    height: 24px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.28);
}

.notifal-layout-cover-row--small {
    height: 5px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.3);
    width: 72%;
}

.notifal-layout-cover-row--small:last-of-type {
    width: 85%;
}

.notifal-layout-cover-columns {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex: 1;
    min-height: 0;
}

.notifal-layout-cover-col {
    flex: 1;
    min-width: 0;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.22);
}

.notifal-layout-cover-col:first-child {
    flex: 0.85;
}

.notifal-layout-cover-col:last-child {
    flex: 1.1;
}

.notifal-layout-feature {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px 10px;
    box-sizing: border-box;
}

.notifal-layout-feature .image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 60px;
    background-color: #d1d1d1;
    border: 1px solid rgba(123, 44, 191, 0.4);
}

/* Popup: centered, overlay behind popup */
.featured-image.notifal-layout--popup .notifal-layout-feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

.featured-image.notifal-layout--popup .notifal-layout-feature img,
.featured-image.notifal-layout--popup .notifal-layout-feature .image-placeholder {
    max-width: 78%;
    max-height: 78%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* Floating bar: full width, flush to top */
.featured-image.notifal-layout--floating-bar .notifal-layout-feature {
    align-items: flex-start;
    justify-content: center;
    padding: 0 0 10px 0;
}

.featured-image.notifal-layout--floating-bar .notifal-layout-feature img,
.featured-image.notifal-layout--floating-bar .notifal-layout-feature .image-placeholder {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 38%;
    min-height: 28px;
    object-fit: contain;
    object-position: top center;
    border-radius: 0;
}

/* Floating box: bottom-left */
.featured-image.notifal-layout--floating-box .notifal-layout-feature {
    align-items: flex-end;
    justify-content: flex-start;
}

.featured-image.notifal-layout--floating-box .notifal-layout-feature img,
.featured-image.notifal-layout--floating-box .notifal-layout-feature .image-placeholder {
    max-width: 60%;
    max-height: 68%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: bottom left;
}
