/* Main Categories CSS */

/* General Layout */
.main-categories-container {
    padding: 1.5rem;
}

/* Add Button */
.btn-add-category {
    background: linear-gradient(135deg, #06adeb, #00d2ff);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(6, 173, 235, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(6, 173, 235, 0.3);
    color: white;
}

.btn-add-category:active {
    transform: translateY(0);
}

/* Smart Bars (Category Rows) */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.category-card:hover {
    transform: translateX(5px);
    border-left: 4px solid #06adeb; /* Accent on hover */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

[dir="rtl"] .category-card:hover {
    transform: translateX(-5px);
    border-left: none;
    border-right: 4px solid #06adeb;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-action:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-action.edit:hover {
    background: rgba(6, 173, 235, 0.1);
    color: #06adeb;
}

.btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Modal Styling */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: #1e293b;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
}

.form-control:focus {
    border-color: #06adeb;
    box-shadow: 0 0 0 4px rgba(6, 173, 235, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .main-categories-container {
        padding: 1rem;
    }

    .category-card {
        padding: 1rem;
    }
    
    .btn-action {
        width: 40px; /* Larger touch target */
        height: 40px;
    }
}

/* Dark Mode Support */
body.dark-mode .category-card {
    background: #1e293b;
    border-color: rgba(255,255,255,0.05);
}

body.dark-mode .category-name {
    color: #f1f5f9;
}

body.dark-mode .btn-action {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .btn-action:hover {
    background: #475569;
    color: #f1f5f9;
}

body.dark-mode .modal-content {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: rgba(255,255,255,0.05);
}

body.dark-mode .modal-title {
    color: #f1f5f9;
}

body.dark-mode .form-control {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .form-control:focus {
    border-color: #06adeb;
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
