/* Custom Styles for OneNav Child Theme */

/* Site Header Redesign */
.site-header-card {
    background: transparent;
    /* Background handled by children */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.io-black-mode .site-header-card {
    box-shadow: none;
    border: 1px solid #3b3e40;
}

/* Cover Section */
.custom-site-up {
    position: relative;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #333;
}

.site-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.img-cover.site-img-optimized {
    position: absolute;
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
    object-fit: cover;
    z-index: 1;
}

.site-img-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
    pointer-events: none;
}

.site-qr-code {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-qr-code img {
    background: #fff;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 90px;
    height: 90px;
}

.site-qr-code span {
    font-size: 13px;
    color: #fff;
    margin-top: 8px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.site-stats-buttons {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.site-stats-button {
    background: rgba(0, 0, 0, 0.6);
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

.site-stats-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.site-stats-button i {
    margin-right: 4px;
    font-size: 14px;
}

/* Info Section */
.site-header-info {
    position: relative;
    z-index: 5;
    background: #fff;
    border-radius: 0 0 10px 10px;
    padding: 20px 30px 30px;
}

.io-black-mode .site-header-info {
    background: #2c2e2f;
}

/* Overlapping Logo */
.site-logo {
    margin-top: -60px;
    position: relative;
    z-index: 6;
    flex-shrink: 0;
}

.site-logo img {
    border-radius: 18px;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: #fff;
    width: 100px;
    height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.io-black-mode .site-logo img {
    border-color: #2c2e2f;
    background: #2c2e2f;
}

.site-logo img:hover {
    transform: scale(1.05);
}

.site-title {
    font-size: 24px;
    margin-bottom: 8px;
    line-height: 1.2;
    margin-top: 5px;
}

.site-desc {
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags */
.site-tags .badge {
    font-weight: normal;
    padding: 6px 12px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    margin-right: 8px;
    transition: all 0.2s;
}

.site-tags .badge:hover {
    background: var(--theme-color);
    color: #fff;
}

.io-black-mode .site-tags .badge {
    background: #1b1d1f;
    color: #999;
}

.io-black-mode .site-tags .badge:hover {
    background: var(--theme-color);
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .site-img-wrapper {
        padding-bottom: 56.25%;
        height: auto;
        /* 16:9 */
    }

    .site-qr-code,
    .site-img-overlay {
        display: none;
    }

    .site-logo {
        margin-top: -40px;
        margin-right: 15px !important;
    }

    .site-logo img {
        width: 70px;
        height: 70px;
        border-width: 3px;
    }

    .site-header-info {
        padding: 15px 20px 20px;
    }

    .site-title {
        font-size: 18px;
        margin-top: 0;
    }

    .site-actions .btn {
        padding: 6px 15px;
        font-size: 12px;
    }
}

/* Homepage Card Enhancements */
.sites-item .sites-body {
    transition: all 0.3s ease;
    border: 1px solid transparent;
    /* Prepare for border transition */
    border-radius: 10px;
    /* Ensure rounded corners */
}

.sites-item:hover .sites-body {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--theme-color);
    z-index: 2;
}

.io-black-mode .sites-item:hover .sites-body {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--theme-color);
    background: #2c2e2f;
}

/* Jelly Bounce Animation for Icon */
@keyframes jelly {
    0% {
        transform: scale(1, 1);
    }

    30% {
        transform: scale(1.25, 0.75);
    }

    40% {
        transform: scale(0.75, 1.25);
    }

    50% {
        transform: scale(1.15, 0.85);
    }

    65% {
        transform: scale(0.95, 1.05);
    }

    75% {
        transform: scale(1.05, 0.95);
    }

    100% {
        transform: scale(1, 1);
    }
}

.sites-item:hover .sites-icon {
    animation: jelly 0.8s both;
}

/* Hide My Orders link in User Center */
.uc-set-btn[data-target="#user_tab_order"] {
    display: none !important;
}

/* Homepage Popup Styles - Exact from Star8 */
#cookies-window {
    position: fixed;
    top: 80px;
    right: 10px;
    width: 370px;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(85, 90, 97, 0.13);
    border-radius: 12px;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.1);
    padding: 8px 16px;
    z-index: 1002;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.io-black-mode #cookies-window {
    background-color: rgba(44, 46, 47, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: #eee;
}

#close-cookies-window {
    position: absolute;
    top: 5px;
    right: 13px;
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: rgb(54, 54, 54);
    cursor: pointer;
    transition: all 0.3s;
}

.io-black-mode #close-cookies-window {
    color: #eee;
}

#close-cookies-window:hover {
    color: var(--theme-color);
}

.cookies-window-title {
    font-size: 15px;
    font-weight: 700;
    padding: 3px 0px 5px;
    color: rgb(54, 54, 54);
    line-height: 22.5px;
}

.io-black-mode .cookies-window-title {
    color: #eee;
}

.cookies-window-content {
    display: block;
    font-size: 14px;
    line-height: 21px;
    color: rgb(54, 54, 54);
    margin: 10px 0 10px 0;
}

.io-black-mode .cookies-window-content {
    color: #ccc;
}

/* Hide Article buttons in User Center */
.user-menu-item[href*="tab=post"],
.btn-new-posts[href*="type=post"],
.ajax-footprint[data-type="post"],
.btn-tab[data-target="#tab_post"],
.btn-tab-h[href*="post_type=post"],
.btn-tab-h[href*="tab=post"] {
    display: none !important;
}