/*
 * DXPX Agenda Frontend Styles
 *
 * This stylesheet provides styling for the [dxpx_agenda] shortcode output.
 * Aim for a clean, modern, and compact design, similar to professional dashboards.
 */

.dxpx-agenda-frontend-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    max-width: 900px; /* Constrain width for readability */
    margin: 20px auto; /* Center the agenda */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dxpx-agenda-frontend-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dxpx-agenda-frontend-event-info {
    background-color: #eef7fc;
    border-left: 44px solid #007cba;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.dxpx-agenda-frontend-event-info h3 {
    font-size: 20px;
    color: #005b8a;
    margin-top: 0;
    margin-bottom: 8px;
}

.dxpx-agenda-frontend-event-info p {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.5;
}

.dxpx-agenda-frontend-event-info p:last-child {
    margin-bottom: 0;
}

.dxpx-agenda-frontend-days {
    margin-top: 30px;
}

.dxpx-agenda-frontend-day {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden; /* Ensures border-radius applies to children */
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dxpx-agenda-frontend-day-date {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    background-color: #f0f0f0;
    padding: 15px 20px;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
}

.dxpx-agenda-frontend-items {
    padding: 15px 20px;
}

.dxpx-agenda-frontend-item {
    display: flex;
    align-items: stretch; /* Make children stretch to full height */
    gap: 20px;
    padding: 0; /* Remove vertical padding from parent */
    border-bottom: 1px solid #eee;
}

.dxpx-agenda-frontend-item:last-child {
    border-bottom: none;
}

.dxpx-agenda-frontend-item-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0; /* Prevent time from shrinking */
    font-size: 14px;
    font-weight: 600;
    color: #3f3f3f;
    width: 100px; /* Fixed width for time */
    text-align: right;
    padding: 15px;
    margin: 0; /* Reset margin as we are using align-items: stretch */
    background-color: #00000005; /* Inherit from parent */
}

.dxpx-agenda-frontend-item-room-location {
    width: 100%;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    display: block;
}

.dxpx-agenda-frontend-item-content {
    flex-grow: 1; /* Allow content to take remaining space */
    padding-left: 20px;
    padding-top: 15px; /* Add padding here instead */
    padding-bottom: 15px; /* Add padding here instead */
    display: flex;
    flex-direction: column; /* Stack title, description, presenters vertically */
}

.dxpx-agenda-frontend-item-details {
    flex-grow: 1;
}

.dxpx-agenda-frontend-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.dxpx-agenda-frontend-item-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.dxpx-agenda-frontend-presenters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

/* Link button displayed under description in agenda items */
.dxpx-agenda-frontend-item-link {
    margin: 8px 0 12px; /* small gap between description and presenters */
}

.dxpx-agenda-link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #007cba; /* primary blue */
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
}

.dxpx-agenda-link-button:hover,
.dxpx-agenda-link-button:focus {
    background-color: #006ba1;
    color: #fff;
    text-decoration: none;
}

/* Make sure button stacks nicely on small screens */
@media (max-width: 480px) {
    .dxpx-agenda-frontend-item-link .dxpx-agenda-link-button {
        width: 100%;
        justify-content: center;
        padding: 10px 12px;
    }
}

.dxpx-agenda-frontend-presenter {
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between photo and text details */
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 25px; /* Pill shape */
    padding: 5px 15px 5px 5px;
    font-size: 13px;
    color: #444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.dxpx-presenter-frontend-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.dxpx-presenter-frontend-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    line-height: 1.2;
    gap: 2px; /* Spacing between name/role block, position, logo */
}

.dxpx-presenter-frontend-name-and-role { /* New class */
    display: flex;
    align-items: center;
    gap: 5px; /* Spacing between name and role tag */
}

.dxpx-presenter-frontend-name {
    font-weight: 600;
    color: #222;
}

.dxpx-presenter-frontend-role-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

.dxpx-speaker-tag {
    background-color: #e0f7fa;
    color: #00796b;
}

.dxpx-moderator-tag {
    background-color: #fff3e0;
    color: #e65100;
}

.dxpx-presenter-frontend-position {
    font-size: 11px;
    color: #777;
}

.dxpx-presenter-company-logo-wrapper {
    flex-shrink: 0;
    width: 60px; /* Slightly larger logo wrapper size */
    height: 25px; /* Slightly larger logo wrapper size */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 5px; /* Add some space above the logo */
}

.dxpx-presenter-company-logo-wrapper img {
    height: 25px; /* size defined by height to avoid cropping */
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.dxpx-company-frontend-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sponsor display for agenda items */
.dxpx-agenda-frontend-item-sponsor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    /* Add a separator line to visually distinguish the sponsor section */
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    justify-content: flex-end; /* Align sponsor content to the right */
}

.dxpx-sponsor-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dxpx-sponsor-link, .dxpx-sponsor-plain {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.dxpx-agenda-sponsor-logo {
    max-height: 36px; /* limit by max-height so elongated logos aren't cropped */
    height: auto;
    width: auto; /* allow natural width, constrained by max-width below */
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.06);
    background: #fff;
    display: inline-block;
}

.dxpx-agenda-sponsor-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

/* Override hover effect for company logo in agenda */
.dxpx-presenter-company-logo-wrapper.dxpx-sponsor-tile:hover {
    transform: none;
    box-shadow: none;
}

/* Alternating background colors for agenda items */
.dxpx-agenda-frontend-item:nth-child(odd) {
    background-color: #ffffff;
}

.dxpx-agenda-frontend-item:nth-child(even) {
    background-color: #f8f8f8;
}
.dxpx-agenda-frontend-item:nth-child(odd) .dxpx-agenda-frontend-item-time {
    background-color: #fcfcfc; /* Slightly darker than white */
}

/* In darker rows, make presenter cards lighter to stand out */
.dxpx-agenda-frontend-item:nth-child(even) .dxpx-agenda-frontend-presenter {
    background-color: #ffffff;
    border-color: #e9e9e9; /* Slightly adjust border for contrast */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dxpx-agenda-frontend-wrap {
        padding: 15px;
        margin: 10px;
    }

    .dxpx-agenda-frontend-title {
        font-size: 24px;
    }

    .dxpx-agenda-frontend-day-date {
        font-size: 18px;
        padding: 10px 15px;
    }

    .dxpx-agenda-frontend-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dxpx-agenda-frontend-item-time {
        width: auto;
        text-align: left;
        padding-right: 0;
        padding: 0;
        margin: 0;
        background-color: transparent;
        align-items: flex-start;
        border-right: none;
    }

    .dxpx-agenda-frontend-speakers {
        flex-direction: column;
        gap: 10px;
    }

.dxpx-agenda-frontend-presenter {
        width: 100%;
        justify-content: flex-start;
        padding: 8px 10px;
    }

    .dxpx-agenda-frontend-item-content {
        padding-left: 0;
    }
}

.dxpx-no-items, .dxpx-no-days {
    font-style: italic;
    color: #777;
    padding: 10px 0;
    text-align: center;
}