.custom-flex-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.custom-flex-item {
  flex: 1 1 200px;
  margin: 10px; /* Optional: for spacing between items */
}

/* Shortcode-specific: respect img_width and prevent items from bloating */
.n10-pdf-shortcode .custom-flex-item {
  flex: 0 1 var(--n10-img-width, 200px);
  max-width: var(--n10-img-width, 200px);
}

.n10-pdf-shortcode .pdf-thumbnail-container img {
  max-width: 100%;
  height: auto;
}


/* Lightbox Overlay */
.pdf-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.pdf-lightbox-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-lightbox-content iframe {
    width: 100%;
    height: 600px;
}

/* Thumbnail drop shadow (default on) */
.n10-pdf-shortcode.n10-pdf-shadow .pdf-thumbnail-container img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* Shortcode button styles (outside Elementor) */
.n10-pdf-shortcode .pdf-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    background: var(--n10-btn-bg, #000);
    color: var(--n10-btn-color, #fff);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.n10-pdf-shortcode .pdf-button:hover {
    filter: brightness(0.85);
    color: var(--n10-btn-color, #fff);
}

.n10-pdf-shortcode .pdf-download-button {
    background: var(--n10-dl-bg, #fff);
    color: var(--n10-dl-color, #000);
    border: 1px solid #000;
}

.n10-pdf-shortcode .pdf-download-button:hover {
    filter: brightness(0.9);
    color: var(--n10-dl-color, #000);
}

.pdf-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
}

/* --------------------------------------
   List layout (row style)
-------------------------------------- */
.n10-pdf-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* The card also carries .pdf-thumbnail-container so Box Style controls apply.
   The declarations below are DEFAULTS only — any value set in the Style tab
   (border, radius, background, shadow) overrides them. Padding is driven by the
   List "Padding" control (default 16px 20px). */
.n10-pdf-list-item {
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.n10-pdf-list-thumb {
    flex: 0 0 auto;
    line-height: 0;
}

/* Default thumbnail sizing/rounding — overridden by the Thumbnail Style controls.
   max-width (not a fixed width) so a Max Height cap scales the image down
   proportionally instead of squashing it. */
.n10-pdf-list-thumb img {
    height: auto;
    max-width: 56px;
    border-radius: 6px;
    display: block;
}

.n10-pdf-list-info {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.n10-pdf-list-title {
    margin: 0 0 4px;
}

.n10-pdf-list-meta {
    font-size: 14px;
    line-height: 1.4;
    color: #6b7280;
}

.n10-pdf-list-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stack cleanly on narrow screens */
@media (max-width: 600px) {
    .n10-pdf-list-item {
        flex-wrap: wrap;
    }
    .n10-pdf-list-actions {
        width: 100%;
    }
    .n10-pdf-list-actions .pdf-button {
        flex: 1 1 auto;
        text-align: center;
    }
}

