/* Общие стили для вкладок и кнопок */
#checklist-module .main-tabs,
#checklist-module .sub-tabs {
    display: flex;
    background: none;
    gap: 5px;
}

#checklist-module .main-tab,
#checklist-module .tab {
    padding: 10px 20px;
    cursor: pointer;
    color: var(--foreground, #1e1e2f);
    background: var(--card-bg, var(--background, #e8e8f3));
    border-radius: 10px;
    margin: 5px;
    box-shadow: var(--shadow, 2px 2px 5px var(--shadow-dark, rgba(55, 84, 170, 0.05)), -2px -2px 5px var(--shadow-light, rgba(255, 255, 255, 0.5)));
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    user-select: none;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* Для подстраховки в старых браузерах */
}

#checklist-module .main-tab:hover,
#checklist-module .tab:hover,
#checklist-module .main-tab.active,
#checklist-module .tab.active {
    box-shadow: var(--inset-shadow, inset 2px 2px 4px var(--inset-shadow-dark, rgba(55, 84, 170, 0.1)), inset -2px -2px 4px var(--inset-shadow-light, rgba(255, 255, 255, 0.5)));
    border-bottom: none;
}

/* Специфичные стили для main-tabs */
#checklist-module .main-tabs {
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: space-between;
}

#checklist-module .main-tab {
    flex-grow: 1;
}

/* Стили для подвкладок и контейнера */
#checklist-module .content-wrapper {
    display: flex;
    flex-direction: row;
    background: none;
    border-radius: 0;
    box-shadow: none;
    align-items: flex-start;
}

#checklist-module .sub-tabs-container {
    display: flex;
    flex-direction: column;
    margin-right: 20px;
    min-width: 150px;
}

#checklist-module .sub-tabs {
    display: none;
    flex-direction: column;
}

#checklist-module .sub-tabs.active {
    display: flex;
    visibility: visible;
    opacity: 1;
}

#checklist-module .tab {
    text-align: left;
    padding: 10px 15px;
    margin: 5px 0;
}

/* Стили для контента */
#checklist-module .content {
    flex-grow: 1;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Стили для изображения и хотспотов */
#checklist-module .image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--inset-shadow, inset 2px 2px 4px var(--inset-shadow-dark, rgba(55, 84, 170, 0.1)), inset -2px -2px 4px var(--inset-shadow-light, rgba(255, 255, 255, 0.5)));
    background: var(--card-bg, var(--background, #e8e8f3));
    display: none;
    width: 100%;
    height: 100%;
    padding: 5px;
}

#checklist-module .room-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

#checklist-module .hotspot {
    position: absolute;
    background: var(--card-bg, var(--background, #e8e8f3));
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: var(--shadow, 2px 2px 5px var(--shadow-dark, rgba(55, 84, 170, 0.05)), -2px -2px 5px var(--shadow-light, rgba(255, 255, 255, 0.5)));
    opacity: 0;
    transition: opacity 0.5s;
    max-width: 200px;
    word-wrap: break-word;
    transform: translate(-50%, -50%);
    color: var(--foreground, #1e1e2f);
    display: flex;
    align-items: center;
}

#checklist-module .hotspot.visible {
    opacity: 1;
}

#checklist-module .hotspot::before {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--primary, #EB911C);
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Стили для списка услуг */
#checklist-module .service-list {
    list-style-type: none;
    padding: 10px;
    border-radius: 10px;
    box-shadow: var(--inset-shadow, inset 2px 2px 4px var(--inset-shadow-dark, rgba(55, 84, 170, 0.1)), inset -2px -2px 4px var(--inset-shadow-light, rgba(255, 255, 255, 0.5)));
    background: var(--card-bg, var(--background, #e8e8f3));
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
}

#checklist-module .service-list li:hover {
    box-shadow: var(--inset-shadow, inset 2px 2px 4px var(--inset-shadow-dark, rgba(55, 84, 170, 0.1)), inset -2px -2px 4px var(--inset-shadow-light, rgba(255, 255, 255, 0.5)));
}

#checklist-module .service-list li:before {
    content: "✓";
    color: var(--primary, #EB911C);
    margin-right: 10px;
    font-weight: bold;
}

/* Стили для переключателя */
#checklist-module .toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    visibility: visible !important;
    opacity: 1 !important;
}

#checklist-module .toggle-switch {
    position: relative;
    width: 200px;
    height: 45px;
}

