/* Styling for the HerBusiness Custom Query Loop Load More Button */

.hbcs-query-load-more-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 60px !important;
    margin-bottom: 40px !important;
    clear: both;
}

.hbcs-query-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    font-family: Nohemi, Nohemi, "Avenir Next", "Century Gothic", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 0px !important; /* Sharp corners */
    padding: 18px 48px;
    border: 2px solid #1f1f1f !important;
    background-color: #ffffff !important;
    color: #1f1f1f !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
    outline: none !important;

    /* 8px 3D Retro Shadow extending bottom-left */
    box-shadow: 
        -1px 1px 0px #1f1f1f,
        -2px 2px 0px #1f1f1f,
        -3px 3px 0px #1f1f1f,
        -4px 4px 0px #1f1f1f,
        -5px 5px 0px #1f1f1f,
        -6px 6px 0px #1f1f1f,
        -7px 7px 0px #1f1f1f,
        -8px 8px 0px #1f1f1f !important;
}

/* Hover transitions (Desktop Only) - Translate button halfway into shadow */
@media (min-width: 768px) {
    .hbcs-query-load-more-btn:hover:not(:disabled) {
        transform: translate(-4px, 4px) !important;
        box-shadow: 
            -1px 1px 0px #1f1f1f,
            -2px 2px 0px #1f1f1f,
            -3px 3px 0px #1f1f1f,
            -4px 4px 0px #1f1f1f !important;
    }
}

/* Active clicked state - Translate button fully into shadow */
.hbcs-query-load-more-btn:active:not(:disabled),
.hbcs-query-load-more-btn.loading {
    transform: translate(-8px, 8px) !important;
    box-shadow: 0px 0px 0px #1f1f1f !important;
}

.hbcs-query-load-more-btn:disabled {
    background-color: #f5efe3 !important; /* Disabled tint */
    color: #a0a5aa !important;
    border-color: #a0a5aa !important;
    transform: translate(-8px, 8px) !important;
    box-shadow: 0px 0px 0px #a0a5aa !important;
    cursor: not-allowed;
}

/* Mobile viewports (screens up to 767px wide) */
@media (max-width: 767px) {
    .hbcs-query-load-more-wrap {
        margin-top: 32px !important;
        margin-bottom: 40px !important;
    }

    .hbcs-query-load-more-btn {
        padding: 14px 32px; /* Slightly reduce padding on mobile */
        font-size: 16px;     /* Slightly smaller font size on mobile */
        box-shadow: 
            -1px 1px 0px #1f1f1f,
            -2px 2px 0px #1f1f1f,
            -3px 3px 0px #1f1f1f,
            -4px 4px 0px #1f1f1f,
            -5px 5px 0px #1f1f1f,
            -6px 6px 0px #1f1f1f !important;
    }
    
    /* Scale hover depth down on mobile */
    .hbcs-query-load-more-btn:hover:not(:disabled) {
        transform: translate(-3px, 3px) !important;
        box-shadow: 
            -1px 1px 0px #1f1f1f,
            -2px 2px 0px #1f1f1f,
            -3px 3px 0px #1f1f1f !important;
    }
    
    /* Active and loading state aligns to the 6px resting depth */
    .hbcs-query-load-more-btn:active:not(:disabled),
    .hbcs-query-load-more-btn.loading {
        transform: translate(-6px, 6px) !important;
        box-shadow: 0px 0px 0px #1f1f1f !important;
    }

    .hbcs-query-load-more-btn:disabled {
        transform: translate(-6px, 6px) !important;
        box-shadow: 0px 0px 0px #a0a5aa !important;
    }
}

/* Dark Spinner Animation (Contrast-adjusted for white background) */
.hbcs-query-load-more-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(31, 31, 31, 0.2);
    border-radius: 50%;
    border-top-color: #1f1f1f;
    animation: hbcs-spin 0.8s linear infinite;
}

.hbcs-query-load-more-btn.loading .hbcs-query-load-more-spinner {
    display: inline-block;
}

@keyframes hbcs-spin {
    to {
        transform: rotate(360deg);
    }
}
