/*==Instagram Integration Styles=====================*/

/* Instagram Suggestions */
.instagram-suggestions {
    position: absolute;
    z-index: 1000;
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.instagram-suggestions.hidden {
    display: none;
}

.instagram-suggestions.show {
    display: block;
}

.instagram-suggestions-list {
    padding: 8px;
}

.instagram-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.instagram-suggestion-item:hover {
    background: #f3f4f6;
}

.suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.suggestion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
}

.suggestion-username {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.suggestion-fullname {
    font-size: 12px;
    color: #6b7280;
}

/* Instagram Preview */
[data-instagram-preview] {
    display: none;
}

[data-instagram-preview].show {
    display: block;
}

.instagram-profile-preview {
    background: #f9fafb;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.instagram-profile-preview--followers {
    position: relative;
    padding: 2px;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
}

.instagram-profile-preview--followers .instagram-profile-preview__border {
    position: absolute;
    inset: -100%;
    background: conic-gradient(from 0deg, #3d01e700, #33b4ea, #c20088, #e7011700);
    animation: igProfileBorderSpin 2.8s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.instagram-profile-preview--followers .instagram-profile-preview__inner {
    position: relative;
    z-index: 1;
    background: #f9fafb;
    padding: 16px;
    border-radius: 11px;
}

.instagram-profile-preview--animating .stat-item--followers .stat-label {
    color: #9333ea;
}

@keyframes igProfileBorderSpin {
    to {
        transform: rotate(360deg);
    }
}

.stat-item--followers .stat-number {
    transition: color 0.25s ease, transform 0.25s ease;
}

.stat-number--boosting {
    color: #9333ea !important;
    display: inline-block;
    transform: scale(1.12);
    animation: igFollowerCountPulse 0.55s ease-in-out infinite alternate;
}

@keyframes igFollowerCountPulse {
    from {
        transform: scale(1.05);
        text-shadow: 0 0 0 rgba(147, 51, 234, 0);
    }
    to {
        transform: scale(1.14);
        text-shadow: 0 0 12px rgba(147, 51, 234, 0.35);
    }
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-weight: 700;
    font-size: 14px;
    color: #1f2937;
    display: block;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
}

/* Posts e Reels Grid */
.preview-title {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
}

.posts-grid,
.reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.post-item,
.reel-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.post-item:hover,
.reel-item:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
}

.post-item.selected,
.reel-item.selected {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
}

.post-item.selected::after,
.reel-item.selected::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
    background-size: 16px 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.post-image img,
.reel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-overlay,
.reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 8px;
    color: white;
    font-size: 10px;
}

.post-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.reel-overlay {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.views-count {
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.instagram-view-more {
    text-align: center;
    margin-top: 12px;
}

.instagram-view-more-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.2s;
}

.instagram-view-more-btn:hover {
    background: #e5e7eb;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-text {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.skeleton-text-short {
    height: 10px;
    width: 60%;
    border-radius: 4px;
}

.skeleton-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 12px;
}

.skeleton-post-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.skeleton-grid--single {
    grid-template-columns: minmax(0, 320px);
    justify-content: center;
}

.skeleton-grid--single .skeleton-post-item {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 320 / 109;
    border-radius: 14px;
}

/* Errors and Warnings */
.instagram-suggestions-error,
.instagram-preview-error {
    padding: 12px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.instagram-private-warning {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.warning-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.warning-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 4px;
}

.warning-content p {
    font-size: 12px;
    color: #78350f;
    margin: 0;
}

/* ===== EXTRAS (Pacotes Adicionais) ===== */
.extra-instagram-content {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.extra-posts-grid,
.extra-reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.extra-post-item,
.extra-reel-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.extra-post-item:hover,
.extra-reel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.extra-post-item.selected,
.extra-reel-item.selected {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.extra-post-item.selected::after,
.extra-reel-item.selected::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
    background-size: 16px 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.extra-post-item img,
.extra-reel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.extra-post-overlay,
.extra-reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.extra-post-likes,
.extra-reel-views {
    font-size: 10px;
    color: white;
    font-weight: 600;
}

.checkout-publication-limit {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.checkout-publication-count,
.pergo-summary-multiplier {
    color: #7c3aed;
    font-weight: 800;
}

.pergo-summary-multiplier:empty {
    display: none;
}

