/* assets/css/pcm-styles.css */

/* طرح کلی و ظاهر کلی */
.pcm-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pcm-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 28px;
    text-align: center;
    font-family: yekan;
}

/* دکمه‌ها - تم رنگی نارنجی و خاکستری */
#pcm-add-category-btn,
.pcm-form-actions .button {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 100px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 24px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: iranyekanwebregular;
}

#pcm-add-category-btn {
    background-color: #FA5800;
    color: white;
    margin-bottom: 20px;
}

#pcm-add-category-btn:hover {
    background-color: #e04e00;
    transform: translateY(-2px);
}

.button-danger {
    background-color: #757575 !important;
    color: white !important;
    width: 80px;
}

.button-danger:hover {
    background-color: #616161 !important;
}

.pcm-edit-btn {
    background-color: #FA5800;
    color: white;
    margin-right: 8px;
    width: 80px;
}

.pcm-edit-btn:hover {
    background-color: #e04e00;
}

/* جدول دسته‌بندی‌ها */
.pcm-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.pcm-categories-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    font-family: iranyekanwebregular;
    margin-top: 50px;
}

.pcm-categories-table th {
    background-color: #424242;
    color: white;
    padding: 12px 15px;
    text-align: right;
    font-weight: 500;
    font-family: iranyekanwebregular;
    font-size: 15px;
}

.pcm-categories-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.pcm-categories-table tr:hover {
    background-color: #f5f5f5;
}

.pcm-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* مودال */
.pcm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pcm-modal-content {
    background: white;
    width: 500px;
    max-width: 95%;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pcm-close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #757575;
    transition: color 0.2s;
}

.pcm-close-modal:hover {
    color: #424242;
}

#pcm-modal-title {
    color: #424242;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

/* فرم */
.pcm-form-group {
    margin-bottom: 20px;
}

.pcm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #FA5800;
}

.pcm-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.pcm-form-control:focus {
    outline: none;
    border-color: #FA5800;
    box-shadow: 0 0 0 3px rgba(250, 88, 0, 0.1);
}

textarea.pcm-form-control {
    min-height: 100px;
    resize: vertical;
}

select.pcm-form-control {
    height: 42px;
}

/* پیش‌نمایش تصویر */
.pcm-thumbnail-preview {
    margin-top: 10px;
    width: 120px;
    height: 120px;
    border: 2px dashed #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pcm-thumbnail-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

#pcm-upload-image-btn {
    background-color: #f5f5f5;
    color: #424242;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

#pcm-upload-image-btn:hover {
    background-color: #eeeeee;
}

/* دکمه‌های فرم */
.pcm-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.pcm-form-actions .button-primary {
    background-color: #FA5800;
    color: white;
}

.pcm-form-actions .button-primary:hover {
    background-color: #e04e00;
}

.pcm-form-actions .button {
    background-color: #757575;
    color: white;
}

.pcm-form-actions .button:hover {
    background-color: #616161;
}

/* حالت پاسخگو */
@media (max-width: 768px) {
    .pcm-categories-table td, 
    .pcm-categories-table th {
        padding: 8px 10px;
    }
    
    .pcm-categories-table td:nth-child(4) {
        display: none;
    }
    
    .pcm-modal-content {
        width: 90%;
        padding: 20px 15px;
    }
    
    .pcm-edit-btn,
    .button-danger {
        width: 70px;
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pcm-categories-table tr {
    animation: fadeIn 0.3s ease;
}