/* Theme Name: Coa Child Theme
Description: This is child theme of coa
Author: Frank Martha
Author URI: https://eastek.co.ke
Template: coa
Version: 1.0.0
Tags: two-columns, three-columns, left-sidebar, right-sidebar, custom-menu, editor-style, featured-images, flexible-header, full-width-template, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain:  coa-child
*/

/* =============================================================================
   NAVBAR DROPDOWN FIX - Prevent items going off-screen on right side
   ============================================================================= */

/* For menu items on the right side, open submenus to the left */
@media (min-width: 992px) {
    /* Target the last few menu items (typically on the right) */
    .ova-menu ul.nav > li:nth-last-child(-n+3).dropdown > ul.dropdown-menu {
        left: auto;
        right: 0;
    }
    
    /* Nested submenus should open to the left for right-side items */
    .ova-menu ul.nav > li:nth-last-child(-n+3) ul.dropdown-menu ul.dropdown-menu {
        left: auto;
        right: 100%;
    }
    
    /* Ensure dropdowns don't overflow viewport */
    .ova-menu ul.dropdown-menu {
        max-width: calc(100vw - 40px);
    }
    
    /* Fix for any dropdown that would go off-screen */
    .ova-menu ul.nav li.dropdown ul.dropdown-menu {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Mobile menu improvements */
@media (max-width: 991.98px) {
    .ova-menu ul.dropdown-menu {
        position: static !important;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        padding-left: 15px;
    }
    
    .ova-menu ul.dropdown-menu ul.dropdown-menu {
        padding-left: 15px;
    }
}

/* =============================================================================
   VIRTUAL COURTS LINK GRID STYLES
   ============================================================================= */
.coa-virtual-courts {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.coa-virtual-courts-title {
    text-align: center;
    color: #25443C;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.coa-virtual-courts-subtitle {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-bottom: 40px;
}

.coa-courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.coa-court-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.coa-court-card:hover {
    border-color: #c9a227;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 68, 60, 0.2);
}

.coa-court-card-header {
    background: linear-gradient(135deg, #25443C 0%, #3d6b5c 100%);
    padding: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}

.coa-court-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.coa-court-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.coa-court-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.coa-court-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.coa-court-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.coa-court-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 15px;
}

.coa-court-meta-item i {
    color: #25443C;
}

.coa-court-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 15px;
}

.coa-court-status.live {
    background: #d4edda;
    color: #155724;
}

.coa-court-status.live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.coa-court-status.scheduled {
    background: #fff3cd;
    color: #856404;
}

.coa-court-status.ended {
    background: #f8d7da;
    color: #721c24;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.coa-court-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25443C;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.coa-court-link:hover {
    background: #c9a227;
    color: #1a1a1a !important;
}

.coa-court-link i {
    font-size: 16px;
}

/* Court type badges */
.coa-court-type {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #c9a227;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

/* Empty state */
.coa-courts-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.coa-courts-empty i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .coa-courts-grid {
        grid-template-columns: 1fr;
    }
    
    .coa-virtual-courts-title {
        font-size: 24px;
    }
}
