/* GC&E Sessions Table - Grid Version Styles */

/* Grid Layout Structure */
.gce-sessions-grid {
    width: 100%;
}

.gce-sessions-header {
    display: grid;
    grid-template-columns: 15% 35% 35% 15%;
    gap: 10px;
    padding: 12px 10px;
    background: transparent;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.gce-sessions-data {
    display: block;
}

/* Individual Session Row */
.gce-session-row {
    display: grid;
    grid-template-columns: 15% 35% 35% 15%;
    gap: 10px;
    padding: 15px 10px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, opacity 0.3s ease-in-out, height 0.4s ease-in-out, margin 0.4s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow: hidden;
}

/* Striped rows */
.gce-sessions-data .gce-session-row:nth-child(odd) {
    background: rgba(0, 0, 0, 0.02);
}

.gce-session-row:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Allow text selection in content */
.gce-session-row h4,
.gce-session-row p {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Column Specific Styling */
.gce-col-time {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #333;
}

.gce-col-session, .gce-col-type {
    color: #333 !important;
}

.gce-time {
    font-weight: 400 !important;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #333;
}

.gce-date {
    font-size: 0.8rem;
    color: #4ca8d2;
}

.gce-col-session h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.3;
    color: #333;
}

.gce-col-session h4 a {
    color: #cc8b2a;
    text-decoration: underline;
}

.gce-col-session h4 a:hover {
    color: #333;
    text-decoration: underline;
}

.gce-col-session p {
    margin: 0;
    line-height: 1.4;
    color: #666;
}

.gce-col-presiders {
    font-size: 0.9rem;
    color: #333;
    word-wrap: break-word;
}

.gce-col-type {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.gce-col-type span {
    display: inline-block;
    padding: 2px 8px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
}

/* Filtering Animation States */
.gce-session-row.filtering-out {
    opacity: 0;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-bottom-width: 0;
}

.gce-session-row.filtering-in {
    opacity: 0;
    transform: translateY(-20px);
}

.gce-session-row.filtering-in.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Filter section styling */
.gce-sessions-wrapper .uk-form-label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

/* Reset button styling */
.gce-reset-filters {
    margin-top: 24px;
    align-self: end;
}

/* Reset button container alignment */
.gce-sessions-wrapper .uk-grid > .uk-width-auto {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Loading state */
.gce-sessions-results .uk-text-center {
    padding: 40px 20px;
    transition: opacity 0.3s ease-in-out;
}

/* No results styling */
.gce-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

/* Responsive adjustments */
@media (max-width: 750px) {
    .gce-sessions-wrapper .uk-grid > div {
        margin-bottom: 10px;
    }
    
    .gce-sessions-wrapper .uk-form-label {
        font-size: 0.9rem;
    }
    
    /* Hide desktop header on mobile */
    .gce-sessions-header {
        display: none;
    }
    
    /* Switch to card layout for mobile */
    .gce-session-row {
        display: block;
        padding: 20px 15px;
        border-bottom: none;
        margin: 0 0 15px 0;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        border: 1px solid #e5e5e5;
    }
    
    /* Mobile card content layout */
    .gce-col-time {
        display: flex;
        align-items: baseline;
        gap: 10px;
        margin-bottom: 12px;
        font-size: 0.95rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .gce-time {
        font-weight: 600 !important;
        color: #333;
    }
    
    .gce-date {
        font-size: 0.85rem !important;
        color: #4ca8d2;
        font-weight: 400;
    }
    
    .gce-col-session {
        margin-bottom: 12px;
    }
    
    .gce-col-session h4 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin: 0;
    }
    
    .gce-col-session h4 a {
        color: #cc8b2a;
        text-decoration: underline;
    }
    
    .gce-col-session h4 a:hover {
        color: #333;
        text-decoration: underline;
    }
    
    .gce-col-session p {
        margin: 8px 0 0 0;
        font-size: 0.9rem;
        line-height: 1.4;
        color: #666;
    }
    
    /* Mobile-only labels */
    .gce-col-presiders::before {
        content: "Presiders:";
        display: block;
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
        font-size: 0.9rem;
    }
    
    .gce-col-presiders {
        margin-bottom: 12px;
        font-size: 0.9rem;
        color: #333;
        line-height: 1.4;
    }
    
    /* Mobile-only Session Type label and alignment */
    .gce-col-type::before {
        content: "Session Type:";
        display: block;
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
        font-size: 0.9rem;
        text-align: left;
    }
    
    .gce-col-type {
        display: block;
        text-align: left;
        margin-bottom: 0;
        justify-content: flex-start;
    }
    
    .gce-col-type span {
        display: inline-block;
        padding: 4px 10px;
        background: #f8f8f8;
        border: 1px solid #e5e5e5;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: 500;
        color: #333;
    }
    
    /* Remove grid gaps on mobile */
    .gce-sessions-data .gce-session-row:nth-child(odd) {
        background: #fff;
    }
    
    .gce-session-row:hover {
        background-color: #fff !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        transition: all 0.2s ease-in-out;
    }
    
    /* Mobile no results styling */
    .gce-no-results {
        text-align: center;
        padding: 40px 20px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        border: 1px solid #e5e5e5;
        margin: 0 0 15px 0;
    }
    
    /* Mobile filtering animations */
    .gce-session-row.filtering-out {
        opacity: 0;
        height: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
        transform: scale(0.95);
        overflow: hidden;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .gce-sessions-header {
        background: transparent;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .gce-session-row {
        border-color: #4a5568;
    }
    
    .gce-col-type span {
        background: transparent;
        border-color: transparent;
        color: inherit;
    }
}
