/* أنماط عامة */
.graphimol-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* نموذج الرسالة */
.graphimol-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-header {
    margin-bottom: 20px;
    text-align: center;
}

.form-header h3 {
    margin: 0 0 10px;
    color: #2c3e50;
    font-size: 24px;
}

.form-header p {
    color: #7f8c8d;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.graphimol-form button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.graphimol-form button:hover {
    background: #2980b9;
}

.graphimol-form button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* لوحة التحكم */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
}

.search-box::after {
    content: '🔍';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#messages-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#messages-table th,
#messages-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

#messages-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
}

#messages-table tr:last-child td {
    border-bottom: none;
}

#messages-table tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* تم تعطيل هذه الأنماط لتجنب التعارض مع أنماط الأزرار المخصصة */
/*
.action-buttons button {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}
*/

/* تم تعطيل هذه الأنماط لتجنب التعارض مع أنماط الأزرار المخصصة */
/*
.view-message {
    background: #3498db;
}

.reply-message {
    background: #2ecc71;
}

.delete-message {
    background: #e74c3c;
}

.restore-message {
    background: #f39c12;
}

.permanent-delete {
    background: #c0392b;
}
*/

/* أزرار الإجراءات */
.graphimol-admin .button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    margin: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.graphimol-admin .button:hover {
    background-color: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.graphimol-admin .button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* تأثيرات الأزرار */
.button-effect {
    position: relative;
    overflow: hidden;
}

.button-effect:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.button-effect:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* أنماط النافذة المنبثقة */
.graphimol-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 80%;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close-button {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.close-modal {
    background-color: #f1f1f1;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: #ddd;
}

.graphimol-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* أنماط الإشعارات */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* أنماط نموذج الرد */
.graphimol-form {
    width: 100%;
}

.form-header {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.form-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.submit-reply {
    background-color: #0073aa;
    color: #fff;
}

.cancel-reply {
    background-color: #f1f1f1;
    color: #333;
}

/* أنماط الجدول الفارغ */
.empty-table {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

/* أنماط عرض الرسالة */
.message-view {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.message-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.message-header h2 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.9em;
}

.message-content {
    line-height: 1.6;
    white-space: pre-wrap;
.actions-column {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

/* أنماط عداد الرسائل */
.message-count-wrapper {
    font-size: 0.7em;
    color: #777;
    font-weight: normal;
    margin-left: 10px;
}

.message-count {
    font-weight: bold;
    color: #0073aa;
}

.graphimol-admin .button:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.graphimol-admin .view-message {
    background-color: #e7f5ff;
    border-color: #2196F3;
}

.graphimol-admin .reply-message {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.graphimol-admin .delete-message {
    background-color: #ffebee;
    border-color: #f44336;
}

.graphimol-admin .restore-message {
    background-color: #fff8e1;
    border-color: #FFC107;
}

.graphimol-admin .permanent-delete {
    background-color: #ffcdd2;
    border-color: #d32f2f;
}

/* النافذة المنبثقة */
#message-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* الإشعارات */
#toast-notification {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* رسائل النجاح والخطأ */
#graphimol-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
}

#graphimol-response.success {
    background: #e7f6e7;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

#graphimol-response.error {
    background: #f6e7e7;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

/* تأثيرات حركية */
.fade-enter {
    opacity: 0;
    transform: translateY(20px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .graphimol-container {
        padding: 10px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
    }

    #messages-table {
        display: block;
        overflow-x: auto;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    #message-modal {
        width: 95%;
        padding: 15px;
    }
 }