/*
 * Mela Mandala Secondary Widget Styles
 */

.mela-mandala-secondary-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.mela-mandala-secondary-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 10px;
}

.mela-mandala-secondary-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    height: 60px;
    border-radius: 50px;
    background-color: #e4009c !important;
    background-image: none !important;
    opacity: 0.6;
    filter: drop-shadow(0px 9px 17.5px rgba(0, 0, 0, 0.14));
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    font-family: inherit;
}

.mela-mandala-secondary-tab-btn:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.mela-mandala-secondary-tab-btn.active {
    background-color: transparent !important;
    background-image: linear-gradient(-80deg, #e4009b 0%, #002b9a 100%) !important;
    filter: drop-shadow(0px 9px 17.5px rgba(0, 0, 0, 0.14));
    opacity: 1;
    color: #ffffff !important;
    border-color: transparent !important;
}

.mela-mandala-secondary-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mela-mandala-secondary-center {
    width: 150px;
    /* Default from controls */
    height: 150px;
    /* Default from controls */
    border-radius: 50%;
    background-color: #f9c74f;
    /* Default from controls */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 2;
    /* Above orbit lines */
}

.mela-mandala-secondary-center img {
    width: 80%;
    /* Default from controls */
    height: 80%;
    /* Default from controls */
    border-radius: 50%;
    object-fit: cover;
    /* Default from controls */
    display: block;
}

.mela-mandala-secondary-orbit-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--mela-orbit-radius) * 2);
    height: calc(var(--mela-orbit-radius) * 2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    /* Below center circle */
}

.mela-mandala-secondary-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    /* Behind orbit lines */
    overflow: hidden;
}

.mela-mandala-secondary-background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color, rgba(0, 0, 0, 0));
    opacity: var(--overlay-opacity, 0);
    border-radius: 50%;
}

.mela-mandala-secondary-orbit-line {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    border-width: 2px;
    /* Adjust as needed */
    box-sizing: border-box;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    /* Above background image */
}

.mela-mandala-secondary-orbit-line-1 {
    width: 100%;
    height: 100%;
    border-color: var(--mela-orbit-line-color, #ff004f);
}

.mela-mandala-secondary-orbit-line-2 {
    /* Sizing now handled responsively by Elementor control selectors */
    border-color: var(--mela-orbit-line-color, #ffcf10);
}

.mela-mandala-secondary-orbit-line-3 {
    /* Sizing now handled responsively by Elementor control selectors */
    border-color: var(--mela-orbit-line-color, #000ba6);
}

.mela-mandala-secondary-tab-pane {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
}

.mela-mandala-secondary-tab-pane.active {
    display: block;
}

.mela-mandala-secondary-orbit-item {
    position: absolute;
    width: 60px;
    /* Default from controls */
    height: 60px;
    /* Default from controls */
    border-radius: 50%;
    background-color: #fff;
    /* Default from controls */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 3;
    /* Above center and orbit lines */
    transform: translate(-50%, -50%);
}

.mela-mandala-secondary-orbit-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Default from controls */
    border-radius: 50%;
    display: block;
}

.mela-mandala-secondary-image-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mela-mandala-secondary-image-preview.active {
    opacity: 1;
    visibility: visible;
}

.mela-mandala-secondary-image-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.mela-mandala-secondary-image-preview .close-preview {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
    pointer-events: auto;
    transition: background-color 0.3s ease;
}

.mela-mandala-secondary-image-preview .close-preview:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 1024px) {
    .mela-mandala-secondary-image-preview .close-preview {
        display: flex;
    }
    .mela-mandala-secondary-image-preview {
        pointer-events: auto;
        cursor: pointer;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mela-mandala-secondary-tabs-nav {
        flex-direction: column;
        width: 80%;
    }

    .mela-mandala-secondary-tab-btn {
        width: 100%;
    }
}