/**
 * Styles for the Principal Dashboard "Doubts" Tab
 */

/* --- Filter Bar Styles --- */
.iw-doubts-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.iw-doubts-filter-bar form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.iw-doubts-filter-bar select,
.iw-doubts-filter-bar button {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    background-color: #fff;
}

.iw-doubts-filter-bar button {
    background-color: var(--color-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    border-color: var(--color-primary);
}

.iw-doubts-count {
    font-weight: 600;
    color: var(--color-text-light);
}

/* --- Main Data Table Styles --- */
.iw-doubts-table-wrapper {
    overflow-x: auto;
}

.iw-data-table {
    width: 100%;
    border-collapse: collapse;
}

.iw-data-table th,
.iw-data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.iw-data-table th {
    background-color: #f8f9fa;
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 14px;
    text-transform: uppercase;
}

.iw-data-table tbody tr:hover {
    background-color: #fcfcfc;
}

.iw-student-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.iw-student-info img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.iw-student-name {
    font-weight: 600;
}

.iw-status-badge, .iw-priority-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    text-transform: capitalize;
}

.status-pending { background-color: var(--color-tertiary); color: var(--color-primary-dark); }
.status-answered { background-color: var(--color-quaternary); }
.status-closed { background-color: var(--color-text-light); }
.status-declined { background-color: var(--color-secondary); }

.iw-action-button {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* --- No Data State --- */
.iw-no-data-content {
    text-align: center;
    padding: 40px;
    color: var(--color-text-light);
}

/* --- Modal & Chat Styles --- */
.iw-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.iw-doubt-chat-modal { max-width: 700px; width: 100%; background-color: #fff; border-radius: var(--border-radius); box-shadow: var(--shadow-lg); max-height: 90vh; display: flex; flex-direction: column; }
.iw-modal-content .iw-modal-title { padding: 20px; margin: 0; font-size: 22px; border-bottom: 1px solid #eee; }
.iw-modal-close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--color-text-light); z-index: 10;}
.iw-chat-history { padding: 20px; overflow-y: auto; flex-grow: 1; display: flex; flex-direction: column; gap: 15px; }
.iw-chat-message { max-width: 80%; }
.iw-message-sender { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--color-text-light); }
.iw-message-bubble { padding: 12px 15px; border-radius: 12px; line-height: 1.6; word-wrap: break-word; }
.iw-chat-message.is-student { align-self: flex-start; }
.iw-chat-message.is-student .iw-message-bubble { background-color: #f1f1f1; border-top-left-radius: 0; }
.iw-chat-message:not(.is-student) { align-self: flex-end; text-align: right; }
.iw-chat-message:not(.is-student) .iw-message-bubble { background-color: var(--color-primary-light); color: #fff; border-top-right-radius: 0; }
.iw-message-bubble.is-private-note { background: #fffbe6; border: 1px solid #ffeeba; color: #856404; }
.iw-chat-reply-area { padding: 20px; border-top: 1px solid #eee; background-color: #f8f9fa; }
.iw-chat-reply-form textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 15px; min-height: 80px; }
.iw-chat-actions { display: flex; justify-content: space-between; align-items: center; }
.iw-chat-actions .iw-private-note-toggle { display: flex; align-items: center; gap: 8px; }
.iw-chat-actions button { padding: 10px 20px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; }

