/* Компоненты для builds.html и других страниц */

/* Переключатель разделов */
.builds-switcher {
    background: var(--white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-border);
}

.switcher-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--gray-light);
    padding: 0.25rem;
    border-radius: var(--radius);
    max-width: 400px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    border-radius: calc(var(--radius) - 2px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    color: var(--primary-purple);
}

/* Фильтры */
.filters {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--gray-dark);
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-dark);
    font-size: 0.9rem;
    min-width: 150px;
}

.filter-search {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    min-width: 250px;
}

/* Контейнер билдов */
.builds-container {
    min-height: 400px;
}

/* Карточка билда */
.build-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.build-card:hover {
    border-color: var(--primary-purple);
    box-shadow: var(--shadow);
}

.build-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-border);
}

.build-category {
    font-weight: 600;
    color: var(--primary-purple);
    font-size: 0.9rem;
}

.build-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.build-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

.build-equipment {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.equipment-item {
    font-size: 0.9rem;
    color: #64748b;
}

.equipment-item strong {
    color: var(--gray-dark);
}

.build-card-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Информация о пароле */
.password-info {
    background: linear-gradient(135deg, var(--purple-light), var(--primary-purple));
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.password-info i {
    font-size: 1.25rem;
}

/* Стили для страницы добавления билда */
.form-section {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-dark);
}

.form-label.required::after {
    content: " *";
    color: #ef4444;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: var(--radius);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.password-field {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-border);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-border);
}

/* Алерты */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: none;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Детальная страница билда */
.build-detail {
    max-width: 900px;
    margin: 0 auto;
}

.detail-header {
    background: linear-gradient(135deg, var(--purple-light), var(--primary-purple));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius) var(--radius) 0 0;
}

.detail-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.detail-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
}

.equipment-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.equipment-category {
    background: var(--gray-light);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.equipment-category h3 {
    margin-bottom: 1rem;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.equipment-item-detail {
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary-purple);
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-border);
}

/* Адаптивность для компонентов */
@media (max-width: 768px) {
    .switcher-tabs {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-search {
        min-width: 100%;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions,
    .detail-actions {
        flex-direction: column;
    }
    
    .build-card-actions {
        flex-direction: column;
    }
}
/* Добавляем в конец components.css */

/* Тёмная тема для компонентов */
body.dark-theme .builds-switcher {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-theme .switcher-tabs {
    background: #334155;
}

body.dark-theme .tab-btn.active {
    background: #475569;
    color: var(--purple-light);
}

body.dark-theme .filter-select,
body.dark-theme .filter-search {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-theme .filter-group label {
    color: #cbd5e1;
}

body.dark-theme .build-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-theme .build-card-header {
    border-bottom-color: #334155;
}

body.dark-theme .build-title {
    color: #f1f5f9;
}

body.dark-theme .equipment-item {
    color: #94a3b8;
}

body.dark-theme .equipment-item strong {
    color: #e2e8f0;
}

body.dark-theme .form-card {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-theme .form-label {
    color: #cbd5e1;
}

body.dark-theme .form-input,
body.dark-theme .form-textarea,
body.dark-theme .form-select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-theme .checkbox-group {
    background: #334155;
}

body.dark-theme .equipment-category {
    background: #334155;
    color: #e2e8f0;
}

body.dark-theme .equipment-category h3 {
    color: var(--purple-light);
}

body.dark-theme .equipment-item-detail {
    background: #1e293b;
    color: #e2e8f0;
}

/* Переключатель темы */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
    cursor: pointer;
}

.theme-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.theme-slider:before {
    position: absolute;
    content: "☀️";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 2px;
}

.theme-toggle input:checked + .theme-slider {
    background-color: var(--primary-purple);
}

.theme-toggle input:checked + .theme-slider:before {
    content: "🌙";
    transform: translateX(24px);
}

.theme-label {
    font-size: 0.9rem;
    color: var(--gray-dark);
    font-weight: 500;
}

body.dark-theme .theme-label {
    color: #cbd5e1;
}

/* Адаптивность для переключателя */
@media (max-width: 768px) {
    .theme-switcher {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
    }
}
/* Стили для кнопки удаления */
.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Анимация удаления */
.build-card {
    transition: all 0.3s ease;
}

.build-card.deleting {
    opacity: 0.5;
    transform: scale(0.95);
}
