/**
 * Instagram widget — base look.
 *
 * Class names are the widget's own (insw-*) and this file is the floor, not
 * the ceiling: a site with its own design overrides them from «CSS y
 * JavaScript del sitio». Nothing here is inline, so a stylesheet always wins.
 */

.insw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.insw-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    /* Instagram's iframe embed carries the photo plus its header and footer:
       taller than square. Fixed ratio because without embed.js nothing
       resizes the frame from inside. */
    aspect-ratio: 4 / 5.6;
}

.insw-item iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* The editor's canvas placeholder: same box, no live iframe. */
.insw-ph {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9ca3af;
    font-size: 14px;
}

.insw-ph i,
.insw-ph .bi {
    font-size: 40px;
}

/* The account's own embed: Instagram lays out the header and the grid inside,
   so the frame just needs room. Height because the content does not announce
   its size across origins; the site's CSS can override it. */
.insw-profile {
    width: 100%;
    height: 760px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    display: block;
}

@media (max-width: 600px) {
    .insw-profile { height: 620px; }
}

/* The canvas placeholder for the profile piece. */
.insw-profile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #6b7280;
}

.insw-profile-head i,
.insw-profile-head .bi {
    font-size: 22px;
}

.insw-follow {
    text-align: center;
    margin-top: 24px;
}

.insw-follow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

a.insw-follow-link:hover {
    border-color: #9ca3af;
}

.insw-empty {
    padding: 40px 16px;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}

.insw-loading {
    padding: 30px;
    text-align: center;
    color: #9ca3af;
}
