/* ===================================
   Skill Grid Styles
   =================================== */

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 1400px) {
    .skill-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .skill-grid {
        grid-template-columns: 1fr;
    }
}

.skill-item {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

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

.skill-item:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Skill Icon */
.skill-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.skill-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Skill Info */
.skill-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.skill-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.skill-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.skill-input-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.skill-input {
    width: 80px;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
}

.skill-input:hover {
    border-color: var(--border-hover);
}

.skill-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.skill-input::-webkit-inner-spin-button,
.skill-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.skill-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Inline Disable Skilling Toggle */
.skill-disable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.skill-disable-checkbox { display: none; }

.skill-disable-slider {
    position: relative;
    width: 36px;
    height: 18px;
    background-color: var(--bg-hover);
    border-radius: 9px;
    transition: background-color var(--transition-normal);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.skill-disable-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-normal);
}

.skill-disable-checkbox:checked + .skill-disable-slider {
    background-color: var(--danger-color);
}

.skill-disable-checkbox:checked + .skill-disable-slider::before {
    transform: translateX(18px);
}

.skill-disable-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Skill Input Validation */
.skill-input.invalid {
    border-color: var(--danger-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.skill-input.valid {
    border-color: var(--success-color);
}

/* Skill Restrictions */
.skill-restrictions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.skill-restriction-item {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-normal);
}

.skill-restriction-item:hover {
    border-color: var(--border-hover);
}

.skill-restriction-icon {
    width: 40px;
    height: 40px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-restriction-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.skill-restriction-info {
    flex: 1;
}

.skill-restriction-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-transform: capitalize;
    margin-bottom: var(--spacing-xs);
}

.skill-restriction-toggle {
    display: flex;
    align-items: center;
}

.skill-restriction-toggle input[type="checkbox"] {
    display: none;
}

.skill-restriction-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: var(--bg-hover);
    border-radius: 10px;
    transition: background-color var(--transition-normal);
    cursor: pointer;
}

.skill-restriction-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-normal);
}

.skill-restriction-toggle input[type="checkbox"]:checked + .skill-restriction-slider {
    background-color: var(--danger-color);
}

.skill-restriction-toggle input[type="checkbox"]:checked + .skill-restriction-slider::before {
    transform: translateX(20px);
}

.skill-restriction-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: var(--spacing-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .skill-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-restrictions {
        grid-template-columns: 1fr;
    }
}
