﻿:root {
    --wt-border: 1px solid var(--bs-body-color);
}

.wt-widget {
    position: fixed !important;
    bottom: 0;
    z-index: 1050;
    width: 500px;
    color: #f4f4f5;
    font-family: inherit;
    box-sizing: border-box;
    max-width: 1000px;
    padding: 0 1.5rem;
    right: calc((100vw - 1000px) / 2);
}

    .wt-widget *,
    .wt-widget *::before,
    .wt-widget *::after {
        box-sizing: border-box;
    }

.wt-handle {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px;
    border-bottom: var(--wt-border);
}

.wt-handle-btn,
.wt-handle-btn :hover,
.wt-handle-btn :focus,
.wt-handle-btn :active {
    cursor: pointer;
    padding: 6px 4px;
    width: 50px;
    align-items: center;
    text-align: center;
    transition: color 0.15s ease;
    outline: none;
    border: none;
    border-top: var(--wt-border);
    border-right: var(--wt-border);
    border-left: var(--wt-border);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

    .wt-handle-btn *,
    .wt-handle-btn *:hover,
    .wt-handle-btn *:focus,
    .wt-handle-btn *:active, {
        outline: none;
    }
    .wt-handle-btn .wt-icon:hover,
    .wt-handle-btn .wt-icon:focus,
    .wt-handle-btn .wt-icon:active,
    .wt-handle-btn .wt-icon {
        width: 22px;
        height: 22px;
        outline: none;
    }

.wt-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background-color: var(--bs-tertiary-bg);
}

.wt-widget--open .wt-panel {
    max-height: 200px;
}

.wt-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px;
}

.wt-time-value {
    font-size: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    min-width: 52px;
    color: var(--bs-body-color);
}

.wt-time-value--low {
    color: #f87171;
}

.wt-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.wt-toggle--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.wt-toggle > input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.wt-toggle-track {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    height: 36px;
    border-radius: 18px;
    background: #4b5563;
    transition: background 0.2s ease;
    cursor: pointer;
}

.wt-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    color: #1f2430;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.wt-toggle > input[type="checkbox"]:checked + .wt-toggle-track {
    background: #0071c1;
}

    .wt-toggle > input[type="checkbox"]:checked + .wt-toggle-track .wt-toggle-thumb {
        transform: translateX(28px);
    }

.wt-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.wt-icon-pause,
.wt-icon-hg-on {
    display: none;
}

.wt-toggle > input[type="checkbox"]:checked + .wt-toggle-track .wt-icon-play,
.wt-toggle > input[type="checkbox"]:checked + .wt-toggle-track .wt-icon-hg-off {
    display: none;
}

.wt-toggle > input[type="checkbox"]:checked + .wt-toggle-track .wt-icon-pause,
.wt-toggle > input[type="checkbox"]:checked + .wt-toggle-track .wt-icon-hg-on {
    display: block;
}

.wt-toggle--small .wt-toggle-track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
}

.wt-toggle--small .wt-toggle-thumb {
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
}

.wt-toggle--small > input[type="checkbox"]:checked + .wt-toggle-track .wt-toggle-thumb {
    transform: translateX(16px);
}

.wt-toggle-label {
    font-size: 14px;
    color: var(--bs-body-color);
}

.wt-btn {
    border: none;
    border-radius: 8px;
    background: #374151;
    color: #f4f4f5;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

    .wt-btn:hover:not(:disabled) {
        background: #4b5563;
    }

    .wt-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.wt-btn--icon {
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .wt-btn--icon .wt-icon {
        width: 20px;
        height: 20px;
    }

.wt-btn--settings {
    margin-left: auto;
}

.wt-btn--settings-active {
    /* background: #374151; */
    color: #60a5fa;
}

.wt-settings {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 8px 16px 12px;
    border-top: 1px solid #374151;
}

.wt-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-stepper-label {
    font-size: 14px;
    color: var(--bs-body-color);
}

.wt-stepper-value {
    min-width: 52px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    color: var(--bs-body-color);
}

@media (max-width: 999px) {
    .wt-widget {
        left: 0;
        right: 0;
        min-width: 44px;
        margin: auto;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .wt-widget {
        padding: 0;
    }
}

@media (max-width: 400px) {
    .wt-time-value {
        font-size: 20px;
        min-width: 44px;
    }

    .wt-bar {
        gap: 6px;
        padding: 10px 10px;
    }
}