/* Symbols Library Section */
.html-symbols-library-section {
    margin-top: 2rem;
}

/* Search and Filter Panel */
.html-symbols-search-filter-panel {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.html-symbols-search-filter-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.html-symbols-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.html-symbols-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    z-index: 1;
}

.html-symbols-search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.html-symbols-search-input:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.html-symbols-clear-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.html-symbols-search-input:not(:placeholder-shown) ~ .html-symbols-clear-search {
    opacity: 1;
}

.html-symbols-clear-search:hover {
    color: #dc3545;
}

.html-symbols-category-select {
    min-width: 200px;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.html-symbols-category-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}


/* Symbols Stats */
.html-symbols-stats {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.html-symbols-stats-text strong {
    color: #212529;
    font-weight: 600;
}

/* Symbols Container */
.html-symbols-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .symbols-container,
    .symbols-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .html-symbols-container,
    .symbols-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .html-symbols-search-filter-panel {
        padding: 1rem;
    }
    
    .html-symbols-search-filter-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .html-symbols-category-select {
        min-width: 100%;
    }
    
    .symbol-card {
        padding: 0.625rem;
    }
    
    .symbol-display {
        font-size: 1.75rem;
        min-height: 2rem;
    }
    
    .symbol-name {
        font-size: 0.65rem;
        margin-bottom: 0.4rem;
    }
    
    .code-item {
        font-size: 0.65rem;
    }
    
    .code-label {
        font-size: 0.6rem;
    }
    
    .code-value {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .html-symbols-container,
    .symbols-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .symbol-card {
        padding: 0.5rem;
    }
    
    .symbol-display {
        font-size: 1.5rem;
        min-height: 1.75rem;
    }
    
    .symbol-name {
        font-size: 0.6rem;
        margin-bottom: 0.35rem;
    }
    
    .code-item {
        font-size: 0.6rem;
        gap: 0.35rem;
    }
    
    .code-label {
        font-size: 0.55rem;
    }
    
    .code-value {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
    }
}

/* Category Section */
.category-section {
    grid-column: 1 / -1;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.category-section:first-child {
    margin-top: 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.category-count {
    background: #007bff;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Symbol Card */
.symbol-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.symbol-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.symbol-display-wrapper {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.symbol-display {
    font-size: 2rem;
    line-height: 1;
    color: #212529;
    font-weight: 400;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-info {
    width: 100%;
}

.symbol-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    min-height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-codes-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.code-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.7rem;
}

.code-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.code-value {
    font-size: 0.95rem;
    color: #007bff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    word-break: break-all;
    flex: 1;
    text-align: right;
    min-width: 0;
}

.code-value.selectable {
    user-select: text;
    cursor: text;
}


/* No Results */
.html-symbols-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 2rem;
}

.html-symbols-no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.html-symbols-no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.html-symbols-no-results p {
    color: #6c757d;
    font-size: 1rem;
}

/* Copy Toast */
.html-symbols-copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #28a745;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.html-symbols-copy-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.html-symbols-toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.html-symbols-toast-icon {
    flex-shrink: 0;
}

.html-symbols-toast-message {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Hidden category sections */
.category-section.hidden {
    display: none;
}

/* Loading state */
.html-symbols-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-filter-panel {
        padding: 1rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-select {
        min-width: 100%;
    }
    
    .copy-format-toggle {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .symbol-display {
        font-size: 2rem;
    }
    
    .html-symbols-copy-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.25rem;
    }
}

/* Accessibility */
.symbol-card:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.html-symbols-search-input:focus,
.html-symbols-category-select:focus {
    outline: 3px solid rgba(0, 123, 255, 0.25);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .html-symbols-search-filter-panel,
    .html-symbols-stats,
    .html-symbols-copy-toast {
        display: none;
    }
    
    .symbol-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

