/* Enlace con botón en publicaciones — función de Latinbook Premium (19 nov).
   Ver js/post-link.js. Usa las mismas variables de tema que el resto de la app
   (claro / oscuro) con colores de respaldo. */

/* ---- Botón "Enlace" en "Agrega a tu publicación" ---- */
.option-icon-wrapper.link {
    background: #FFF4D6;
    color: #9A6A00;
    position: relative;
}
/* Candado pequeño en la esquina mientras no seas Premium */
.create-post-option.lb-link-locked .option-icon-wrapper.link::after {
    content: "\f023";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: -3px;
    top: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1A1F3A;
    color: #FFC107;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-card, #fff);
}

/* ---- Botón dentro de la tarjeta del feed ---- */
/* Compacto (19 nov): del ancho de su texto, no de toda la tarjeta, pero con
   alto mínimo de 40 px para que se toque fácil con el dedo. */
.post-link-wrap {
    padding: 8px 12px 2px;
}
.post-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 170px;
    max-width: 100%;
    min-height: 40px;
    padding: 6px 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #FF6B35, #FF3CAC 60%, #784BA0);
    color: #fff;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 3px 10px rgba(255, 60, 172, 0.22);
}
.post-link-btn:active { transform: scale(0.98); }
.post-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0;
}
.post-link-label {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-link-host {
    font-size: 10.5px;
    line-height: 1.2;
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-link-btn > i { font-size: 13px; flex: none; }

/* ---- Ventanas (editor y aviso de salida) ---- */
.lb-link-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.lb-link-sheet {
    width: 100%;
    max-width: 400px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #0F1419);
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lb-link-sheet-sm { text-align: center; }
.lb-link-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}
.lb-link-head i { color: var(--primary-mid, #FF3CAC); margin-right: 6px; }
.lb-link-x {
    background: none;
    border: 0;
    color: var(--text-secondary, #536471);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}
.lb-link-help {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary, #536471);
}
.lb-link-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin: 10px 0 5px;
}
.lb-link-sheet input[type="url"],
.lb-link-sheet input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-primary, rgba(0, 0, 0, 0.18));
    background: var(--bg-secondary, #F7F9FA);
    color: var(--text-primary, #0F1419);
    font-size: 15px;
    font-family: inherit;
}
.lb-link-sheet input:focus {
    outline: 2px solid var(--primary-mid, #FF3CAC);
    outline-offset: 0;
}
.lb-link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.lb-link-chip {
    border: 1px solid var(--border-primary, rgba(0, 0, 0, 0.18));
    background: var(--bg-secondary, #F7F9FA);
    color: var(--text-primary, #0F1419);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12.5px;
    cursor: pointer;
    font-family: inherit;
}
.lb-link-error {
    min-height: 18px;
    margin-top: 8px;
    font-size: 12.5px;
    color: #E53935;
}
.lb-link-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.lb-link-cancel,
.lb-link-save {
    flex: 1;
    padding: 12px 10px;
    border-radius: 24px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.lb-link-cancel {
    border: 1px solid var(--border-primary, rgba(0, 0, 0, 0.18));
    background: transparent;
    color: var(--text-primary, #0F1419);
}
.lb-link-save {
    border: 0;
    background: linear-gradient(135deg, #FF6B35, #FF3CAC 60%, #784BA0);
    color: #fff;
}
.lb-link-leave-icon {
    width: 52px;
    height: 52px;
    margin: 2px auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FDEBF6;
    color: #C2186B;
    font-size: 20px;
}
.lb-link-leave-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.lb-link-leave-host {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    word-break: break-all;
    color: var(--primary-mid, #FF3CAC);
}

/* ---- Botón dentro de la foto (esquina de abajo a la derecha) ---- */
.post-content.lb-has-link-overlay { position: relative; }
.post-link-wrap.post-link-on-photo {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 0;
    z-index: 3;
    max-width: calc(100% - 24px);
}
.post-link-wrap.post-link-on-carousel { bottom: 34px; }
.post-link-on-photo .post-link-btn {
    min-width: 0;
    min-height: 36px;
    padding: 6px 12px;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
}
.post-link-on-photo .post-link-host { display: none; }

/* ---- Botón en el visor de Reels (arriba del nombre de usuario) ---- */
.reel-link-wrap { margin: 0 0 8px; pointer-events: auto; }
.reel-link-wrap .post-link-btn {
    min-width: 0;
    min-height: 34px;
    padding: 6px 12px;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.reel-link-wrap .post-link-host { display: none; }

/* ---- Fila "Enlace con botón" en Publicar video ---- */
.reel-link-tag {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFB800, #FF8A00);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
