/**
 * AEI Songs - Frontend Styles
 */

.aei-songs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    color: #e8e0d5;
    font-family: 'JetBrains Mono', monospace;
}

/* Header */
.aei-songs-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(196, 169, 98, 0.2);
}

.aei-songs-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #C4A962;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Search */
.aei-songs-search-wrap {
    position: relative;
    flex: 1 1 10px;
    max-width: 450px;
}

.aei-songs-search {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    font-size: 1rem;
    background: #1a1a1a;
    border: 1px solid rgba(196, 169, 98, 0.3);
    border-radius: 4px;
    color: #e8e0d5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.aei-songs-search::placeholder {
    color: rgba(232, 224, 213, 0.4);
}

.aei-songs-search:focus {
    border-color: #C4A962;
    box-shadow: 0 0 0 2px rgba(196, 169, 98, 0.15);
}

.aei-songs-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(232, 224, 213, 0.6);
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.3s ease, background 0.3s ease;
}

.aei-songs-clear-btn:hover {
    color: #e8e0d5;
    background: rgba(196, 169, 98, 0.2);
    transform: translateY(-50%);
}

/* Table */
.aei-songs-table-wrap {
    background: #111111;
    border: 1px solid rgba(196, 169, 98, 0.15);
    border-radius: 6px;
    overflow: hidden;
}

.aei-songs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.aei-songs-table thead th {
    background: #1a1a1a;
    padding: 0.5rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #C4A962;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(196, 169, 98, 0.2);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.aei-songs-table thead th:hover {
    background: #222222;
}

.aei-songs-table thead th.sortable {
    position: relative;
    padding-right: 2rem;
}

.sort-indicator {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.aei-songs-table thead th.asc .sort-indicator {
    border-bottom: 5px solid #C4A962;
    opacity: 1;
}

.aei-songs-table thead th.desc .sort-indicator {
    border-top: 5px solid #C4A962;
    opacity: 1;
}

.aei-songs-table tbody tr {
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.aei-songs-table tbody tr:last-child {
    border-bottom: none;
}

.aei-songs-table tbody tr:hover {
    background: rgba(196, 169, 98, 0.06);
}

.aei-songs-table tbody td {
    padding: 0.5rem 1rem;
    color: #e8e0d5;
}

/* Empty state */
.aei-songs-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(232, 224, 213, 0.5);
}

/* Loading */
.aei-songs-loading td {
    text-align: center;
    padding: 3rem;
}

.aei-songs-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 3px solid rgba(196, 169, 98, 0.2);
    border-top-color: #C4A962;
    border-radius: 50%;
    animation: aeiSongsSpin 0.8s linear infinite;
}

@keyframes aeiSongsSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.aei-songs-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.aei-songs-count {
    font-size: 0.9rem;
    color: rgba(232, 224, 213, 0.6);
}

/* Pagination */
.aei-songs-pagination {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.aei-songs-pagination button {
    background: #1a1a1a;
    border: 1px solid rgba(196, 169, 98, 0.2);
    color: #e8e0d5;
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    min-width: 38px;
}

.aei-songs-pagination button:hover {
    background: #C4A962;
    border-color: #C4A962;
    color: #0a0a0a;
}

.aei-songs-pagination button.active {
    background: #C4A962;
    border-color: #C4A962;
    color: #0a0a0a;
    font-weight: 600;
}

.aei-songs-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .aei-songs-container {
        padding: 0.75rem 0.5rem;
    }

    .aei-songs-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .aei-songs-search-wrap {
        max-width: 100%;
    }

    .aei-songs-table thead th,
    .aei-songs-table tbody td {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }

    .aei-songs-footer {
        flex-direction: column;
        align-items: center;
    }

    .aei-songs-pagination {
        gap: 0.2rem;
    }

    .aei-songs-pagination button {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
        min-width: 30px;
    }
}