.nav-tab-wrapper {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-tab {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    color: #0073aa;
    border: 1px solid #ddd;
    border-bottom: none;
    background: #f1f1f1;
    cursor: pointer;
    white-space: nowrap;
}

.nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
}

.tab-content {
    display: none;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
}

.tab-content.active {
    display: block;
}

.date-range-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.date-range-filter label {
    margin-right: 10px;
}

.date-range-filter input {
    margin-right: 10px;
    min-width: 150px;
    max-width: 200px;
}

.date-range-filter input[type="text"] {
    min-width: 200px;
}

.date-range-filter button {
    white-space: nowrap;
}

#save-logs-button {
    margin-left: auto;
}

.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.wp-list-table th, 
.wp-list-table td {
    padding: 12px;
    border: 1px solid #ddd;
    word-wrap: break-word;
    min-width: 120px; /* Minimum width for columns */
}

.wp-list-table th {
    background: #f1f1f1;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Make Request Body and Response Body columns wider */
.wp-list-table th:nth-child(4),
.wp-list-table th:nth-child(5),
.wp-list-table td:nth-child(4),
.wp-list-table td:nth-child(5) {
    min-width: 300px;
    max-width: 400px;
}

/* Add horizontal scroll for table container */
.tab-content {
    overflow-x: auto;
    max-width: 100%;
    position: relative;
    padding: 20px;
    border: 1px solid #ddd;
}

/* Format JSON content in cells */
.wp-list-table td:nth-child(4),
.wp-list-table td:nth-child(5) {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 13px;
    background: #f8f9fa;
}

/* Responsive styles */
@media screen and (max-width: 1200px) {
    .wp-list-table th:nth-child(4),
    .wp-list-table th:nth-child(5),
    .wp-list-table td:nth-child(4),
    .wp-list-table td:nth-child(5) {
        min-width: 250px;
    }
}

@media screen and (max-width: 782px) {
    .date-range-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .date-range-filter input[type="date"],
    .date-range-filter input[type="text"] {
        width: 100%;
        max-width: 100%;
        height: 32px;
        min-height: 32px;
        max-height: 32px;
        line-height: 30px;
        padding: 0 8px;
        font-size: 14px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-sizing: border-box;
    }

    /* Calendar icon adjustments */
    .date-range-filter input[type="date"]::-webkit-calendar-picker-indicator {
        margin: 0;
        padding: 0;
        height: 16px;
    }

    .date-range-filter button {
        width: 100%;
        height: 32px;
        min-height: 32px;
        line-height: 30px;
        padding: 0 12px;
    }

    .wp-list-table th, 
    .wp-list-table td {
        padding: 8px;
        font-size: 13px;
    }

    .wp-list-table th:nth-child(4),
    .wp-list-table th:nth-child(5),
    .wp-list-table td:nth-child(4),
    .wp-list-table td:nth-child(5) {
        min-width: 200px;
    }

    .button-primary {
        width: 100%;
        padding: 8px 16px;
        height: 32px;
        min-height: 32px;
        font-size: 14px;
        line-height: 1;
    }
}

/* Enhance table scrolling experience */
.tab-content::-webkit-scrollbar {
    height: 8px;
}

.tab-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading state styles */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
}

.pagination a.active {
    background: #0073aa;
    color: #fff;
}

.pagination a:hover {
    background: #0073aa;
    color: #fff;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

.loader.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.button-icon .dashicons.hidden {
    display: none;
}

.logs-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.reloader {
    font-size: 20px;
    cursor: pointer;
    color: #0073aa;
    margin-left: 10px;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.reloader:hover {
    color: #005f8d;
}

.reloader.spin {
    animation: spin 1s linear infinite;
}

#refresh-logs-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#refresh-logs-button:hover {
    background-color: #005f8d;
}

.date-range-filter input.error-input {
    border-color: #dc3232;
    box-shadow: 0 0 2px rgba(220, 50, 50, 0.8);
}

.date-range-filter input.error-input:focus {
    border-color: #dc3232;
    box-shadow: 0 0 2px rgba(220, 50, 50, 0.8);
}

.date-error-message {
    display: inline-block;
    margin-left: 10px;
    color: #dc3232;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 10px;
    background-color: rgba(220, 50, 50, 0.1);
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .date-range-filter {
        flex-wrap: wrap;
        gap: 15px;
    }

    .date-range-filter > * {
        flex: 1 1 auto;
    }

    .date-range-filter label {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .date-range-filter input {
        flex: 1 1 200px;
        max-width: none;
        margin-right: 0;
    }

    .date-range-filter button {
        flex: 0 1 auto;
    }
}

@media (max-width: 768px) {
    .date-range-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .date-range-filter input,
    .date-range-filter button {
        width: 100%;
        max-width: none;
    }

    .date-range-filter .reloader {
        position: absolute;
        right: 0;
        top: 0;
        margin: 0;
    }

    #save-logs-button {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .nav-tab {
        padding: 6px 12px;
        font-size: 13px;
    }

    .date-range-filter {
        position: relative;
        padding-top: 30px;
    }

    .date-range-filter input {
        padding: 6px;
        font-size: 14px;
    }

    #refresh-logs-button {
        padding: 8px 15px;
        font-size: 13px;
    }

    .reloader {
        font-size: 18px;
    }
}

/* Save button styles */
.button-primary {
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 14px;
    line-height: normal;
    height: auto;
    min-height: 32px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.button-primary:hover {
    background-color: #005f8d;
}
