/* ── Notes Feed Main Layout & Composer ── */
.ifn-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Composer ── */
.ifn-composer {
    background: #0d0d0d;
    border: 1px solid #1e1e1e;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.ifn-composer-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ifn-composer-right {
    flex: 1;
}

.ifn-composer-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    min-height: 60px;
    font-family: inherit;
    box-sizing: border-box;
}

.ifn-composer-textarea::placeholder {
    color: #444;
}

/* Toolbar composer */
.ifn-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #1a1a1a;
    gap: 8px;
}

.ifn-toolbar-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ifn-tool-btn {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #666;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    font-family: inherit;
}

.ifn-tool-btn:hover {
    border-color: #555;
    color: #ccc;
}

.ifn-char-count {
    font-size: 10px;
    color: #333;
    margin-left: auto;
}

.ifn-char-count.warn {
    color: #ff6608;
}

.ifn-post-btn {
    background: #e8580c;
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
}

.ifn-post-btn:hover {
    background: #cf4a08;
}

.ifn-post-btn:disabled {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
}

/* Link input nel composer */
.ifn-link-input-wrap {
    display: none;
    margin-top: 10px;
    gap: 8px;
}

.ifn-link-input-wrap.visible {
    display: flex;
}

.ifn-link-input {
    flex: 1;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 7px;
    color: #e0e0e0;
    padding: 7px 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.ifn-link-input:focus {
    border-color: #555;
}

.ifn-link-fetch-btn {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #ccc;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

/* ── Feed ── */
.ifn-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Card ── */
.ifn-card {
    background: #0d0d0d;
    border: 1px solid #1a1a1a;
    border-radius: 14px;
    padding: 16px;
    transition: border-color .2s;
}

.ifn-card:hover {
    border-color: #2a2a2a;
}

.ifn-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ifn-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #1a1a1a;
}

.ifn-avatar-sm {
    width: 32px;
    height: 32px;
}

.ifn-meta {
    flex: 1;
}

.ifn-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.ifn-date {
    font-size: 11px;
    color: #444;
}

.ifn-del-btn {
    background: transparent;
    border: none;
    color: #2a2a2a;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: color .2s;
    margin-left: auto;
    flex-shrink: 0;
}

.ifn-del-btn:hover {
    color: #c0392b;
}

/* Testo nota */
.ifn-testo {
    font-size: 15px;
    color: #d0d0d0;
    line-height: 1.65;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Immagine */
.ifn-img-wrap {
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
}

.ifn-img {
    width: 100%;
    display: block;
    border-radius: 10px;
    max-height: 400px;
    object-fit: cover;
}

/* OG card */
.ifn-og-card {
    display: block;
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 12px;
    transition: border-color .2s;
}

.ifn-og-card:hover {
    border-color: #333;
}

.ifn-og-img {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.ifn-og-body {
    padding: 10px 14px;
}

.ifn-og-site {
    font-size: 10px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 3px;
}

.ifn-og-title {
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.3;
}

.ifn-og-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.ifn-link-plain {
    display: block;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    margin-bottom: 12px;
    word-break: break-all;
}

.ifn-link-plain:hover {
    color: #888;
}

/* Footer */
.ifn-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid #141414;
}

.ifn-like-btn {
    background: transparent;
    border: none;
    color: #444;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
    transition: color .2s;
    font-family: inherit;
}

.ifn-like-btn:hover {
    color: #e05;
}

.ifn-like-btn.liked {
    color: #e05;
}

.ifn-like-btn.liked .ifn-heart {
    color: #e05;
}

.ifn-like-static {
    font-size: 13px;
    color: #333;
}

/* Load more */
.ifn-load-more-wrap {
    text-align: center;
    margin-top: 20px;
}

.ifn-load-more {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #666;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    font-family: inherit;
}

.ifn-load-more:hover {
    border-color: #555;
    color: #ccc;
}

.ifn-load-more:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#ifn-img-upload {
    display: none;
}

/* Login prompt */
.ifn-login-prompt {
    background: #0d0d0d;
    border: 1px solid #1e1e1e;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    color: #555;
    font-size: 14px;
    margin-bottom: 24px;
}

.ifn-login-prompt a {
    color: #e8580c;
    text-decoration: none;
}

/* Composer guest */
.ifn-composer-guest {
    cursor: pointer;
}

.ifn-avatar-guest {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ifn-composer-fake-input {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #555;
    font-size: 15px;
    cursor: pointer;
    transition: border-color .2s;
    user-select: none;
}

.ifn-composer-guest:hover .ifn-composer-fake-input {
    border-color: #e8580c;
    color: #888;
}
