/* Click · Módulo Enlaces y Redes */
.profile-links-module{
  --link-cols:4;
  --link-pad:14px;
  --link-icon:38px;
  --link-font:11px;
  padding:18px;
  border:1px solid rgba(218,208,244,.9);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(249,247,255,.96));
  box-shadow:0 12px 30px rgba(64,42,117,.07);
  min-width:0;
}
.profile-links-module-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.profile-links-module-head>div{min-width:0}
.profile-links-module-head span{display:block;color:#8667d9;font-size:9px;font-weight:900;letter-spacing:.09em}
.profile-links-module-head h2{margin:3px 0 0;color:#332c64;font-size:18px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-links-module-head>a{width:34px;height:34px;flex:0 0 auto;border-radius:11px;display:grid;place-items:center;text-decoration:none;background:#f0eaff;color:#7147d9;font-size:13px;font-weight:900}
.profile-links-grid{display:grid;grid-template-columns:repeat(var(--link-cols),minmax(0,1fr));gap:9px;min-width:0}
.profile-link-tile{
  min-width:0;min-height:62px;padding:var(--link-pad);border-radius:16px;
  display:flex;align-items:center;gap:10px;text-decoration:none;
  border:1px solid #e7e1f2;background:#fff;color:#49415f;
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.profile-link-tile:hover{transform:translateY(-1px);border-color:#cdbbf4;background:#fbf9ff}
.profile-link-icon{width:var(--link-icon);height:var(--link-icon);flex:0 0 auto;border-radius:12px;display:grid;place-items:center;background:#f0ebfb;color:#6846c3;font-size:10px;font-weight:1000;letter-spacing:-.03em}
.profile-link-tile strong{min-width:0;font-size:var(--link-font);line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-links-empty{padding:18px;border:1px dashed #d9ceef;border-radius:16px;background:#fbf9ff;text-align:center;color:#81799b;font-size:11px}
.profile-links-empty strong{display:block;color:#4a4364;margin-bottom:6px}.profile-links-empty a{color:#7047dc;font-weight:900;text-decoration:none}

/* Mientras más enlaces, más compactos; nunca hay carrusel ni scroll horizontal. */
.profile-links-module[data-link-count="1"],.profile-links-module[data-link-count="2"]{--link-cols:2}
.profile-links-module[data-link-count="3"],.profile-links-module[data-link-count="4"]{--link-cols:2}
.profile-links-module[data-link-count="5"],.profile-links-module[data-link-count="6"]{--link-cols:3;--link-pad:12px;--link-icon:34px}
.profile-links-module[data-link-count="7"],.profile-links-module[data-link-count="8"],.profile-links-module[data-link-count="9"]{--link-cols:3;--link-pad:10px;--link-icon:31px;--link-font:10px}
.profile-links-module[data-link-count="10"],.profile-links-module[data-link-count="11"],.profile-links-module[data-link-count="12"],
.profile-links-module[data-link-count="13"],.profile-links-module[data-link-count="14"],.profile-links-module[data-link-count="15"],
.profile-links-module[data-link-count="16"],.profile-links-module[data-link-count="17"],.profile-links-module[data-link-count="18"],
.profile-links-module[data-link-count="19"],.profile-links-module[data-link-count="20"]{
  --link-cols:4;--link-pad:8px;--link-icon:28px;--link-font:9px
}

/* Cuando el usuario hace el módulo pequeño, sigue mostrando todos los enlaces. */
.profile-links-module[data-module-size="small"],
.profile-modular-zone-left .profile-links-module{--link-cols:2;--link-pad:8px;--link-icon:28px;--link-font:9px;padding:14px}
.profile-links-module[data-module-size="small"] .profile-link-tile,
.profile-modular-zone-left .profile-link-tile{min-height:48px;gap:7px;border-radius:13px}
.profile-links-module[data-module-size="small"] .profile-links-module-head h2,
.profile-modular-zone-left .profile-links-module-head h2{font-size:15px}

.profile-links-module[data-module-size="medium"]{--link-cols:3}

/* Editor dentro de editar-perfil.php */
.edit-profile-links-editor{margin-top:18px;padding:18px;border:1px solid #e4dcf5;border-radius:20px;background:linear-gradient(180deg,#fff,#fbf9ff)}
.edit-profile-links-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.edit-profile-links-editor-head span{display:block;color:#8466d7;font-size:9px;font-weight:900;letter-spacing:.08em}
.edit-profile-links-editor-head h3{margin:3px 0 4px;color:#342e66;font-size:18px}
.edit-profile-links-editor-head p{margin:0;color:#857e99;font-size:10px;line-height:1.5;max-width:680px}
.edit-profile-links-title{display:grid;gap:5px;margin-bottom:14px}.edit-profile-links-title span{color:#514a70;font-size:10px;font-weight:900}.edit-profile-links-title input{height:42px;border:1px solid #ded7eb;border-radius:11px;background:#fff;padding:0 11px;color:#423b5b;font-size:11px;outline:0}.edit-profile-links-title input:focus{border-color:#9671ee;box-shadow:0 0 0 3px rgba(126,79,231,.08)}
.edit-profile-links-list{display:grid;gap:8px}
.edit-profile-link-row{display:grid;grid-template-columns:150px minmax(120px,.65fr) minmax(220px,1.6fr) 38px 38px 38px;gap:7px;align-items:center;padding:9px;border:1px solid #e5e0ef;border-radius:14px;background:#fff}
.edit-profile-link-row select,.edit-profile-link-row input{width:100%;height:39px;border:1px solid #ded9e9;border-radius:10px;background:#fbfbfd;padding:0 9px;color:#49415d;font-size:10px;outline:0;min-width:0}.edit-profile-link-row select:focus,.edit-profile-link-row input:focus{border-color:#9571ed;background:#fff}
.edit-profile-link-row button{width:38px;height:38px;border:0;border-radius:10px;display:grid;place-items:center;cursor:pointer;font-weight:900;background:#f2edfc;color:#6d4bc7}.edit-profile-link-row button[data-link-remove]{background:#fff0f2;color:#b55268}
.edit-profile-links-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.edit-profile-links-actions small{color:#89829e;font-size:9px;line-height:1.45}.edit-profile-links-actions button{min-height:40px;padding:0 14px;border:0;border-radius:12px;background:#eee7ff;color:#7047db;font-weight:900;cursor:pointer}
.edit-profile-links-limit{display:none;margin-top:9px;padding:9px 11px;border-radius:10px;background:#fff2df;color:#8b5d20;font-size:10px;font-weight:800}.edit-profile-links-limit.show{display:block}

@media(max-width:900px){
  .profile-links-module{--link-cols:3;--link-pad:9px;--link-icon:30px;--link-font:9px;padding:15px}
  .profile-links-module[data-link-count="1"],.profile-links-module[data-link-count="2"],.profile-links-module[data-link-count="3"],.profile-links-module[data-link-count="4"]{--link-cols:2}
  .profile-links-module[data-link-count="10"],.profile-links-module[data-link-count="11"],.profile-links-module[data-link-count="12"],.profile-links-module[data-link-count="13"],.profile-links-module[data-link-count="14"],.profile-links-module[data-link-count="15"],.profile-links-module[data-link-count="16"],.profile-links-module[data-link-count="17"],.profile-links-module[data-link-count="18"],.profile-links-module[data-link-count="19"],.profile-links-module[data-link-count="20"]{--link-cols:4;--link-icon:25px;--link-font:8px;--link-pad:7px}
  .profile-link-tile{min-height:48px;gap:7px}
  .edit-profile-link-row{grid-template-columns:1fr 1fr 38px 38px 38px}.edit-profile-link-row input[name="profile_link_url[]"]{grid-column:1/-1;grid-row:2}.edit-profile-link-row button{grid-row:1}.edit-profile-link-row button[data-link-remove]{grid-column:5}.edit-profile-link-row select{grid-column:1}.edit-profile-link-row input[name="profile_link_label[]"]{grid-column:2}
}
@media(max-width:520px){
  .profile-links-module{--link-cols:2}.profile-links-module[data-link-count="9"],.profile-links-module[data-link-count="10"],.profile-links-module[data-link-count="11"],.profile-links-module[data-link-count="12"],.profile-links-module[data-link-count="13"],.profile-links-module[data-link-count="14"],.profile-links-module[data-link-count="15"],.profile-links-module[data-link-count="16"],.profile-links-module[data-link-count="17"],.profile-links-module[data-link-count="18"],.profile-links-module[data-link-count="19"],.profile-links-module[data-link-count="20"]{--link-cols:3;--link-font:8px;--link-icon:24px}
  .profile-link-tile{padding:7px;min-height:44px}.profile-links-module-head h2{font-size:16px}
  .edit-profile-links-editor{padding:14px}.edit-profile-links-editor-head{flex-direction:column}.edit-profile-link-row{grid-template-columns:1fr 1fr 34px 34px 34px;padding:7px}.edit-profile-link-row button{width:34px;height:34px}.edit-profile-links-actions{align-items:flex-start;flex-direction:column}.edit-profile-links-actions button{width:100%}
}
