/* TR Produktfinder Overlay Widget Styles */

/* Overlay Backdrop */
.tr-finder-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tr-finder-overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Main Overlay Container */
.tr-finder-overlay {
    position: fixed;
    top: 50%;
    right: -100%;
    transform: translateY(-50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px 0 0 16px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tr-finder-overlay.active {
    right: 0;
}

.tr-finder-overlay.centered {
    right: 50%;
    transform: translate(50%, -50%);
}

/* Close Button */
.tr-finder-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #024593;
    transition: all 0.3s ease;
    z-index: 10;
}

.tr-finder-close:hover {
    background: #024593;
    color: white;
    transform: rotate(90deg);
}

/* Tab at right edge */
.tr-finder-tab {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 60px;
    height: 180px;
    background: linear-gradient(135deg, #024593 0%, #03A9F4 100%);
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    box-shadow: -3px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 999997;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.tr-finder-tab.active {
    opacity: 1;
    visibility: visible;
}

.tr-finder-tab:hover {
    width: 70px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.tr-finder-tab-icon {
    font-size: 28px;
    color: white;
}

.tr-finder-tab-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: white;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Overlay Content */
.tr-finder-overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: 60px 40px 40px 40px;
}

/* Welcome Screen */
.tr-finder-welcome {
    text-align: center;
    padding: 40px 20px;
}

.tr-finder-welcome h2 {
    font-family: 'Open Sans', sans-serif;
    font-size: 2.5em;
    color: #024593;
    margin-bottom: 20px;
    font-weight: 700;
}

.tr-finder-welcome p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2em;
    color: #5a5a5a;
    margin-bottom: 40px;
    font-weight: 400;
}

.tr-finder-welcome-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.tr-finder-welcome-btn {
    padding: 20px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 250px;
    justify-content: center;
}

.tr-finder-welcome-btn-primary {
    background: linear-gradient(135deg, #024593 0%, #03A9F4 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(2, 69, 147, 0.3);
}

.tr-finder-welcome-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(2, 69, 147, 0.4);
}

.tr-finder-welcome-btn-secondary {
    background: #EFEBD6;
    color: #024593;
    border: 2px solid #024593;
}

.tr-finder-welcome-btn-secondary:hover {
    background: #024593;
    color: white;
    transform: translateY(-3px);
}

.tr-finder-welcome-icon {
    font-size: 24px;
}

/* Results Badge */
.tr-finder-results-badge {
    position: absolute;
    top: 15px;
    right: 70px;
    background: #FBBB02;
    color: #024593;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .tr-finder-overlay {
        width: 95%;
        max-width: none;
    }
    
    .tr-finder-overlay-content {
        padding: 60px 20px 20px 20px;
    }
    
    .tr-finder-welcome h2 {
        font-size: 2em;
    }
    
    .tr-finder-welcome-btn {
        min-width: 200px;
        padding: 15px 30px;
    }
    
    .tr-finder-tab {
        width: 50px;
        height: 150px;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        right: -100%;
    }
    to {
        right: 0;
    }
}

@keyframes slideOutRight {
    from {
        right: 0;
    }
    to {
        right: -100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
