/*
 * HRON Logo Manager Styles
 * Version: 1.0.1
 * Author: Eser
 * Author URI: https://hr-on.com
 */

/**
 * HRON Logo Manager Styles
 */

.hron-logo-manager-overview {
    text-align: center;
    margin: 0 auto;
    --logo-gap: 20px;
}

.hron-logo-customer-logos {
    padding: 0;
    margin: 0 auto;
}

.hron-logo-customer-logos h1 {
    text-align: center;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.hron-logo-customer-logos h5 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: normal;
    color: #666;
}

.hron-logo-container {
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    background: transparent;
    /* Clean professional container */
    border-radius: 8px;
    box-sizing: border-box;
}

/* Remove gradient mask for clean cut-off */
.hron-logo-container.hron-multiple-logos {
    /* Clean horizontal viewport - no gradients */
    mask: none;
    -webkit-mask: none;
}

.hron-logo-slider {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    animation: hron_logo_slide 60s linear infinite;
    width: max-content;
    padding: 20px 0;
    gap: var(--logo-gap);
    /* Ensure slider content stays within bounds */
    will-change: transform;
}

/* Slider mode specific styles */
.hron-logo-slider img {
    height: auto;
    max-height: 100px;
    width: auto !important;
    object-fit: contain;
    object-position: center;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.hron-logo-slider img:hover {
    filter: grayscale(0);
    opacity: 1;
}

@keyframes hron_logo_slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Admin styles */
.hron-logo-language-checkboxes {
    margin-top: 10px;
}

.hron-logo-language-checkboxes label {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .hron-logo-slider img {
        max-height: 80px !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .hron-logo-container {
        padding: 0;
        max-width: 100%;
        margin: 0 auto;
        overflow: hidden !important;
    }
    
    .hron-logo-customer-logos {
        max-width: 100%;
        padding: 0 20px;
        overflow: hidden !important;
    }
    
    .hron-logo-customer-logos h5 {
        margin-bottom: 15px;
    }
    
    .hron-logo-static,
    .hron-logo-manager .hron-logo-container .hron-logo-static,
    div.hron-logo-static {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding: 1rem !important;
        margin: 0 auto !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 25px !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        flex-wrap: nowrap !important;
        flex-direction: unset !important;
    }
    
    .hron-logo-static .hron-logo-item,
    .hron-logo-static .static-logo-item,
    .hron-logo-static > div {
        max-width: 250px !important;
        width: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 120px !important;
        margin: 0 auto !important;
        flex: 0 0 auto !important;
    }
    
    /* Hide extra logos after 4th */
    .hron-logo-static .hron-logo-item:nth-child(n+5),
    .hron-logo-static .static-logo-item:nth-child(n+5),
    .hron-logo-static > div:nth-child(n+5) {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hron-logo-slider img {
        max-height: 60px !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .hron-logo-customer-logos {
        padding: 0 15px;
        overflow: hidden !important;
    }
    
    .hron-logo-static,
    .hron-logo-manager .hron-logo-container .hron-logo-static,
    div.hron-logo-static {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding: 0.5rem !important;
        margin: 0 auto !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 20px !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        flex-wrap: nowrap !important;
        flex-direction: unset !important;
    }
    
    .hron-logo-static .hron-logo-item,
    .hron-logo-static .static-logo-item,
    .hron-logo-static > div {
        max-width: 200px !important;
        width: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100px !important;
        margin: 0 auto !important;
        flex: 0 0 auto !important;
    }
    
    /* Hide extra logos after 4th */
    .hron-logo-static .hron-logo-item:nth-child(n+5),
    .hron-logo-static .static-logo-item:nth-child(n+5),
    .hron-logo-static > div:nth-child(n+5) {
        display: none !important;
    }
}

/* Static Display Mode */
.hron-logo-static {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: var(--logo-gap, 24px) !important;
    justify-content: center !important;
    align-items: center !important;
    justify-items: center !important;
    padding: 1.25rem !important;
    overflow: hidden !important;
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.hron-logo-static .hron-logo-item,
.hron-logo-static .static-logo-item,
.hron-logo-static > div {
    flex: 0 0 auto;
    max-width: 100% !important;
    width: auto !important;
    height: 140px !important;
    min-height: 140px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    text-align: center !important;
    justify-self: center !important;
    align-self: center !important;
}

/* Static mode specific styles */
.hron-logo-static .hron-logo-item img,
.hron-logo-static .static-logo-item img,
.hron-logo-static img {
    max-width: 100% !important;
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    filter: none !important;
    opacity: 1 !important;
    transition: transform 0.3s ease;
    display: block !important;
    float: none !important;
}

.hron-logo-static .hron-logo-item:hover img {
    transform: scale(1.05);
}

/* Static mode tooltip fixes */
.hron-logo-static .hron-logo-tooltip-wrapper {
    position: relative;
    z-index: 1;
}

.hron-logo-static .hron-logo-tooltip-wrapper:hover {
    z-index: 9999 !important;
}

.hron-logo-tooltip-wrapper {
    position: relative;
}
.hron-logo-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    width: 350px;
    max-width: 90vw;
    z-index: 9999 !important;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Mouse events should pass through tooltip */
}
.hron-logo-tooltip-wrapper:hover .hron-logo-tooltip {
    display: block;
}
.hron-logo-tooltip::after {
    content: "";  
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #fff;
}
.hron-logo-tooltip-content {
    width: 100%;
}
.hron-logo-tooltip-quote {
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
}
.hron-logo-tooltip-name {
    display: block;
    margin-top: 12px;
    text-align: right;
    font-weight: bold;
    font-size: 15px;
}
.hron-logo-tooltip-name::before {
    content: "— ";
}
.hron-logo-container.hron-tooltip-active {
    overflow: visible !important;
}

.hron-logo-container.hron-multiple-logos.hron-tooltip-active {
    mask: none !important;
    -webkit-mask: none !important;
}

@media (max-width: 768px) {
    .hron-logo-tooltip {
        padding: 14px 18px;
        bottom: calc(100% + 12px);
        max-width: 80vw;
    }
    .hron-logo-tooltip-quote {
        font-size: 15px;
    }
    .hron-logo-tooltip-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hron-logo-tooltip {
        padding: 12px 16px;
        bottom: calc(100% + 10px);
        min-width: 200px;
    }
    .hron-logo-tooltip-quote {
        font-size: 14px;
    }
    .hron-logo-tooltip-name {
        font-size: 13px;
        margin-top: 10px;
    }
}

/* Gallery Display Mode */
.hron-logo-gallery {
    position: relative;
    z-index: 1;
    overflow: visible !important;
}

.hron-logo-gallery .hron-logo-tooltip-wrapper {
    position: relative;
    z-index: 1;
}

.hron-logo-gallery .hron-logo-tooltip-wrapper:hover {
    z-index: 9999 !important;
    overflow: visible !important;
}

.hron-logo-filters {
    position: relative;
    z-index: 5;
}

.hron-logo-grid {
    overflow: visible !important;
    position: relative;
}

.hron-logo-grid .hron-logo-item.hron-logo-tooltip-wrapper {
    position: relative;
}

/* Tooltip Container */
.hron-logo-container,
.hron-logo-container.hron-tooltip-active,
.hron-logo-gallery.hron-tooltip-active {
    overflow: visible !important;
}

/* Tooltip styling fixes */
.hron-logo-tooltip {
    z-index: 9999 !important;
    pointer-events: none; /* Mouse events should pass through tooltip */
}

/* Make sure tooltip is fully visible */
.hron-logo-tooltip-wrapper .hron-logo-tooltip {
    bottom: calc(100% + 15px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

/* Fix for tooltip positioning */
.hron-logo-item.hron-tooltip-active {
    z-index: 9999 !important;
    position: relative !important;
}

/* Always show tooltip when active */
.hron-logo-tooltip-wrapper.hron-tooltip-active .hron-logo-tooltip {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Gallery mode logo dimensions */
.hron-logo-gallery .hron-logo-item img {
    max-height: 110px !important;
    width: auto !important;
    max-width: 150px !important;
}

/* Gallery items size adjustment */
.hron-logo-grid .hron-logo-item.hron-logo-tooltip-wrapper {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override any possible container styles that might clip tooltips */
.hron-logo-manager,
.hron-logo-container,
.hron-logo-gallery,
.hron-logo-grid,
.hron-logo-static {
    overflow: visible !important;
}

/* Ensure tooltip is always on top */
body .hron-logo-tooltip {
    z-index: 99999 !important;
}

/* Adjust for small screens */
@media (max-width: 768px) {
    .hron-logo-tooltip {
        max-width: 85vw !important;
        width: 300px !important;
    }
}


.tooltip-touch-open .hron-logo-tooltip {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


@media (max-width: 768px) {
    .hron-logo-tooltip {
        max-width: 85vw !important;
        width: 300px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(0, 0, 0, 0.1);
        bottom: calc(100% + 10px) !important;
    }
    
    .hron-logo-gallery .hron-logo-tooltip-wrapper,
    .hron-logo-static .hron-logo-tooltip-wrapper,
    .hron-logo-slider-item.hron-logo-tooltip-wrapper {
        touch-action: manipulation;
    }
    
    .hron-logo-tooltip-quote {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    .hron-logo-tooltip-name {
        font-size: 13px !important;
    }
    

    @media (max-height: 500px) {
        .hron-logo-tooltip {
            bottom: auto !important;
            top: calc(100% + 10px) !important;
        }
        
        .hron-logo-tooltip::after {
            top: auto;
            bottom: 100%;
            border-top-color: transparent;
            border-bottom-color: #fff;
        }
    }
}

@media (max-width: 480px) {
    .hron-logo-tooltip {
        max-width: 90vw !important;
        width: 270px !important;
        padding: 12px !important;
    }
    

    .hron-logo-tooltip-content {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}


.hron-logo-tooltip::after {
    border-width: 8px !important;
}


@media (max-width: 768px) {

    .hron-logo-tooltip-wrapper {
        position: relative;
    }
    

    

    .tooltip-touch-open {
        box-shadow: 0 0 0 2px #4c6ef5 !important;
        border-radius: 6px;
    }
    

    

    .tooltip-touch-open img {
        transform: scale(1.05);
        opacity: 1 !important;
        filter: none !important;
        transition: transform 0.3s ease;
    }
}


@media (max-width: 768px) {
    .hron-logo-slider img {
        max-height: 80px !important;
        width: auto !important;
        max-width: 130px !important;
    }
    
    .hron-logo-gallery .hron-logo-item img {
        max-height: 110px !important;
        width: auto !important;
        max-width: 150px !important;
    }
    
    .hron-logo-static .hron-logo-item img,
    .hron-logo-static .static-logo-item img,
    .hron-logo-static img {
        max-height: 110px !important;
        max-width: 250px !important;
        width: auto !important;
        height: auto !important;
        overflow: hidden !important;
        object-fit: contain !important;
        display: block !important;
    }
    
    .hron-logo-grid .hron-logo-item.hron-logo-tooltip-wrapper {
        min-height: 120px;
    }
}

@media (max-width: 480px) {
    .hron-logo-slider img {
        max-height: 60px !important;
        width: auto !important;
        max-width: 110px !important;
    }
    
    .hron-logo-gallery .hron-logo-item img {
        max-height: 90px !important;
        width: auto !important;
        max-width: 130px !important;
    }
    
    .hron-logo-static .hron-logo-item img,
    .hron-logo-static .static-logo-item img,
    .hron-logo-static img {
        max-height: 90px !important;
        max-width: 200px !important;
        width: auto !important;
        height: auto !important;
        overflow: hidden !important;
        object-fit: contain !important;
        display: block !important;
    }
}


.hron-logo-slider-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-width: 113px;
    min-height: 65px;
}

.hron-logo-slider-item img.hron-logo-image {
    width: auto !important;
    height: auto !important;
    max-height: 65px !important;
    max-width: 100% !important;
    object-fit: contain;
    object-position: center;
    transition: all 0.3s ease;
}

/* Final hard overrides for Static Mode (beats theme rules) */
/* Note: columns artık shortcode (includes/public.php) inline CSS ile yönetiliyor */

body .hron-logo-static .hron-logo-item,
body .hron-logo-static .static-logo-item,
body .hron-logo-static > div {
    max-width: 260px !important;
    width: 100% !important;
    min-height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body .hron-logo-static img {
    max-height: 120px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    float: none !important;
}
