﻿/* =====================================================
   OpeningGuide – GM Directory Styles
   Scoped under .openingguide-directory
   ===================================================== */

/* --- FILTER BAR STYLES --- */
.openingguide-directory .gm-filter-bar {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #cbd5e0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.openingguide-directory .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.openingguide-directory .filter-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #4a5568;
    text-transform: uppercase;
}

.openingguide-directory .gm-input,
.openingguide-directory .gm-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 180px;
}

.openingguide-directory .gm-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.openingguide-directory .gm-count {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: #718096;
    margin-top: 10px;
    font-style: italic;
}

/* --- GRID STYLES --- */
.openingguide-directory .gm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    align-items: start;
}

.openingguide-directory .gm-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border-left: 4px solid #ccc; /* Default Grey */
}

.openingguide-directory .gm-item:hover {
    background: #f7fafc;
    border-color: #4299e1;
    transform: translateY(-2px);
}

.openingguide-directory .highlight-item {
    background: #ebf8ff;
    border: 1px solid #4299e1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1;
}

.openingguide-directory .highlight-item:hover {
    background: #bee3f8;
}

.openingguide-directory .gm-link {
    font-weight: 700;
    color: #2b6cb0;
    text-decoration: none;
    border-bottom: 1px solid #4299e1;
}

.openingguide-directory .gm-link:hover { color: #1a365d; }

.openingguide-directory .gm-name {
    font-weight: 700;
    color: #2d3748;
}

.openingguide-directory .gm-style {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

.openingguide-directory .gm-style strong { color: #e53e3e; }

.openingguide-directory .learn-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 0.8rem;
    color: #4a5568;
}

.openingguide-directory .learn-list li { margin-bottom: 4px; line-height: 1.4; }
.openingguide-directory .learn-list strong { color: #2c5282; }

/* --- IMPORTANT: rename .letter-header to avoid glossary conflicts --- */
.openingguide-directory .gm-letter-header {
    background: #edf2f7;
    padding: 5px 15px;
    border-radius: 4px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2d3748;
    font-size: 1.2rem;
    border-left: 5px solid #2c5282;
}

/* --- NAV BAR --- */
.openingguide-directory .nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.openingguide-directory .nav-bar a {
    background: #fff;
    border: 1px solid #cbd5e0;
    color: #2d3748;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.openingguide-directory .nav-bar a:hover {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
}

.openingguide-directory .nav-bar a.disabled {
    opacity: 0.3;
    pointer-events: none;
    background-color: #e2e8f0;
    color: #a0aec0;
    border-color: #cbd5e0;
    cursor: default;
}

/* --- AUTOMATIC LABELS + BORDER COLOR CODING --- */
.openingguide-directory .gm-item[data-title="IM"] .gm-name::after { content: " (IM)"; font-size: 0.8em; color: #2980b9; vertical-align: middle; }
.openingguide-directory .gm-item[data-title="FM"] .gm-name::after { content: " (FM)"; font-size: 0.8em; color: #27ae60; vertical-align: middle; }
.openingguide-directory .gm-item[data-title="CM"] .gm-name::after { content: " (CM)"; font-size: 0.8em; color: #d35400; vertical-align: middle; }
.openingguide-directory .gm-item[data-title="WGM"] .gm-name::after { content: " (WGM)"; font-size: 0.8em; color: #8e44ad; vertical-align: middle; }

.openingguide-directory .gm-item[data-title="IM"] { border-left-color: #2980b9; }
.openingguide-directory .gm-item[data-title="FM"] { border-left-color: #27ae60; }
.openingguide-directory .gm-item[data-title="CM"] { border-left-color: #d35400; }

/* Women’s titles */
.openingguide-directory .gm-item[data-title="WIM"] { border-left-color: #9C27B0; }
.openingguide-directory .gm-item[data-title="WIM"] .gm-name::after,
.openingguide-directory .gm-item[data-title="WIM"] .gm-link::after {
    content: " (WIM)";
    font-size: 0.8em;
    color: #9C27B0;
    vertical-align: middle;
}

.openingguide-directory .gm-item[data-title="WFM"] { border-left-color: #d687fc; }
.openingguide-directory .gm-item[data-title="WFM"] .gm-name::after,
.openingguide-directory .gm-item[data-title="WFM"] .gm-link::after {
    content: " (WFM)";
    font-size: 0.8em;
    color: #d687fc;
    vertical-align: middle;
}

.openingguide-directory .gm-item[data-title="WCM"] { border-left-color: #F3E5F5; }
.openingguide-directory .gm-item[data-title="WCM"] .gm-name::after,
.openingguide-directory .gm-item[data-title="WCM"] .gm-link::after {
    content: " (WCM)";
    font-size: 0.8em;
    color: #F3E5F5;
    vertical-align: middle;
}
