/* Olifest Latest Events - shortcode styles.
   Colors are driven by CSS variables injected from plugin settings (with fallbacks). */

/* HEADER (tabs + app button) */
.wple-header {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 18px 0;
    border-bottom: 2px solid var(--ole-card-border, rgba(0, 0, 0, .08));
}

/* APP BUTTON (top-right of the header) */
.wple-app-btn {
    margin-left: auto;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--ole-accent, #f9680b);
    color: var(--ole-button-text, #000);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700 !important;
    white-space: nowrap;
    transition: all .2s ease;
}

.wple-app-btn .wple-ico { color: var(--ole-button-text, #000); }

.wple-app-btn:hover {
    background: var(--ole-accent-hover, #e55f08);
    transform: translateX(1px);
}

/* TABS */
.wple-tabs {
    display: flex;
    gap: 8px;
    margin: 0;
}

/* Scoped + !important to defeat theme button styles (hover/focus/active colors). */
.wple-wrap .wple-tab,
.wple-wrap .wple-tab:hover,
.wple-wrap .wple-tab:focus,
.wple-wrap .wple-tab:active {
    appearance: none;
    background: transparent !important;
    border: 0;
    border-bottom: 3px solid transparent;
    box-shadow: none !important;
    outline: none;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: inherit;
    transition: all .15s ease;
}

.wple-wrap .wple-tab { opacity: .6; }

.wple-wrap .wple-tab:hover,
.wple-wrap .wple-tab:focus {
    opacity: .9;
    color: var(--ole-accent, #f9680b) !important;
}

.wple-wrap .wple-tab.is-active {
    opacity: 1;
    color: var(--ole-accent, #f9680b) !important;
    border-bottom-color: var(--ole-accent, #f9680b) !important;
}

.wple-panel { display: none; }
.wple-panel.is-active { display: block; }

.wple-empty {
    opacity: .7;
    font-style: italic;
    padding: 20px 0;
}

.wple-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 900px) {
    .wple-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .wple-grid { grid-template-columns: 1fr; }
}

.wple-card {
    border: 1px solid var(--ole-card-border, rgba(0, 0, 0, .08));
    border-radius: 14px;
    overflow: hidden;
    background: var(--ole-card-bg, #fff);
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.wple-thumb { position: relative; }

.wple-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
    display: block;
}

.wple-cat {
    font-size: 13px;
    font-weight: 600;
    color: var(--ole-button-text, #000);
    background: var(--ole-accent, #f9680b);
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 7px;
    border-radius: 12px;
}

/* TITLE | DESCRIPTION */
.wple-title {
    margin: 10px 0 0 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: bold;
    padding: 14px;
}

.wple-desc {
    font-size: 14px;
    opacity: .9;
    padding: 0 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    line-height: 1.4;
    max-height: calc(1.4em * 4);
}

/* ORGANIZER */
.wple-org {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-weight: 700;
    padding: 0 14px;
}

.wple-orglogo {
    width: 32px;
    height: 32px !important;
    border-radius: 999px !important;
    object-fit: cover;
}

/* ARTISTS (compact avatar row shown on cards) */
.wple-artists {
    display: flex;
    gap: 10px;
    padding: 8px 14px 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wple-artist {
    flex: 0 0 auto;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Match the organizer logo: enforce a circle with !important so themes that set
   img { height:auto } or border-radius:0 can't square the avatars off. */
.wple-artist-img,
.wple-artist-placeholder {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px;
    max-width: 56px;
    border-radius: 999px !important;
    background: rgba(0,0,0,0.06);
    object-fit: cover !important;
    display: block;
}

.wple-artist-placeholder { display: inline-block; }

.wple-artist-name {
    font-size: 12px;
    margin-top: 6px;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Prevent horizontal overflow from long artist rows on very small screens */
@media (max-width: 360px) {
    .wple-artist { width: 60px; }
    .wple-artist-name { font-size: 11px; max-width: 60px; }
}

/* META - DATE | ADDRESS */
.wple-meta {
    font-size: 13px;
    opacity: .85;
    display: grid;
    gap: 4px;
    margin: 10px 0;
    padding: 0 14px;
}

.wple-meta-dt {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wple-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.wple-ico {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: var(--ole-accent, #f9680b);
}

.wple-sep { opacity: .6; }

/* ACTION BUTTONS */
.wple-actions {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
}

.wple-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background: var(--ole-accent, #f9680b);
    color: var(--ole-button-text, #000);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700 !important;
    transition: all .2s ease;
    text-align: center;
    justify-content: center;
}

.wple-btn .wple-ico { color: var(--ole-button-text, #000); }

.wple-btn:hover {
    background: var(--ole-accent-hover, #e55f08);
}

.wple-btn-secondary {
    background: transparent;
    color: var(--ole-accent, #f9680b);
    border-top: 1px solid var(--ole-card-border, rgba(0, 0, 0, .08));
}

.wple-btn-secondary .wple-ico { color: var(--ole-accent, #f9680b); }

.wple-btn-secondary:hover {
    background: rgba(0, 0, 0, .04);
    color: var(--ole-accent-hover, #e55f08);
}

.wple-card.is-past { opacity: .85; }

/* SINGLE EVENT PAGE */
.wple-single {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.wple-single-cat {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ole-button-text, #000);
    background: var(--ole-accent, #f9680b);
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.wple-single-title {
    margin: 6px 0 16px;
    line-height: 1.15;
}

.wple-single-thumb {
    margin: 0 0 20px;
}

.wple-single-thumb img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
}

.wple-single-meta {
    display: grid;
    gap: 8px;
    margin: 0 0 24px;
    font-size: 15px;
}

.wple-single-metaitem {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.wple-single-metaitem .dashicons { color: var(--ole-accent, #f9680b); }

.wple-single-metaitem address {
    font-style: normal;
    display: inline;
}

.wple-single-org img { border-radius: 999px; object-fit: cover; }

.wple-single-content { line-height: 1.6; margin-bottom: 24px; }

.wple-single-artists ul {
    list-style: disc;
    padding-left: 20px;
    margin: 8px 0 24px;
}

.wple-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wple-single-actions .wple-btn {
    border-radius: 10px;
    padding: 12px 22px;
}

.wple-single-actions .wple-btn-secondary {
    border: 1px solid var(--ole-accent, #f9680b);
}

/* LOAD MORE */
.wple-more-wrap {
    display: flex;
    justify-content: center;
    margin: 28px 0 8px;
}

.wple-wrap .wple-more-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--ole-accent, #f9680b);
    color: var(--ole-button-text, #000);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease, transform .1s ease;
}

.wple-wrap .wple-more-btn:hover,
.wple-wrap .wple-more-btn:focus {
    background: var(--ole-accent-hover, #e55f08);
    color: var(--ole-button-text, #000);
}

.wple-wrap .wple-more-btn:active { transform: translateY(1px); }

.wple-wrap .wple-more-btn.is-loading {
    opacity: .65;
    cursor: progress;
}
