.spidergraph-enhanced {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background: transparent;
    box-shadow: 0 4px 4px 0 #dff4ff;
    padding: 16px;
    width: fit-content;
    height: fit-content;
}

.spidergraph-enhanced .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.spidergraph-enhanced .title .title-text {
    font-family: "Metropolis Semi Bold";
    font-size: 20px;
    line-height: normal;
    letter-spacing: 0.3px;
    color: #4b4a4a;
}

.spidergraph-canvas-container {
    width: calc(50vw - 100px);
    height: fit-content;
    max-height: 500px;
    max-width: 500px;
}
.spidergraph-canvas-container .charts {
    width: 100%;
    height: 100%;
}
.dark .spidergraph-enhanced {
    background-color: #1f2120;
    box-shadow: none;
}

.dark .spidergraph-enhanced .title {
    color: #ffffff;
}

/* Cover Message Styles */
.cover-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -42%);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    width: 100%;
    height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cover-message-icon {
    width: 80px;
    height: 80px;
    background-image: url(https://d1gq9jzbezk7fw.cloudfront.net/d/en_US/gv/i/brain_error.svg);
    background-color: #d3e9f4;
    border-radius: 50%;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
}

.cover-message-title {
    font-family: "Metropolis Bold";
    font-size: 18px;
    line-height: 22px;
    color: #4b4a4a;
    margin-bottom: 12px;
    letter-spacing: 0.27px;
}

.cover-message-text {
    font-family: "Metropolis Regular";
    font-size: 16px;
    line-height: 20px;
    color: #4b4a4a;
    letter-spacing: 0.16px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .spidergraph-enhanced.open .legend-container {
        flex-wrap: wrap;
    }
}
@media (max-width: 768px) {
    .spidergraph-enhanced {
        width: 100%;
    }
    .spidergraph-canvas-container {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }

    .cover-message-title {
        font-size: 16px;
        line-height: 20px;
    }

    .cover-message-text {
        font-size: 14px;
        line-height: 18px;
    }
}

/* See All Button Styles */
.see-all-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.see-all-text {
    font-family: "Metropolis Semi Bold";
    font-size: 17px;
    line-height: 18px;
    color: #4b4a4a;
    letter-spacing: 0.17px;
}

.see-all-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='37' viewBox='0 0 35 35' fill='none'%3E%3Cpath d='M9.06013 12.2686L14.9305 18.0647L20.7266 12.1943' stroke='%231471DB' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: -2px -2px;
    background-size: 40px 40px;
    width: 30px;
    height: 30px;
}

.spidergraph-enhanced.open .see-all-icon {
    top: -5px;
    transform: rotate(180deg);
}

/* Legend Styles */
.legend-container {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.spidergraph-enhanced.open .legend-container {
    display: flex;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-text {
    font-family: "Metropolis Regular";
    font-size: 17px;
    line-height: 16px;
    color: #4b4a4a;
    letter-spacing: 0.17px;
    white-space: nowrap;
}

.legend-text span {
    font-family: "Metropolis Semi Bold";
    margin-right: 4px;
}

.legend-line {
    width: 24px;
    height: 4px;
}

.single-task-line {
    color: #4b4a4a;
    font-family: serif;
    font-size: 23px;
    font-weight: bold;
    letter-spacing: -1px;
    width: 30px;
}

.dual-task-line {
    background: #1471db;
}

/* Dark theme support for legend */
.dark .legend-container {
    background: rgba(31, 33, 32, 0.8);
}

.dark .legend-text {
    color: #ffffff;
}

.dark .single-task-line {
    color: #fff;
}

.dark .dual-task-line {
    background: #1471db;
}

.spidergraph-enhanced .dateRangeContainer {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.spidergraph-enhanced.open .dateRangeContainer {
    display: flex;
}

.spidergraph-enhanced .dateRange {
    display: flex;
    font-family: "Metropolis Regular";
    color: #4b4a4a;
    font-size: 17px;
    line-height: 18px;
    letter-spacing: 0.17px;
}
.spidergraph-enhanced .dateRangeContainer.hide {
    display: none;
}

.spidergraph-enhanced .dateRangeInput {
    height: 44px;
    border-radius: 12px;
}

.popupmessage.powerModal .closeIconContainer span {
    color: #1471db;
    font-family: "Metropolis Semi Bold";
    font-size: 24px;
    line-height: 32px;
    letter-spacing: 0.24px;
    position: relative;
    right: calc(100% - 110px);
}

.popupmessage.powerModal .powerModal {
    width: 100%;
}

.popupmessage.powerModal .powerOption {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(225, 237, 255, 0.8);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.popupmessage.powerModal .powerText,
.popupmessage.powerModal .powerValue {
    color: #4b4a4a;
    font-family: "Metropolis Regular";
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 0.2px;
}

.popupmessage.powerModal .powerText {
    flex-grow: 1;
    text-transform: capitalize;
}

.popupmessage.powerModal .powerIcon img{
    width: 32px;
    height: 32px;
    margin-bottom: 0;
    padding: 2px;
    object-fit: contain;
    border-radius: 50%;
}

/* Dark theme support for See All button */
.dark .see-all-text,
.dark .spidergraph-enhanced .dateRange,
.dark .spidergraph-enhanced .title .title-text,
.dark .popupmessage.powerModal .powerText,
.dark .popupmessage.powerModal .powerValue,
.dark .legend-text span,
.dark .cover-message-title,
.dark .cover-message-text {
    color: #ffffff;
}

.dark .see-all-icon,
.dark .popupmessage.powerModal .closeIconContainer span {
    color: #1683ff;
}

.dark .dual-task-line {
    background: #0eb5fe;
}

@media (max-width: 768px) {
    .spidergraph-enhanced .title .title-text {
        font-size: 18px;
        line-height: 22px;
        letter-spacing: 0.27px;
    }
    .spidergraph-canvas-container {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }

    .cover-message-title {
        font-size: 16px;
        line-height: 20px;
    }

    .cover-message-text {
        font-size: 14px;
        line-height: 18px;
    }

    .legend-container {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .legend-item {
        gap: 12px;
    }

    .legend-text {
        font-size: 13px;
        line-height: 15px;
    }
    .popupmessage.powerModal .closeIconContainer span {
        font-size: 20px;
    }

    .popupmessage.powerModal .powerText,
    .popupmessage.powerModal .powerValue {
        font-size: 16px;
    }

    .popupmessage.powerModal .powerIcon img{
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .spidergraph-canvas-container {
        width: 100%;
        max-width: 300px;
        height: 300px;
    }

    .legend-container {
        padding: 12px;
        gap: 8px;
    }

    .legend-text {
        font-size: 12px;
        line-height: 14px;
    }
}
