/**
 * TGND Info Bar - Floating Widget Styles
 * Modern floating action button with side panel
 */

/* Floating Tab Button */
.tgnd-widget-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px 0 0 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 2px 15px rgba(102, 126, 234, 0.4);
    z-index: 9998;
    transition: width 0.3s, box-shadow 0.3s;
}

.tgnd-widget-btn:hover {
    width: 50px;
    box-shadow: -4px 4px 25px rgba(102, 126, 234, 0.6);
}

.tgnd-widget-icon {
    color: white;
    font-size: 22px;
    line-height: 1;
    margin-bottom: 3px;
}

.tgnd-widget-icon svg {
    width: 22px;
    height: 22px;
}

/* Badge */
.tgnd-widget-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ff4757;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
}

/* Pulse Animation - Only Icon */
.tgnd-widget-icon.pulse {
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Side Panel */
.tgnd-widget-panel {
    position: fixed;
    right: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.tgnd-widget-panel.open {
    right: 0;
}

/* Panel Header */
.tgnd-widget-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.tgnd-widget-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.tgnd-widget-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tgnd-widget-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.tgnd-widget-close span {
    display: block;
    margin-top: -4px;
}

/* Panel Content */
.tgnd-widget-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Card */
.tgnd-widget-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tgnd-widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tgnd-widget-card:last-child {
    margin-bottom: 0;
}

.tgnd-widget-card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.tgnd-widget-card-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tgnd-widget-card-content p {
    margin: 0 0 12px 0;
    line-height: 1.5;
    color: #666;
    font-size: 14px;
}

.tgnd-widget-card-content a.btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.tgnd-widget-card-content a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Backdrop */
.tgnd-widget-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tgnd-widget-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tgnd-widget-btn {
        width: 36px;
        height: 60px;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .tgnd-widget-btn:hover {
        width: 45px;
    }

    .tgnd-widget-icon {
        margin-bottom: 2px;
    }

    .tgnd-widget-icon svg {
        width: 18px;
        height: 18px;
    }

    .tgnd-widget-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: 4px;
        left: 4px;
    }

    .tgnd-widget-panel {
        width: 100%;
        right: -100%;
        height: 100vh;
    }

    .tgnd-widget-panel.open {
        right: 0;
    }

    .tgnd-widget-card {
        padding: 16px;
    }

    .tgnd-widget-card-icon {
        font-size: 32px;
    }
}
