/**
 * Shared Item Tile Styles
 *
 * This file contains the core styling for item tiles used across ALL APIs:
 * - Events archive pages and shortcodes
 * - Courses archive pages and shortcodes
 * - Future API implementations
 * - Grid and carousel shortcodes
 *
 * Both new (.memberpulse-item-tile) and legacy (.memberpulse-event-tile) classes are supported
 *
 * @package MemberPulse
 * @subpackage Assets
 */

/* Base Item Tile - Used by ALL APIs (new and legacy class names) */
.memberpulse-item-tile,
.memberpulse-event-tile,
.memberpulse-company-tile {
    background: white;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 30rem;
    overflow: hidden;
    font-family: inherit;
}

/* Remove padding only for tiles with badges (events, courses, resources) */
.memberpulse-item-tile,
.memberpulse-event-tile {
    padding: 0;
}

.memberpulse-item-tile:hover,
.memberpulse-event-tile:hover,
.memberpulse-company-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Item Badge - Generic for EVENT, COURSE, etc. (new and legacy class names) */
.item-badge,
.event-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    color: var(--memberpulse-accent, #211d62);
    border: 1px solid var(--memberpulse-accent, #211d62);
    padding: 0.0625rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    margin-left: 1rem;
    width: fit-content;
}

.item-badge i,
.event-badge i {
    font-size: 0.7rem;
}

/* Item Image (new and legacy class names) */
.memberpulse-item-tile .item-image,
.memberpulse-event-tile .event-image {
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
    height: 11.25rem;
    flex-shrink: 0;
}

.memberpulse-item-tile .item-image img,
.memberpulse-event-tile .event-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* Grid layouts use background images for better control */
.memberpulse-grid .memberpulse-event-tile .event-image {
    width: 100%;
    height: 11.25rem;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.memberpulse-item-tile .item-image:hover img,
.memberpulse-event-tile .event-image:hover img {
    transform: scale(1.05);
}

/* Item Title (new and legacy class names) */
.memberpulse-item-tile .item-title,
.memberpulse-event-tile .event-title {
    margin: 0 0 0.625rem 0;
    padding: 0 1rem;
    font-size: 1.1rem;
    line-height: 1.3;
    flex-grow: 1;
}

.memberpulse-item-tile .item-title a,
.memberpulse-event-tile .event-title a {
    color: #333;
    text-decoration: none;
}

.memberpulse-item-tile .item-title a:hover,
.memberpulse-event-tile .event-title a:hover {
    color: var(--memberpulse-accent, #211d62);
}

/* Title Icon Container - No longer used */
.title-icon {
    display: none;
}

/* Item Description (new and legacy class names) */
.memberpulse-item-tile .item-description,
.memberpulse-event-tile .event-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.9375rem;
    padding: 0 1rem;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* Item Action (new and legacy class names) */
.memberpulse-item-tile .item-action,
.memberpulse-event-tile .event-action {
    margin-top: auto;
    padding: 0 1rem 1rem 1rem;
}

/* View Button (new and legacy class names) */
.view-item-btn,
.view-event-btn {
    display: block;
    width: 100%;
    background: var(--memberpulse-accent, #211d62);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none !important;
    font-size: 0.9rem;
    text-align: center;
    transition: background-color 0.2s;
}

.view-item-btn:hover,
.view-event-btn:hover {
    background: var(--memberpulse-accent-hover, #005a87);
}