/**
 * Upcoming Events Shortcode Styles
 * 
 * @package AzurePlugin
 */

/* Container */
.upcoming-events {
    font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    margin: 1rem 0;
}

/* Multi-column layouts */
.upcoming-columns-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.upcoming-columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .upcoming-columns-2,
    .upcoming-columns-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Week sections */
.upcoming-week {
    margin-bottom: 1rem;
}

.upcoming-week h3 {
    font-weight: 700;
    font-size: 1.1em;
    margin: 0 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid #0073aa;
    color: #333;
}

/* Event list */
.upcoming-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.upcoming-event {
    margin: 0.35rem 0;
    line-height: 1.5;
}

/* Date styling */
.upcoming-date {
    color: #666;
    font-weight: 500;
}

/* Separator */
.upcoming-separator {
    color: #999;
}

/* Title styling */
.upcoming-title {
    color: inherit;
}

a.upcoming-title {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

a.upcoming-title:hover {
    border-bottom-color: currentColor;
    color: #0073aa;
}

.upcoming-title-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
}

.upcoming-volunteer-spaces {
    display: inline-block;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.upcoming-volunteer-spaces.is-empty {
    color: #9b1c1c;
    background: #fde8e8;
}

.upcoming-volunteer-spaces.is-partial {
    color: #8a5a00;
    background: #ffe8a3;
}

.upcoming-volunteer-spaces.is-full {
    color: #0f6b32;
    background: #d8f3e2;
}

.upcoming-body-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.upcoming-body-copy {
    flex: 1;
    min-width: 0;
}

.upcoming-online-meeting,
.upcoming-join-meeting {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.upcoming-join-meeting .pta-join-meeting--compact {
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    flex: 0 0 auto;
}

.upcoming-join-meeting .pta-join-meeting--icon,
.upcoming-join-meeting .pta-join-meeting--icon:hover,
.upcoming-join-meeting .pta-join-meeting--icon:focus {
    color: #ffffff !important;
}

.upcoming-join-meeting .pta-join-meeting--icon {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    padding: 0;
    gap: 0;
    justify-content: center;
    flex: 0 0 28px;
    overflow: hidden;
}

.upcoming-join-meeting .pta-join-meeting-svg {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    display: block;
}

.upcoming-event.has-corner {
    position: relative;
}

.upcoming-event.has-corner .upcoming-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    max-width: 46%;
    text-align: right;
}

.upcoming-event.has-corner .upcoming-place {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
}

.upcoming-event.has-corner .upcoming-body {
    padding-right: 42%;
}

.upcoming-online-meeting a {
    color: #0073aa;
    text-decoration: underline;
}

.upcoming-online-meeting a:hover {
    color: #005f8d;
}

/* Empty message */
.upcoming-empty {
    color: #666;
    font-style: italic;
    margin: 0.5rem 0;
}

/* Error message */
.upcoming-error {
    color: #dc3545;
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .upcoming-week h3 {
        color: #e0e0e0;
        border-bottom-color: #4a9fd4;
    }
    
    .upcoming-date {
        color: #aaa;
    }
    
    .upcoming-separator {
        color: #666;
    }
    
    a.upcoming-title:hover {
        color: #4a9fd4;
    }

    .upcoming-event.has-corner .upcoming-place {
        color: #ddd;
    }

    .upcoming-online-meeting a {
        color: #4a9fd4;
    }

    .upcoming-online-meeting a:hover {
        color: #74b7e5;
    }
    
    .upcoming-empty {
        color: #999;
    }
}

