/* GlobalPlugins/stickyTemplateBtn/sticky-template-btn.css */

/* Sticky Button Styles - ORIGINAL STYLE */
.sticky-template-btn {
    position: fixed;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Position based on configuration - ORIGINAL POSITION */
.sticky-template-btn {
    bottom: 20px;
    right: 20px;
}

.sticky-template-btn.bottom-left {
    bottom: 20px;
    left: 20px;
    right: auto;
}

.sticky-template-btn.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

/* ORIGINAL BUTTON STYLE - Simple and clean */
.sticky-btn-icon {
    width: 60px;
    height: 60px;
    background: #667eea; /* Solid color instead of gradient */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    border: none; /* Remove border */
}

.sticky-btn-icon i {
    font-size: 24px;
    color: white;
}

.sticky-btn-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Simple Hover Effects - ORIGINAL STYLE */
.sticky-template-btn:hover .sticky-btn-icon {
    transform: scale(1.05); /* Simple scale instead of rotation */
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

/* Modal Styles - FIXED POSITION (Modal ko niche kiya) */
.sticky-template-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.sticky-modal-content {
    position: absolute;
    bottom: 90px; /* Increased from 80px to 90px for more space from bottom */
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    max-height: 80vh; /* Maximum height 80% of viewport */
    display: flex;
    flex-direction: column;
}

.sticky-modal-content.bottom-left {
    bottom: 90px;
    left: 20px;
    right: auto;
}

.sticky-modal-content.bottom-center {
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sticky-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 15px 15px 0 0;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.sticky-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.sticky-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.sticky-modal-close:hover {
    background: #f5f5f5;
}

.sticky-modal-body {
    padding: 10px;
    overflow-y: auto;
    flex: 1; /* Take remaining space */
}

.template-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.template-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(5px);
}

.template-item.active {
    background: #667eea;
    color: white;
}

.template-item.active .template-count {
    color: rgba(255, 255, 255, 0.8);
}

.template-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.template-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #667eea;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.template-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.template-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.template-count {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.template-item.active .template-count {
    color: rgba(255, 255, 255, 0.8);
}

.template-arrow {
    font-size: 12px;
    color: #999;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.template-item:hover .template-arrow {
    transform: translateX(3px);
    color: #667eea;
}

.template-item.active .template-arrow {
    color: white;
}

/* Section Dividers */
.template-section {
    padding: 15px 15px 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-top: 5px;
}

.template-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sticky-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sticky-modal-content {
        width: 95vw;
        right: 2.5vw;
        left: 2.5vw;
        bottom: 80px;
        max-height: 70vh;
    }
    
    .sticky-btn-icon {
        width: 55px;
        height: 55px;
    }
    
    .sticky-btn-icon i {
        font-size: 22px;
    }
}

/* Scrollbar Styling */
.sticky-modal-body::-webkit-scrollbar {
    width: 6px;
}

.sticky-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sticky-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sticky-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}