#checklist-module .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#checklist-module .slider {
    position: absolute;
    cursor: pointer;
    top: 5px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-bg, var(--background, #e8e8f3));
    transition: box-shadow 0.3s ease;
    border-radius: 10px;
    box-shadow: var(--inset-shadow, inset 2px 2px 4px var(--inset-shadow-dark, rgba(55, 84, 170, 0.1)), inset -2px -2px 4px var(--inset-shadow-light, rgba(255, 255, 255, 0.5)));
    display: flex;
    align-items: center;
    padding: 5px;
}

#checklist-module .slider:before {
    content: "";
    height: 30px;
    width: 90px;
    left: 5px;
    bottom: 5px;
    background: var(--background);
    border-radius: 8px;
    box-shadow: var(--shadow, 2px 2px 5px var(--shadow-dark, rgba(55, 84, 170, 0.05)), -2px -2px 5px var(--shadow-light, rgba(255, 255, 255, 0.5)));
    transition: transform 0.4s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-foreground, #1e1e2f);
    font-size: 14px;
    font-weight: 500;
    z-index: 1;
}

#checklist-module input:checked + .slider:before {
    transform: translateX(100px);
}

#checklist-module .toggle-text {
    position: absolute;
    width: 90px;
    text-align: center;
    color: var(--foreground, #1e1e2f);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    z-index: 1;
    left: 55%;
    transform: translateX(-5%);
}

#checklist-module .toggle-text:first-child {
    left: 10px;
}

#checklist-module .toggle-text:last-child {
    right: 10px;
}

#checklist-module input:checked + .slider .toggle-text:first-child,
#checklist-module input:not(:checked) + .slider .toggle-text:last-child {
    color: var(--toggle-text-color, #A9A9A9);
}

#checklist-module input:checked + .slider .toggle-text:last-child,
#checklist-module input:not(:checked) + .slider .toggle-text:first-child {
    color: var(--foreground, #1e1e2f);
}

#checklist-module .slider:hover:before {
    box-shadow: var(--shadow, 2px 2px 5px var(--shadow-dark, rgba(55, 84, 170, 0.05)), -2px -2px 5px var(--shadow-light, rgba(255, 255, 255, 0.5)));
}

/* Анимация пульсации */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(235, 145, 28, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(235, 145, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(235, 145, 28, 0); }
}

/* Адаптивные стили */
@media (max-width: 768px) {
    #checklist-module .content-wrapper {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    #checklist-module .main-tabs {
        flex-wrap: wrap;
    }

    #checklist-module .main-tab {
        padding: 10px 12px;
        font-size: 14px;
        white-space: normal;
        max-width: 48%;
    }

    #checklist-module .sub-tabs-container {
        margin-right: 10px;
        min-width: 120px;
        flex-shrink: 0;
    }

    #checklist-module .tab {
        padding: 8px 10px;
        font-size: 14px;
    }

    #checklist-module .image-container,
    #checklist-module .toggle-container {
        display: none !important;
    }

    #checklist-module .service-list li {
        padding: 8px;
        box-shadow: none;
        background: none;
        border-radius: 0;
    }

    #checklist-module .service-list li:hover {
        box-shadow: none;
    }

    #checklist-module .hotspot {
        font-size: 12px;
        padding: 8px 12px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    #checklist-module .content-wrapper {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    #checklist-module .main-tab {
        padding: 8px 10px;
        font-size: 12px;
        flex: 1 1 calc(33% - 5px);
    }

    #checklist-module .sub-tabs-container {
        margin-right: 5px;
        min-width: 100px;
        flex-shrink: 0;
    }

    #checklist-module .tab {
        padding: 6px 8px;
        font-size: 12px;
    }

    #checklist-module .service-list {
        padding: 5px;
        max-height: 300px;
        overflow-y: auto;
        font-size: 12px;
    }

    #checklist-module .service-list li {
        padding: 6px;
        font-size: 12px;
    }

    #checklist-module .hotspot {
        font-size: 10px;
        padding: 6px 10px;
        max-width: 120px;
    }
}

@media (max-width: 300) {
    #checklist-module .content-wrapper {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    
    #checklist-module .main-tab {
        padding: 8px 10px;
        font-size: 12px;
        min-width: 100%;
        flex: 1 1 calc(33% - 5px);
    }

    #checklist-module .sub-tabs-container {
        margin-right: 0;
        margin-bottom: 20px;
        min-width: 100%;
        flex: 1 1 calc(33% - 5px);
    }

    #checklist-module .service-list {
        padding: 10px;
        max-height: none;
        overflow-y: visible;
        font-size: 14px;
    }

    #checklist-module .service-list li {
        padding: 8px;
        font-size: 14px;
    }
}