/* Container */
#login-logout-settings {
    background: #fff;
    padding: 20px;
    margin: 50px 0 0 30px;
    width: 90%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

#login-logout-settings .divider {
    width:100%;
    height:1px;
    background-color:grey;
    display:inline-block;
    margin:10px 0;
}

#login-logout-settings .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#login-logout-settings .block-section{

}
#login-logout-settings .description{
    display: inline-block;
    font-size: 12px;
}
#login-logout-settings .block:first-child{
    width:10%;
    float:left;
}
#login-logout-settings .block{
    width:80%;
    float:left;
}

#login-logout-settings .block-fields {
    display: flex;
    gap: 10px; /* Optional: adds space between the fields */
}

#login-logout-settings .block-fields .block.form-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
}



#login-logout-settings .flex-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

#login-logout-settings .flex-row label,
#login-logout-settings .flex-row input[type="text"] {
    margin-right: 10px;
}

#login-logout-settings .text-center{
    text-align: center;
}

/* Header */
#login-logout-settings h1 {
    text-align: center;
    color: #444;
}

/* Form */
#login-logout-settings form {
    margin-top: 20px;
}

/* Form Table */
#login-logout-settings .form-table {
    width: 100%;
    border-collapse: collapse;
}

#login-logout-settings .form-table th,
#login-logout-settings .form-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

#login-logout-settings .form-table th {
    text-align: left;
    width: 30%;
}

/* Toggle Switch */
#login-logout-settings .toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

#login-logout-settings .toggle-switch input {
    display: none;
}

#login-logout-settings .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

#login-logout-settings .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

#login-logout-settings input:checked + .slider {
    background-color: #4CAF50;
}

#login-logout-settings input:checked + .slider:before {
    transform: translateX(26px);
}

/* Custom Slug Field */
#login-logout-settings #slug_field {
    display: none;
}

#login-logout-settings .form-fields input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#login-logout-settings #slug_field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Submit Button */
#login-logout-settings .button-primary {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .3s;
}

#login-logout-settings .button-primary:hover {
    background-color: #45a049;
}

.iron-security-timeout-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    border: 1px solid #ddd;
}

.timeout-warning-content {
    text-align: center;
}

.timeout-warning-content p {
    margin-bottom: 15px;
    font-size: 14px;
}

.timeout-warning-content .button {
    margin: 0 5px;
}

/* Security Logs Styles */
.security-logs-container {
    margin: 20px 0;
    max-width: 1400px;
}

.security-logs-card {
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    border: none;
    overflow: hidden;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.logs-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e1e1e;
}

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

/* Summary Cards */
.log-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    padding: 0 20px;
}

.log-summary-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.log-summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.log-summary-card.total {
    border-left: 4px solid #3498db;
}

.log-summary-card.success {
    border-left: 4px solid #2ecc71;
}

.log-summary-card.error {
    border-left: 4px solid #e74c3c;
}

.log-summary-card.warning {
    border-left: 4px solid #f39c12;
}

.card-icon {
    margin-right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
}

.card-icon .dashicons {
    font-size: 24px;
}

.log-summary-card.total .card-icon {
    background-color: rgba(52, 152, 219, 0.1);
}

.log-summary-card.success .card-icon {
    background-color: rgba(46, 204, 113, 0.1);
}

.log-summary-card.error .card-icon {
    background-color: rgba(231, 76, 60, 0.1);
}

.log-summary-card.warning .card-icon {
    background-color: rgba(243, 156, 18, 0.1);
}

.log-summary-card.total .card-icon .dashicons {
    color: #3498db;
}

.log-summary-card.success .card-icon .dashicons {
    color: #2ecc71;
}

.log-summary-card.error .card-icon .dashicons {
    color: #e74c3c;
}

.log-summary-card.warning .card-icon .dashicons {
    color: #f39c12;
}

.card-content {
    flex-grow: 1;
    min-width: 0; /* Prevent overflow */
}

.card-content h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 5px;
    color: #333;
}

/* Filters */
.filters-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.primary-filters {
    margin-bottom: 15px;
}

.filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.filter-row > div {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.advanced-filters {
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.date-filters {
    display: flex;
    gap: 20px;
}

.date-filter {
    flex: 1;
}

.date-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.date-filter input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Table Styles */
.logs-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.logs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.logs-table th,
.logs-table td {
    padding: 10px 5px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.logs-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #444;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 0 0 #eee;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-table tr:last-child td {
    border-bottom: none;
}

.logs-table tr:hover {
    background-color: #f9f9f9;
}

/* Column widths */
.column-date {
    width: 160px;
}

.column-type {
    width: 140px;
}

.column-username {
    width: 120px;
}

.column-ip {
    width: 120px;
}

.column-status {
    width: 100px;
}

.column-message {
    min-width: 200px;
}

.log-type-label {
    display: inline-block;
    font-size: 12px;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #f0f0f0;
    color: #555;
    font-weight: 500;
}

.log-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: capitalize;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.log-status-badge.success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #16a085;
}

.log-status-badge.error {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.log-status-badge.warning {
    background-color: rgba(243, 156, 18, 0.15);
    color: #d35400;
}

.log-status-badge.info {
    background-color: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

/* Loading & Empty States */
.logs-loading,
.no-logs {
    text-align: center;
    padding: 60px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.logs-loading p,
.no-logs p {
    margin: 15px 0;
    color: #666;
    font-size: 15px;
}

.no-logs-icon {
    display: inline-block;
    margin-bottom: 20px;
}

.no-logs-icon .dashicons {
    font-size: 48px;
    color: #bbb;
}

/* Pagination */
.logs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.clear-logs-button {
    color: #fff !important;
    background-color: #d63638 !important;
    border-color: #d63638 !important;
}

.clear-logs-button:hover {
    background-color: #b32d2e !important;
    border-color: #b32d2e !important;
}

.clear-logs-button:focus {
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px #d63638 !important;
}

.delete-logs-by-date-btn {
    color: #d63638 !important;
    border-color: #d63638 !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .log-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .log-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .logs-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        margin-top: 15px;
        width: 100%;
    }
    
    .logs-pagination {
        flex-direction: column-reverse;
        gap: 15px;
    }
    
    .pagination-info {
        margin-bottom: 10px;
    }
    
    .date-filters {
        flex-direction: column;
        gap: 15px;
    }
}

/* Interactive table rows */
.log-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.log-row:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

.log-row.active {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-bottom: none !important;
}

.log-details-row {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: none !important;
}

.log-details-row td {
    padding: 0 !important;
}

.log-extra-data {
    padding: 15px 20px;
    border-top: 1px dashed #ddd;
}

.log-extra-data h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #555;
}

.extra-data-table {
    width: 100%;
    border-collapse: collapse;
}

.extra-data-table th,
.extra-data-table td {
    padding: 8px 10px !important;
    border-bottom: 1px solid #eee !important;
    font-size: 13px;
    text-align: left;
}

.extra-data-table th {
    width: 200px;
    font-weight: 600;
    color: #444;
    text-transform: capitalize;
}

/* Tooltips */
.components-tooltip {
    font-size: 12px !important;
}

/* Improve table appearance */
.logs-table tr td {
    font-size: 13px;
    color: #444;
}

.logs-table tr:nth-child(even):not(.log-details-row) {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Admin Count Status Styles */
.admin-info-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.admin-info-section .admin-count {
    font-size: 14px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.admin-info-section .admin-count.normal {
    background-color: #e7f5e7;
    color: #2c7a2c;
    border: 1px solid #d0e8d0;
}

.admin-info-section .admin-count.caution {
    background-color: #fef9e6;
    color: #8a6d3b;
    border: 1px solid #f9efc7;
}

.admin-info-section .admin-count.warning {
    background-color: #fff8e6;
    color: #a66e0c;
    border: 1px solid #ffecc7;
}

.admin-info-section .admin-count.danger {
    background-color: #feecec;
    color: #a94442;
    border: 1px solid #f9d0d0;
}

.admin-users-list {
    margin-top: 15px;
}

.admin-users-list ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.admin-users-list li {
    font-size: 13px;
    line-height: 1.5;
}

/* Fix for IPv6 address display in logs table */
.logs-table .ip-address-cell {
    max-width: 160px;
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    font-family: monospace;
    font-size: 12px;
}

/* Style for delete logs by date modal */
.delete-logs-modal .components-modal__content {
    padding: 24px;
}

.delete-logs-form .form-row {
    margin-bottom: 16px;
}

.delete-logs-form .form-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
}

.delete-logs-by-date-btn {
    margin-left: 10px;
}


