/* IG Trends - Interactive Hashtag Generator */

.ig-trends-container {
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: #fff;
    max-width: 600px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
}

.ig-trends-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.ig-trends-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search Form */
.ig-search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 6px 16px;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ig-search-form input {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 14px;
    width: 100%;
    padding: 8px 0;
    outline: none !important;
    box-shadow: none !important;
}

.ig-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.ig-search-form button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ig-search-form button:hover {
    opacity: 1;
}

/* Welcome Info */
.ig-welcome-info {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ig-welcome-icon {
    color: #ffdc80;
    /* Instagram yellow/gold */
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

.ig-welcome-info p {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.ig-welcome-info .ig-welcome-sub {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}

/* Tabs */
.ig-trends-tabs-scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    padding-bottom: 5px;
    /* for scrollbar */
}

/* Hide scrollbar for tabs */
.ig-trends-tabs-scrollable::-webkit-scrollbar {
    height: 4px;
}

.ig-trends-tabs-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.ig-trends-tabs {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.ig-tab-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ig-tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chips Container */
.ig-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 60px;
    /* Space for FAB */
}

.ig-trend-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.ig-trend-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.ig-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.ig-tab-pane.active {
    display: block;
}

/* Floating Action Bar (FAB) */
.ig-fab {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
    animation: slideUp 0.3s ease;
}

.ig-fab-counter {
    font-size: 14px;
    font-weight: 600;
}

.ig-copy-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.ig-copy-btn:hover {
    transform: scale(1.05);
}

/* Loader */
#ig-loading-state {
    text-align: center;
    padding: 40px 0;
}

.ig-spinner {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Toast */
.ig-toast {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #4ade80;
    color: #064e3b;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ig-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Watermark */
.ig-trends-watermark {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 250px;
    height: 250px;
    opacity: 0.15;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}

/* Info Icon */
.ig-trends-info-icon {
    cursor: pointer;
    margin-left: auto;
    /* Push to right */
    opacity: 0.8;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.ig-trends-info-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Modal */
.ig-trends-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-trends-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ig-trends-modal-content {
    position: relative;
    background: #fff;
    color: #333;
    padding: 24px;
    border-radius: 16px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    animation: scaleIn 0.3s ease;
}

.ig-trends-modal-content h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #e1306c;
}

.ig-trends-modal-content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

.ig-trends-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.ig-trends-modal-close:hover {
    color: #333;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}