@use "./constants" as *;

@use "./pages/log-viewer";
@use "./pages/alerts";
@use "./pages/settings";
@use "./pages/cleanup";

@use "./components/scroll-to-top";
@use "./components/plan-badge";
@use "./components/next-schedule-info";

@use "./components/log-info-popover";
@use "./components/review-banner";
@use "./components/quick-features-modal";

#wpbody-content {
    background-color: $body-color;
    font-size: 14px;
    min-height: 100vh;

    .pro-badge {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        font-size: 9px;
        padding: 1px 4px;
        border-radius: 3px;
        font-weight: 600;
        letter-spacing: 0.3px;
        text-transform: uppercase;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        position: absolute;
        text-decoration: none;
        z-index: 2; // Ensure it stays above the overlay
        &:hover {
            transform: scale(1.05);
            transition: transform 0.2s ease;
        }
    }

    .freemius-checkout-trigger {
        cursor: pointer;

        &:hover {
            opacity: 0.9;
        }
    }

    #dbg_lv_log-table_wrapper {
        padding-left: 13px;
        padding-right: 13px;

        > div:first-child {
            background-color: $main-background-table-color;
            margin-left: 0px;
            margin-right: 5px;
            padding-top: 10px;
            padding-bottom: 10px;
            border-radius: 5px;
            box-shadow: $block-box-shadow;
        }

        .dt-layout-table {
            background-color: $main-background-table-color;
            padding: 0 0 25px 0;
            margin: 0 -25px;
            position: relative;
            top: 0.5rem;
        }
    }

    .dt-search {
        width: 0;
        height: 0;

        input[type="search"] {
            width: 0;
            height: 0;
            border: none;
            background: transparent;
        }
    }

    .buttons-colvis {
        color: #333;
        border-color: $border-color;
        font-size: 14px;
        height: 30px;
        background: #fff;
        margin-left: 5px;
        padding-top: 4px;
        border-radius: 5px;
        background-color: $block-bg-color;
    }

    .dt-length {
        display: flex;
        align-items: center;
        height: 30px;
        gap: 5px;

        select {
            border-color: $border-color;
            border-radius: 5px;
            background-color: $block-bg-color;
            margin-right: 0;
        }
    }

    .time-filter {
        display: flex;
        margin-left: 1.5rem;
        gap: 5px;
        align-items: center;

        .datetime-range-buttons {
            height: 30px;
            .btn {
                min-width: 40px;
            }

            .btn:not(.active) {
                background-color: $block-bg-color;
                border: none;
                color: $main-font-color;

                &:hover {
                    background-color: var(--bs-btn-active-bg);
                    color: $main-background-table-color;
                }
            }

            .custom-range-btn {
                position: relative;
                border-radius: 0 5px 5px 0;
                height: 30px;

                &.pro-disabled {
                    cursor: not-allowed;
                    pointer-events: none;
                }
            }
            .pro-badge {
                top: -8px;
                left: 55px;
            }
        }
    }

    .advanced-filter {
        .btn {
            background-color: $block-bg-color;

            &:hover {
                background-color: var(--bs-btn-active-bg);

                .filter-text {
                    color: $main-background-table-color;
                }
            }
        }

        .filter-text {
            color: $main-font-color;
            transition: color 0.2s ease;
        }

        .filter-counter {
            display: none;
        }
    }

    .header-left {
        .header-icons {
            display: flex;
            gap: 4px;

            .tab-button {
                display: flex;
                align-items: center;
                gap: 6px;
                padding: 6px 22px 6px 10px;
                background-color: rgb(255 255 255 / 14%);
                color: #fff;
                border: none;
                border-radius: 5px 5px 0 0;
                cursor: pointer;
                font-weight: 400;
                transition: all 0.2s ease;
                font-size: 14px;
                margin-right: 4px;
                padding-left: 12px;

                i {
                    font-size: 13px;
                    margin-right: 4px;
                }

                &:hover {
                    background: #f9f9ff;
                    color: #444;
                }

                &.active {
                    background: #f9f9ff;
                    border-bottom-color: #f9f9f9;
                    color: #444;
                    font-weight: 500;
                }
            }
        }
    }

    .tab-pane {
        display: none !important;
    }

    .tab-pane.show {
        display: block !important;
    }

    .tab-content .tab-pane.fade {
        opacity: 1; // Override the fade effect
        transition: none;
    }

    .tab-container {
        border-bottom: 1px solid #ccc;
        margin-bottom: 15px;
    }
}

#wpcontent,
#wpfooter {
    margin-left: 135px;
    padding-left: 25px;
}

// Custom date range dropdown styles
.custom-date-range-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: $block-box-shadow;
    padding: 15px;
    width: 300px;
    margin-top: 2px;

    .date-range-content {
        font-size: 14px;
        .date-input-group {
            margin-bottom: 10px;

            .form-label {
                display: block;
                font-weight: 500;
                margin-bottom: 3px;
                color: #333;
            }

            .form-control {
                width: 100%;
                padding: 4px 8px;
                border: 1px solid #ddd;
                border-radius: 3px;
            }
        }

        .date-actions {
            display: flex;
            gap: 8px;
            margin-top: 15px;
        }
    }
}

// Ensure the time-filter container has relative positioning for the dropdown
.time-filter {
    position: relative;
}
