/*
 * Pipali Styles - Skills Page
 * Includes: skills gallery, skill cards, skill modals
 */

.skills-gallery {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.skills-gallery ::selection {
    background: var(--color-selection-bg);
    color: var(--color-selection-text);
}

.skills-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.skills-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skills-header-left h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.skills-count {
    font-size: 13px;
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.skills-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skills-create-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.skills-create-btn:hover {
    background: var(--color-accent-hover);
}

.skills-reload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text-secondary);
}

.skills-reload-btn:hover:not(:disabled) {
    background: var(--color-bg-muted);
    color: var(--color-text);
}

.skills-reload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.skills-errors {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skills-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    border-radius: var(--radius-md);
    color: var(--color-error-text);
    font-size: 13px;
}

.skills-error svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.skills-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.skills-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Skill Card */
.skill-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.skill-card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.skill-card-hidden {
    opacity: 0.55;
}

.skill-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.skill-toggle-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.skill-toggle-track {
    display: block;
    width: 32px;
    height: 18px;
    border-radius: 9px;
    background: var(--color-bg-muted);
    border: 1px solid var(--color-border);
    position: relative;
    transition: background var(--transition), border-color var(--transition);
}

.skill-toggle-on .skill-toggle-track {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.skill-toggle-thumb {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-text-muted);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform var(--transition), background var(--transition);
}

.skill-toggle-on .skill-toggle-thumb {
    transform: translateX(14px);
    background: var(--color-bg);
}

.skill-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
    line-height: 1.4;
}

.skill-card-description {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skill-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-subtle);
    color: var(--color-text-muted);
}

.skill-location {
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Skills Empty State */
.empty-state.skills-empty {
    text-align: center;
    padding: 48px 24px;
}

.empty-state.skills-empty h2 {
    margin: 16px 0 8px;
}

.empty-state.skills-empty p {
    color: var(--color-text-secondary);
    margin: 0 0 8px;
}

.empty-state.skills-empty .empty-hint {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 16px;
}

.skills-paths {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skills-paths li {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.skills-paths code {
    font-family: monospace;
    background: var(--color-bg-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}
