﻿/*ManageCategories.razor*/
/*_____________________________________________________________________*/

/* التنسيق الأساسي للصفحة */
.admin-container {
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: 'Cairo', sans-serif;
}

/* رأس الصفحة */
.admin-header {
    background: linear-gradient(45deg, #2c3e50, #3498db);
    margin: -2rem -2rem 2rem -2rem;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* أزرار التحكم */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.edit-button, .delete-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 80px;
}

.edit-button {
    background: #3498db;
    color: white;
}

.delete-button {
    background: #e74c3c;
    color: white;
}

.edit-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.delete-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.add-button {
    padding: 0.8rem 1.5rem;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .add-button:hover {
        background: #27ae60;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    }

/* نموذج التصنيف */
.category-form-container {
    margin: 2rem 0;
}

.category-form {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    animation: formAppear 0.5s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

    .form-input:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
        outline: none;
    }

/* جدول التصنيفات */
.categories-table {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

    .categories-table :deep(table) {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 8px;
    }

    .categories-table :deep(tr) {
        transition: all 0.3s ease;
    }

    .categories-table :deep(tr:hover) {
        transform: translateX(-5px);
        background: #f8f9fa;
    }

    .categories-table :deep(th) {
        padding: 1rem;
        color: #2c3e50;
        font-weight: 600;
        text-align: right;
    }

    .categories-table :deep(td) {
        padding: 1rem;
        border: none;
    }

/* مفتاح التبديل */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .toggle-switch label {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, #bdc3c7, #95a5a6);
        transition: .4s;
        border-radius: 34px;
    }

        .toggle-switch label:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

    .toggle-switch input:checked + label {
        background: linear-gradient(45deg, #2ecc71, #27ae60);
    }

        .toggle-switch input:checked + label:before {
            transform: translateX(30px);
        }

/* التحريكات */
@keyframes formAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* التجاوب */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-button {
        width: 100%;
    }
}
