﻿/* Detecno Widget Styles */

.detecno-trigger-button {
    position: fixed;
    z-index: 9998;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .detecno-trigger-button:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
    }

    .detecno-trigger-button:active {
        transform: scale(0.95);
    }

    .detecno-trigger-button.bottom-right {
        bottom: 24px;
        right: 24px;
    }

    .detecno-trigger-button.bottom-left {
        bottom: 24px;
        left: 24px;
    }

    .detecno-trigger-button.top-right {
        top: 24px;
        right: 24px;
    }

    .detecno-trigger-button.top-left {
        top: 24px;
        left: 24px;
    }

    /* Updated to support both SVG and IMG logos */
    .detecno-trigger-button svg,
    .detecno-trigger-button img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

.detecno-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

    .detecno-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.detecno-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.detecno-overlay.active .detecno-modal {
    transform: scale(1) translateY(0);
}

.detecno-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.detecno-modal-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

    /* Added support for logo image in header */
    .detecno-modal-logo svg,
    .detecno-modal-logo .detecno-logo-img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

.detecno-modal-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

    .detecno-modal-logo-text .highlight {
        color: #00d4ff;
        background: transparent !important;
    }

.detecno-close-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .detecno-close-button:hover {
        background: #f3f4f6;
    }

    .detecno-close-button svg {
        width: 24px;
        height: 24px;
        color: #6b7280;
    }

.detecno-modal-content {
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 140px); /* espacio para header + padding */
}

.detecno-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 32px;
}

.detecno-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
    flex-wrap: nowrap;
}

    .detecno-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .detecno-tabs::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

/* Reduced font size and allowed text wrapping in tabs */
.detecno-tab {
    padding: 10px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    min-width: 100px;
    max-width: 140px;
    flex-shrink: 0;
}

    .detecno-tab:hover {
        background: #e5e7eb;
        color: #374151;
    }

    .detecno-tab.active {
        background: #00d4ff;
        color: white;
    }

.detecno-products {
    /*display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    min-height: 450px;*/
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    /*justify-content: center;*/
    /* padding: 16px;*/
}

@media (max-width: 768px) {
    .detecno-products {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .detecno-modal-content {
        height: 500px;
        min-height: 500px;
        max-height: 500px;
    }
}

.detecno-product {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 240px;
    width: 100%;
    margin: 0 auto;
}

    .detecno-product:hover {
        border-color: #00d4ff;
        box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
        transform: translateY(-2px);
    }

.detecno-product-icon {
    /*width: 180px;*/
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Added styles for product logo images */
    .detecno-product-icon .product-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .detecno-product-icon svg {
        width: 100%;
        height: 100%;
    }

    /* Special styling for timbrame logo - make it wider and crop vertical space */
    .detecno-product-icon .product-logo[alt="timbrame"] {
        width: 180%;
        height: 60%;
        object-fit: cover;
        object-position: center;
    }

.detecno-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.detecno-product-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .detecno-modal-header {
        padding: 16px 20px;
    }

    .detecno-widget {
        padding: 20px;
    }

    .detecno-tabs {
        gap: 6px;
    }

    /* Adjusted mobile tab sizing */
    .detecno-tab {
        padding: 8px 12px;
        font-size: 10px;
        min-width: 80px;
        max-width: 110px;
    }

    .detecno-trigger-button {
        width: 56px;
        height: 56px;
    }

        /* Updated responsive styles for logo images */
        .detecno-trigger-button svg,
        .detecno-trigger-button img {
            width: 28px;
            height: 28px;
        }
}
