/**
 * StarBuilder Global Styles
 *
 * Minimal CSS loaded on all front-end pages.
 * Admin bar styles are inline in adminbar.php.
 */

/* 3-Level Navigation */
.sb-gnb {
    width: 100%;
}

.sb-menu-1depth {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.sb-menu-item {
    position: relative;
}

.sb-menu-item > a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.sb-menu-item > a:hover,
.sb-menu-item.active > a {
    color: var(--sb-primary, #FF6B35);
}

/* 2nd level dropdown */
.sb-menu-2depth {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 6px 6px;
    z-index: 100;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-menu-item.has-children:hover > .sb-menu-2depth {
    display: block;
}

.sb-menu-2depth .sb-menu-item > a {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: normal;
    border-bottom: 1px solid #f0f0f0;
}

.sb-menu-2depth .sb-menu-item:last-child > a {
    border-bottom: none;
}

.sb-menu-2depth .sb-menu-item > a:hover {
    background: #f8f9fa;
    color: var(--sb-primary, #FF6B35);
}

/* 3rd level sub-dropdown */
.sb-menu-3depth {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 6px 6px 0;
    z-index: 101;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-menu-2depth .sb-menu-item.has-children:hover > .sb-menu-3depth {
    display: block;
}

.sb-menu-3depth .sb-menu-item > a {
    padding: 10px 18px;
    font-size: 13px;
}

/* iframe popup modal */
.sb-iframe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-iframe-modal {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.sb-iframe-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 30px;
    text-align: center;
    z-index: 1;
}

.sb-iframe-close:hover {
    background: #FF6B35;
}

.sb-iframe-modal iframe {
    display: block;
    border: none;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
    .sb-menu-1depth {
        flex-direction: column;
    }

    .sb-menu-2depth,
    .sb-menu-3depth {
        position: static;
        box-shadow: none;
        border-radius: 0;
    }

    .sb-menu-2depth .sb-menu-item > a {
        padding-left: 30px;
    }

    .sb-menu-3depth .sb-menu-item > a {
        padding-left: 45px;
    }
}

/* Admin bar body offset */
body.sb-has-adminbar {
    padding-bottom: 48px;
}
