/* public/css/fuzone-dr-public.css (النسخة النهائية الكاملة مع التحسينات) */

/* General Styles */
.fuzone-dr-wrapper, .fdr-committee-wrapper {
    direction: rtl;
    font-family: "Cairo", sans-serif;
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.fdr-separator { border: 0; border-top: 1px solid #eee; margin: 25px 0; }
.fdr-welcome-message { background-color: #e7f3fe; border-left: 5px solid #2196F3; padding: 10px 20px; margin-bottom: 20px; }
.fdr-back-link { display: inline-block; margin-bottom: 20px; color: #0073aa; text-decoration: none; }
.fdr-back-link:hover { text-decoration: underline; }

/* Form Styles */
.fdr-form-row { margin-bottom: 15px; }
.fdr-form-row label { display: block; font-weight: bold; margin-bottom: 5px; }
.fdr-form-row input[type="text"], .fdr-form-row input[type="email"], .fdr-form-row textarea, .fdr-form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.fdr-form-row.fdr-checkbox-row { display: flex; align-items: center; }
.fdr-form-row.fdr-checkbox-row input { width: auto; margin-left: 10px; }
.fdr-button {
    background-color: #0085ba;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.fdr-button:hover { background-color: #0073aa; }

/* Notice/Alert Styles */
.fdr-notice { padding: 15px; margin-bottom: 20px; border-radius: 4px; border-right: 5px solid; }
.fdr-notice-error { background-color: #fbeaea; color: #a94442; border-color: #d9534f; }
.fdr-notice-success { background-color: #dff0d8; color: #3c763d; border-color: #5cb85c; }

/* Table Styles */
.fdr-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.fdr-table th, .fdr-table td { padding: 12px; border: 1px solid #ddd; text-align: right; }
.fdr-table thead { background-color: #f2f2f2; }
.fdr-table tr:nth-child(even) { background-color: #f9f9f9; }
.fdr-table tr:hover { background-color: #f1f1f1; }

/* Status & Priority Labels */
.fdr-status, .fdr-priority { padding: 3px 8px; border-radius: 12px; color: white; font-size: 12px; font-weight: bold; }
.fdr-status.status-new { background-color: #3498db; }
.fdr-status.status-in-progress { background-color: #f1c40f; }
.fdr-status.status-awaiting-reply { background-color: #e67e22; }
.fdr-status.status-closed { background-color: #95a5a6; }
.fdr-priority.priority-normal { background-color: #2ecc71; }
.fdr-priority.priority-medium { background-color: #f39c12; }
.fdr-priority.priority-high { background-color: #e74c3c; }

/* Single Dispute View Grid */
.fdr-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.fdr-main-content { flex: 3; min-width: 300px; }
.fdr-sidebar { flex: 1; min-width: 250px; }
.fdr-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; margin-bottom: 20px; }
.fdr-card-header { padding: 10px 15px; background: #f7f7f7; border-bottom: 1px solid #e5e5e5; display: flex; justify-content: space-between; align-items: center; }
.fdr-card-header h3 { margin: 0; font-size: 16px; }
.fdr-card-body { padding: 15px; }
.fdr-description { line-height: 1.7; }

/* Small Button for Tables */
.fdr-button.fdr-button-small {
    padding: 5px 10px;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

/* Chat Log Styles (WhatsApp-like) */
.fdr-chat-log {
    background-color: #e5ddd5;
    padding: 15px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.fdr-chat-bubble {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 10px;
    /* ====>  التصحيح الثالث: زيادة المسافة بين الرسائل  <==== */
    margin-bottom: 15px; 
    position: relative;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}
.fdr-chat-bubble.user-reply { background-color: #dcf8c6; align-self: flex-end; text-align: right; }
.fdr-chat-bubble.committee-reply { background-color: #ffffff; align-self: flex-start; text-align: right; }
.fdr-chat-bubble.private { background-color: #fff9c4; border: 1px dashed #fbc02d; }
.fdr-chat-author { font-weight: bold; font-size: 13px; margin-bottom: 4px; color: #075e54; }
.fdr-chat-bubble.user-reply .fdr-chat-author { color: #128c7e; }
.fdr-chat-content { font-size: 15px; line-height: 1.5; color: #333; white-space: pre-wrap; }
.fdr-chat-timestamp { font-size: 11px; color: #999; margin-top: 5px; text-align: left; }
.fdr-no-replies { text-align: center; color: #888; padding: 20px; }
.fdr-private-note-indicator { background-color: #fbc02d; color: #5c3d03; font-size: 10px; padding: 2px 6px; border-radius: 8px; font-weight: bold; margin-right: 5px; }

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .fdr-table thead { display: none; }
    .fdr-table, .fdr-table tbody, .fdr-table tr, .fdr-table td { display: block; width: 100%; }
    .fdr-table tr { margin-bottom: 15px; border-bottom: 2px solid #ddd; padding-bottom: 10px; }
    .fdr-table td { text-align: left; padding-left: 50%; position: relative; border: none; }
    .fdr-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: right;
        font-weight: bold;
    }
    .fdr-table td[data-label="إجراء"] {
        text-align: center;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* ====>  التصحيح الثاني: تكبير زر التفاصيل في الموبايل  <==== */
    .fdr-table .fdr-button.fdr-button-small {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        font-size: 14px;
    }
}
