/**
 * User Events Styles
 * @package DiveWP
 */

/* Header Actions - Specific to User Events */
.divewp-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.divewp-cleanup-status {
    color: #50575e;
    font-size: 13px;
}

.cleanup-info {
    display: inline-block;
    line-height: 30px;
}

.divewp-actions {
    display: flex;
    gap: 10px;
}

#divewp-refresh-logs {
    margin-right: 10px;
}

/* Delete Logs Button, Refresh Logs Button - Specific to User Events */
#divewp-delete-all-logs {
    background-color: #D92D20;
    color: #fff;
    border-color: #D92D20;
    border-radius: 6px;
    padding: 4px 12px 4px 8px;
    height: auto;
    min-height: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

#divewp-delete-all-logs::before {
    content: "\f182";
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

#divewp-refresh-logs,
#divewp-load-more {
    background-color: #4299e1;
    color: #fff;
    border-color: #4299e1;
    border-radius: 6px;
    padding: 4px 12px 4px 8px;
    height: auto;
    min-height: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

#divewp-refresh-logs::before {
    content: "\f463";
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

#divewp-delete-all-logs:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

#divewp-refresh-logs:hover {
    background-color: #3182ce;
    border-color: #3182ce;
}

#divewp-delete-all-logs:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* User Events Table Specific Styles */
.divewp-user-events-table {
    table-layout: fixed;
    width: 100%;
}

/* Column width adjustments - Specific to User Events Table */
.divewp-user-events-table th:nth-child(1),
.divewp-user-events-table td:nth-child(1) {
    width: 12%;
    /* Administrator column */
}

.divewp-user-events-table th:nth-child(2),
.divewp-user-events-table td:nth-child(2) {
    width: 12%;
    /* Activity Area column */
}

.divewp-user-events-table th:nth-child(3),
.divewp-user-events-table td:nth-child(3) {
    width: 12%;
    /* Action column */
}

.divewp-user-events-table th:nth-child(4),
.divewp-user-events-table td:nth-child(4) {
    width: 52%;
    /* Details column - takes most space */
    word-wrap: break-word;
    white-space: normal;
}

.divewp-user-events-table th:nth-child(5),
.divewp-user-events-table td:nth-child(5) {
    width: 12%;
    /* Date & Time column */
}

.divewp-table-container .divewp-table .status-pill {
    font-size: 12px;
    padding: 4px 12px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    height: 24px;
}

/* Pagination - Specific to User Events */
.divewp-pagination {
    margin-top: 20px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.divewp-pagination-info {
    color: #50575e;
    font-size: 13px;
}

/* Load More button - disabled state */


.divewp-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#divewp-load-more::before {
    content: "\f347";
    /* dashicons-plus */
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* Add these rules to existing user-events.css */
#divewp-refresh-email-logs,
#divewp-delete-all-email-logs,
#divewp-send-test-email {
    background-color: #4299e1;
    color: #fff;
    border-color: #4299e1;
    border-radius: 6px;
    padding: 4px 12px 4px 8px;
    height: auto;
    min-height: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

#divewp-delete-all-email-logs {
    background-color: #D92D20;
    border-color: #D92D20;
}

#divewp-send-test-email {
    background-color: #48BB78;
    border-color: #48BB78;
}

#divewp-refresh-email-logs::before {
    content: "\f463";
}

#divewp-delete-all-email-logs::before {
    content: "\f182";
}

#divewp-send-test-email::before {
    content: "\f465";
}

#divewp-refresh-email-logs::before,
#divewp-delete-all-email-logs::before,
#divewp-send-test-email::before {
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

#divewp-delete-all-email-logs:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Event details modal (centered, matches Cron Jobs / Plugins Management) */
.divewp-event-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s;
}

.divewp-event-drawer.open {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s;
}

.divewp-event-drawer__overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
}

.divewp-event-drawer__panel {
    position: relative;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-width: 600px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: divewp-event-modal-fadein 0.3s ease-out;
}

@keyframes divewp-event-modal-fadein {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.divewp-event-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.divewp-event-drawer__title {
    margin: 0;
    font-family: 'Literata', serif;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.divewp-event-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    cursor: pointer;
    color: #646970;
    transition: all 0.2s;
}

.divewp-event-drawer__close:hover {
    background: #f0f0f1;
    color: #d63638;
    border-color: #d63638;
}

.divewp-event-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Event type / action header row inside modal */
.divewp-event-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}

.divewp-event-type-row__label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.divewp-event-row--clickable {
    cursor: pointer;
}

.divewp-event-row--clickable:hover {
    background: #f6f7f7;
}

#divewp-refresh-email-logs:hover {
    background-color: #3182ce;
    border-color: #3182ce;
}

#divewp-send-test-email:hover {
    background-color: #38a169;
    border-color: #38a169;
}